Skip to content

CLI tool which accepts db schema and automatically generates API( Express, Mongo ) and an AdminPanel( React, Redux ) to perform CRUD ops.

Notifications You must be signed in to change notification settings

NamanAulakh/automate-crud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

automate-crud

oclif Version CircleCI Downloads/week License

Prerequisites

  • mongo must be up and running

Usage

Config file should be a .js file and should look something like this:

module.exports = {
  name: 'dating-app',
  models: {
    User: {
      email: { type: 'String', default: '', unique: true, required: true },
      isVerified: { type: 'Boolean', default: false },
    },
    Vote: {
      isLiked: { type: 'Boolean', default: true },
      otherId: { type: 'String' },
      userId: { type: 'String' },
    },
    Profile: {
      userId: { type: 'String' },
      age: { type: 'Number' },
      name: { type: 'String' },
    },
  },
};

Commands

Run npm i && ./bin/run <path-to-the -config-file> in the project root( might take 2 - 3 minutes ):

[demo

  • Finally the generated code can be found in code directory in the project root.

Roadmap

  • Authentication
  • Authorization
  • Fill Nested Data as JSON
  • Add ref/populate support in schema
  • Web:boolean i/p box
  • paramValidation
  • provide db Freedom to user
  • Allow users with options to customize the app
  • Improve UI
  • should be able to generate API and AdminPanel independently.

About

CLI tool which accepts db schema and automatically generates API( Express, Mongo ) and an AdminPanel( React, Redux ) to perform CRUD ops.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages