A generic, record-keeping tool. Use a YAML-defined schema to define the fields you care about and their data types. The web app will then generate the MongoDB collections and React forms necessary to fill in the fields you defined.
- Frontend: React
- Backend: Express
- Database: MongoDB
Credit where credit's due: a free MUI template was used as the starting point for this web app's React frontend
-
Install dependencies:
npm install
-
Run MongoDB:
docker run --name for-the-record-mongo -d -p 27017:27017 mongo
-
Fill in backend's environment variables (if desired). See
backend/src/env.cjs
. -
Run Express-based web service:
node backend/src/server.cjs
-
Perform a health check:
curl localhost:3000/health
-
Provide a schema:
curl -X POST -F "file=@tests/schema.test.yml" localhost:3000/api/schemas
-
Fill in frontend's environment variables (if desired). See
src/utils/env.js
. -
Run the frontend locally:
npm run dev
-
Run tests:
npm run test
string
int
/integer
double
bool
/boolean
enum
/enumeration
Note:
- On the backend, all data types provide support for a
description
field that can be used to describe a field in more detail. However, on the frontend, the description is only actually used bystring
,int
/integer
, anddouble
fields as this time. - Fields of type
int
/integer
ordouble
supportminimum
andmaximum
values.
groups:
- name: My Group
tables:
- name: My Table
fields:
- name: My String Field
type: string
- name: My Integer Field
type: integer
- name: My Double Field
type: double
- name: My Boolean Field
type: boolean
- name: My Enumeration
type: enumeration
options:
- Option 1
- Option 2
- Option 3