Build scalable backend APIs in seconds with an interactive CLI that generates clean, production-ready Node.js projects using Express or Fastify.
create-smart-api is a powerful CLI toolkit that helps developers scaffold modern backend applications with:
- Clean architecture
- CRUD generation
- Authentication
- Validation
- Swagger docs
- Testing setup
- Plugin support
- Interactive schema builder
Perfect for rapid backend development.
Generate complete backend projects with guided prompts.
Create models visually with:
- Add/Edit/Delete fields
- Bulk field input mode
- Table preview before generation
- Auto typo correction for field types
Generated projects include:
- Folder structure
- Database config
- Environment setup
- Real connected CRUD APIs
- Express.js / Fastify support
- CommonJS + ESM support
- MongoDB / MySQL / MSSQL support
- Sequelize + Mongoose support
- CRUD generator
- Auth generator
- Validation generator
- Swagger/OpenAPI setup
- Jest testing support
- Plugin system
- Microservice scaffolding
npx create-smart-api create my-apinpx create-smart-api c my-apinpm install -g create-smart-apicreate-smart-api create my-apior
create-smart-api c my-apiThe CLI will guide you through:
- Project name
- Framework selection
- Module system
- Database choice
- CRUD generation
- Port configuration
Supported databases:
- MongoDB
- MySQL
- MSSQL
Generate complete CRUD module instantly:
create-smart-api generate:crud useror shortcut:
create-smart-api g:c userField name: name
Type: string
Required? Yes
Unique? Noname:string,email:string,age:number,status:enum| # | Field | Type | Req | Uniq | Default | Extra |
|---|---|---|---|---|---|---|
| 1 | name | string | Yes | No | - | - |
| 2 | string | Yes | Yes | - | - | |
| 3 | status | enum | No | No | active | active,inactive |
Options include:
- Edit field
- Add field
- Delete field
- Continue
create-smart-api create my-api
create-smart-api c my-apicreate-smart-api generate:crud user
create-smart-api g:c usercreate-smart-api generate:auth
create-smart-api g:acreate-smart-api generate:service user
create-smart-api g:s usercreate-smart-api generate:route user
create-smart-api g:r usercreate-smart-api generate:model user
create-smart-api g:m usercreate-smart-api generate:validation user
create-smart-api g:v usercreate-smart-api generate:test user
create-smart-api g:t usercreate-smart-api generate:swaggercreate-smart-api add:plugin redis
create-smart-api add:p redisCurrently supported plugins:
- Redis
- Kafka
Example:
create-smart-api add:plugin kafka- Schema models
- Enum support
- Defaults
- Validation ready
- Typed models
- Constraints
- Auto mappings
Define model relationships interactively:
Related model name: User
Relation type:
β― 1:1
1:N
N:NAuto-create missing related models if needed.
Generated apps support Jest:
npm testMistyped command?
Example:
create-smart-api genrate:crud userCLI automatically suggests:
Did you mean: generate:crud ?And can rerun automatically after confirmation.
Upcoming features:
- GraphQL generator
- Redis cache layer
- Advanced microservices templates
- AI-powered API generation
- Docker support
- CI/CD templates
Contributions are welcome!
- Fork repository
- Create feature branch
- Commit changes
- Submit PR
MIT License
Created with β€οΈ by Chirag Chauhan
GitHub: https://github.com/cvchauhan
If you like this project:
π Star the repository π Share with developers π Contribute ideas
npx create-smart-api create my-next-api