Giter Club home page Giter Club logo

for-the-record's Introduction

For the Record

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.

Stack

  • 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

Getting started

  1. Install dependencies:

    npm install
    
  2. Run MongoDB:

    docker run --name for-the-record-mongo -d -p 27017:27017 mongo
    
  3. Fill in backend's environment variables (if desired). See backend/src/env.cjs.

  4. Run Express-based web service:

    node backend/src/server.cjs
    
  5. Perform a health check:

    curl localhost:3000/health
    
  6. Provide a schema:

    curl -X POST -F "file=@tests/schema.test.yml" localhost:3000/api/schemas
    
  7. Fill in frontend's environment variables (if desired). See src/utils/env.js.

  8. Run the frontend locally:

    npm run dev
    
  9. Run tests:

    npm run test
    

Schema

Supported data types

  1. string
  2. int/integer
  3. double
  4. bool/boolean
  5. enum/enumeration

Note:

  1. 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 by string, int/integer, and double fields as this time.
  2. Fields of type int/integer or double support minimum and maximum values.

Example

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

Demo

For.the.Record.Demo.mov

for-the-record's People

Contributors

kochcj1 avatar

Stargazers

 avatar

Watchers

 avatar

for-the-record's Issues

Show loading and error states

See:

  1. Groups.jsx (i.e. when displaying groups and tables in the nav bar)
  2. Records.jsx (i.e. all GET, POST, PUT, and DELETE loading and error states)

Creation and modification times

When inserting a new document, add creation and modification times. When updating or soft deleting an existing document, update its modification time. Update retrieval logic to sort by creation time.

Maybe not needed if MongoDB's default sort order is insertion order.

Fully support descriptions

String, integer, and double fields support a description, but boolean and enumerated fields do not.

Ideally, any links that are included in a description should be clickable. Consider spinning this particular requirement off into its own issue.

Finish tests

Scope: backend (all routes) and frontend (common user flows)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.