Stop Wasting Time on Boilerplate: Generate Production-Ready Node.js Apps in 1 Minute
Hi everyone! π
As Node.js developers, we've all been there. You have a great idea for a new project, but before you can write a single line of business logic, you have to spend hours setting up the foundation.
You know the drill:
- Copy-paste a folder structure from an old project.
- Configure
ESLint,Prettier, andTypeScript. - Set up Docker and
docker-compose. - Wire up the database connection.
- Build the base Controller/Service layers.
Itβs not hard, but itβs tedious. Itβs called "Boilerplate Fatigue," and it kills momentum.
To solve this, I built a CLI tool called nodejs-quickstart-structure.
The goal is simple: Run one command, and get a professional, industry-standard Node.js project ready for code.
Meet nodejs-quickstart-structure
There are plenty of generators out there, but I often find them either too simple (just a basic Express app) or too opinionated (forcing a specific framework or folder structure I don't like).
nodejs-quickstart-structure is designed to balance flexibility with professional standards.
Key Features β¨
- Architecture Agnostic:
- MVC: Perfect for small-to-medium projects that need to move fast.
- Clean Architecture: Ideal for enterprise applications and microservices requiring strict separation of concerns (Dependency Rule).
- Language Support: First-class support for both JavaScript and TypeScript.
- Database Integration: Auto-configured connections for MongoDB, MySQL, or PostgreSQL.
- Microservices Ready: Optional Kafka integration for event-driven architectures.
- Caching: Built-in Redis or Memory cache support for high-performance data caching.
- DevOps Friendly:
- Generates a complete
docker-compose.ymlfor DB, Redis, Kafka, and Zookeeper. - Optimized Multi-Stage Dockerfile for small, secure production images.
- CI/CD templates included for GitHub Actions / Jenkins / Gitlab.
- Generates a complete
- Code Quality: Pre-configured with
ESLint,Prettier,Husky, andLint-staged. - Professional Logging:
Winston+Morgansetup for structured logging. - Deployment: Ship confidently with an integrated PM2 Ecosystem Configuration for zero-downtime reloads and robust process management.
Installation & Usage
It's published on npm, so you can install it globally:
npm install -g nodejs-quickstart-structure
Create a New Project
Navigate to your workspace and run:
nodejs-quickstart init
Or
Quick Start
You can run the generator directly without installing it globally:
npx nodejs-quickstart-structure init
The CLI will ask you a few interactive questions to customize your stack:
- Project Name: e.g.,
my-awesome-app - Language:
TypeScript/JavaScript - Architecture:
Clean Architecture/MVC - Database:
PostgreSQL/MySQL/MongoDB - Caching:
Redis/Memory cache - Communication:
REST APIs/GraphQL/Kafka - CI/CD:
GitHub Actions/Jenkins/Gitlab
And... BOOM! π₯
In seconds, you have a fully scaffolded project structure:
my-awesome-app/
βββ src/
β βββ config/ # Environment variables, db config
β βββ controllers/ # (MVC) or interfaces/controllers (Clean Arch)
β βββ routes/ # (MVC) or interfaces/routes (Clean Arch)
β βββ usecases/ # (Clean Arch) Application Business Rules
β βββ domain/ # (Clean Arch) Enterprise Business Rules
β βββ infrastructure/ # (Clean Arch) Database repositories, external services
β βββ index.ts # Entry point
βββ docker-compose.yml # Fully configured services
βββ .eslintrc.json
βββ package.json
βββ ...
Massive Customizability
The tool supports over 112 different configuration combinations, all rigorously tested on Windows and Linux.
For example, if you choose TypeScript + Clean Architecture + PostgreSQL + Kafka + Redis, the tool will:
- Generate a Clean Architecture folder structure (Entities, Use Cases, Interfaces).
- Install the
pgdriver and configure the connection. - Set up
kafkajsfor messaging. - Configure the
redisclient. - Create
utilswith migration scripts. - Generate sample User CRUD code so you can see exactly how data flows through the layers.
Contribution
This project is Open Source (ISC License). Iβd love for you to try it out, break it, report bugs, or contribute new features (NestJS support, anyone?).
- GitHub: https://github.com/paudang/nodejs-quickstart-structure
- NPM: https://www.npmjs.com/package/nodejs-quickstart-structure
If you find this tool useful, please give it a βοΈ on GitHub! It really helps keep the motivation high.
π Roadmap & Upcoming Features
We are constantly working to improve nodejs-quickstart-structure and make it the most robust boilerplate generator for Node.js.
You can track our current progress, see what features are being worked on, and vote for your favorites on our public Trello board:
π View our Public Roadmap on Trello
If you have a feature request or want to contribute, feel free to check the board and open an issue or pull request!

Top comments (0)