A powerful CLI tool to scaffold production-ready Node.js microservices with built-in best practices, allowing you to choose between MVC or Clean Architecture, JavaScript or TypeScript, and your preferred database.
- Interactive CLI: Easy-to-use prompts to configure your project.
- Multiple Architectures: Supports both MVC (Model-View-Controller) and Clean Architecture.
- Language Support: Choose between JavaScript and TypeScript.
- Database Integration: Pre-configured setup for MySQL, PostgreSQL, or MongoDB.
- Microservices Ready: Optional Kafka integration for event-driven communication.
- Caching Layer: Optional Redis integration for high-performance data caching.
- Dockerized: Automatically generates
docker-compose.ymlfor DB, Kafka, Redis, and Zookeeper. - Database Migrations/Schemas: Integrated Flyway for SQL migrations or Mongoose schemas for MongoDB.
- Professional Standards: Generated projects come with highly professional, industry-standard tooling.
We don't just generate boilerplate; we generate production-ready foundations. Every project includes:
- 🔍 Code Quality: Pre-configured
EslintandPrettierfor consistent coding standards. - 🛡️ Security: Built-in
Helmet,HPP,CORS, and Rate-Limiting middleware. - 🧪 Testing Strategy: Integrated
JestandSupertestsetup for Unit and Integration testing. - 🔄 CI/CD Support: Choice between GitHub Actions and Jenkins.
- ⚓ Git Hooks:
HuskyandLint-Stagedto ensure no bad code is ever committed. - 🐳 DevOps: Highly optimized Multi-Stage Dockerfile for small, secure production images.
The CLI supports a massive number of configurations to fit your exact needs:
- 112 Core Combinations:
- MVC Architecture: 84 variants (Languages × View Engines × Databases × Communication Patterns × Caching)
- Clean Architecture: 28 variants (Languages × Databases × Communication Patterns × Caching)
- 224 Total Scenarios:
- Every combination can be generated with or without GitHub Actions CI/CD, doubling the possibilities.
For a detailed list of all supported cases, check out docs/generateCase.md.
You can install the tool globally directly from npm:
npm install -g nodejs-quickstart-structureOnce installed, simply run the following command in any directory where you want to create a new project:
nodejs-quickstart initThe CLI will guide you through the following steps:
- Project Name: The name of the folder to create.
- Language:
JavaScriptorTypeScript. - Architecture:
MVCorClean Architecture. - Database:
MySQL,PostgreSQL, orMongoDB. - Database Name: The name of the initial database.
- Communication:
REST APIs(default) orKafka. - Caching:
RedisorNone. - CI/CD:
GitHub Actions,Jenkins, orNone.
The generated project will include:
src/: Source code (controllers, routes, services/use-cases).flyway/sql/: SQL migration scripts (if SQL database selected).docker-compose.yml: Services configuration for DB, Flyway, and Kafka.package.json: Dependencies and scripts (start,dev,build).tsconfig.json: (If TypeScript is selected) Type checking configuration.
cd <your-project-name>
# Start infrastructure (DB, etc.)
npm install
docker-compose upISC
