node-backend-forge
v1.0.7
Published
CLI to generate production-ready Node.js backend (JS/TS, Docker, Auth, Mongo)
Downloads
36
Maintainers
Readme
node-backend-forge
A professional CLI tool to generate production-ready Node.js backend projects using JavaScript or TypeScript, with optional MongoDB, JWT Authentication, and Docker support.
Overview
node-backend-forge is a project generator, not a runtime library.
It scaffolds a complete backend codebase with a clean folder structure and commonly used production features, allowing developers to start new backend projects in seconds instead of hours.
How to Use (Important)
Correct Command (Required)
To generate a new backend project, always use:
npx node-backend-forge@latestThis command:
- Runs the CLI generator
- Prompts for configuration options
- Creates a new backend folder
- Installs dependencies
- Initializes a Git repository
Incorrect Command (Do Not Use)
npm install node-backend-forgeThis command only installs the CLI tool into node_modules.
It does not generate any project files.
To create a backend project, you must use npx.
Interactive Setup Flow
When you run:
npx node-backend-forge@latestYou will be prompted to select:
Backend language
- JavaScript
- TypeScript
Optional features
- MongoDB (Mongoose)
- JWT Authentication
- Docker and Docker Compose
The generated project will include only the features you select.
Generated Project Structure
TypeScript Backend
my-backend/
├── src/
│ ├── controllers/
│ ├── routes/
│ ├── middlewares/
│ ├── models/
│ ├── config/
│ ├── utils/
│ └── index.ts
├── Dockerfile
├── docker-compose.yml
├── package.json
├── tsconfig.json
└── README.mdJavaScript Backend
my-backend/
├── backend/
│ ├── controller/
│ ├── routes/
│ ├── middlewares/
│ ├── models/
│ ├── config/
│ ├── utils/
│ └── server.js
├── Dockerfile
├── docker-compose.yml
├── package.json
└── README.mdFeatures
Depending on your selections, the generated backend may include:
- JavaScript or TypeScript setup
- Express.js server
- MongoDB integration with Mongoose
- JWT-based authentication
- Dockerfile and Docker Compose configuration
- Environment variable support
- Clean and scalable folder structure
- Git repository initialized by default
Requirements
- Node.js 18 or higher
- npm 9 or higher
Example Usage
npx node-backend-forge@latest
enter your project name
cd api-server
npm run devScreenshots
You can add screenshots here to show:
CLI prompts
Generated folder structure
Running server output
Example (replace with real images later):

Why npx Is Required
node-backend-forge is designed as a one-time project generator.
Using npx ensures:
- No global installation required
- Always uses the latest version
- No clutter in
node_modules
This is the same approach used by tools like create-react-app and vite.
Author
Dipayan Dey
License
MIT
Repository
If you are viewing this on npm, the source code and documentation can be found on the project repository.
Final Notes
- If nothing happens after
npm install, that is expected behavior. - Always use
npx node-backend-forge <project-name>to generate a backend.
