Documentation
make-backend
An interactive CLI to scaffold production-ready backend projects in seconds.
Introduction
make-backend is a production-ready CLI that generates fully configured backend applications with your choice of framework, language, database, and utility packages. It handles dependency installation, Git initialization, and produces a clean project structure following industry best practices.
Quick Start
Run directly without installing anything:
Or install globally with your preferred package manager:
Then run from anywhere:
Usage
The CLI walks you through an interactive setup with these prompts:
After you confirm, the CLI will:
- 1Scaffold the project directory from your selected template
- 2Merge database configuration and models (if a database was selected)
- 3Install all dependencies with your chosen package manager
- 4Initialize a Git repository and generate .gitignore
- 5Print the next steps to get your server running
Start your dev server:
http://localhost:3000 by default with a working GET /api/health endpoint.Project Structure
Every scaffolded project follows this opinionated folder structure:
Frameworks
Choose between two production-tested Node.js frameworks:
| Framework | Description | Docs |
|---|---|---|
| Express | Fast, minimalist web framework — the industry standard for Node.js APIs. | expressjs.com |
| Hono | Ultrafast, lightweight framework built for any runtime including the edge. | hono.dev |
Languages
| Language | Notes |
|---|---|
| JavaScript | ES Modules ("type": "module"), runs directly with Node.js. No build step. |
| TypeScript | Dev via tsx, production builds via tsc. Typed env vars via Zod (if selected). |
Databases
| Database | Driver | What's scaffolded |
|---|---|---|
| MongoDB | Mongoose ^8.0.0 | Connection manager, graceful shutdown, User model |
| PostgreSQL | node-postgres ^8.11.3 | Connection pool, lifecycle events, User table with typed CRUD |
| None | — | Skips database setup entirely — clean slate |
What's Included
Every generated project ships with these out of the box:
ApiResponse & ApiError
Standardized API response classes
Global Error Handling
Middleware with dev-only stack traces
Helmet + Compression
Security headers and response compression
Morgan Logger
HTTP request logging
Vitest + Supertest
Pre-configured test suite with health check
ESLint + Prettier
Modern flat config linting and formatting
dotenv
.env and .env.example auto-generated
GET /api/health
Health check endpoint ready to use
tsx / --watch
Fast dev server with hot reload
git init
Git initialized, .gitignore generated
Optional Packages
During setup, pick any combination of these packages. They are installed and pre-wired for you:
| Package | Purpose |
|---|---|
| bcrypt | Password hashing for user authentication flows |
| jsonwebtoken | JWT creation and verification |
| zod | Schema validation + automatic typed env var validation |
| nodemailer | Email sending with Gmail / SMTP support |
Package Managers
make-backend supports all major Node.js package managers. Your preference is cached locally and pre-selected on future runs.
| Manager | Install command | Dev command |
|---|---|---|
| npm | npm install | npm run dev |
| pnpm | pnpm install | pnpm dev |
| yarn | yarn install | yarn dev |
| bun | bun install | bun dev |
Local Installation
If you want to run from source, clone and link:
Or run directly from GitHub without cloning:
To unlink when done:
Contributing
Contributions are welcome. To get started:
When opening a pull request:
- Follow the existing code style and directory conventions
- Test your changes by scaffolding with each framework/language/database combo
- Keep commits atomic and descriptive