Node.js Code Generator
Node.js code generator is a developer-centric platform to build backend CRUD APIs along with other essential features to boost developers' productivity time by twofold!
Developers just need to add their schema data to reduce their work related to models into a few simple configurations. Developers can also configure platforms , routes, role access, authentication & more for their application.
Most importantly, the Node.js code generator gives developers total code ownership. The code it generates is bug-free and easily customizable
Table of contents
Get started
After a successful run, a user can configure different settings using UI, and build an app to generate the code.
- To run
npm i && npm run start
⚠️ Note: Usenpm i --force
If your npm installation fails. As Node version >= 14 will give you errors if peer dependency in different packages have ambiguation in versions.
- With
npm run start
project will run on 3000 port. - Run http://localhost:3000 and you will see "create application" form. After creating an application you can configure modules and build the app to get the source code.
Supported architectures
This project provides two architectures to choose from, while creating an application.
Clean Code
The main rule of clean architecture is that code dependencies can only move from the outer levels inward. Code on the inner layers can have no knowledge of functions on the outer layers.
MVC - Model-View-Controller
The Model-View-Controller (MVC) is an architectural pattern that separates an application into three main logical components: the model, the view, and the controller. Each of these components are built to handle specific development aspects of an application.
Features of generated code
- User Authentication and Authorization (using Passport)
- Social Login APIs
- CRUD APIs with middleware and attributes' selection
- List API with pagination, populate and queries
- Upload attachment API with validation and storage options like (Local server or S3 public/private bucket)
- Role-Permission
- Hooks and Indexes
- Policy/middleware
- API request body validation (Using joi)
- API response with standard error and message pattern
- Test cases
- Postman collection and API documentation
- Constants
- Environment Variables for development, QA and production
- Custom API setup
- Multiple Platform selection and User type configuration
- MVC and Clean-code architecture
- Supported Databases
a. MongoDB
b. SQL Server
c. MYSQL
d. PostgreSQL
Documentation
Here's the Documentation of How you can use generated APIs
Contribution
Have you found a bug?
Our Contribution guide will help you how to contribute.
Support
If you have problems or questions go to our Discord channel, we will then try to help you as quickly as possible: https://discord.gg/hTuNauNjyJ