mern-backend-quickstart
Version:
CLI tool to quickly generate a MERN backend boilerplate with optional auth middleware.
68 lines (50 loc) โข 1.97 kB
Markdown
๐MERN Backend Quickstart
A professional, production-ready MERN backend boilerplate generator to help developers quickly scaffold backend projects using MongoDB, Express, and optional JWT Authentication.
Customize your setup through the CLI to generate only the files you need.
๐ฅInstallation & Usage
๐ง Install Globally
npm install -g mern-backend-quickstart
๐ Run CLI Anywhere
create-mern-backend
๐ง Install Locally in a Project
npm install mern-backend-quickstart
๐ Run CLI via NPX (No Global Install Needed)
npx create-mern-backend
๐ ๏ธFolder Structure :
config/
โโโ database.js
controllers/
โโโ sampleController.js
middleware/
โโโ authMiddleware.js # Optional (based on CLI answer)
models/
โโโ sampleModel.js
routes/
โโโ sampleRoute.js
utils/
โโโ generateToken.js # Optional (based on CLI answer)
.env.example
server.js
package.json
README.md
โจFeatures :
๐ MongoDB Connection using Mongoose
โ๏ธ Express Routing and Controllers
๐ JWT Authentication (Optional via CLI)
๐ Bcrypt Password Hashing
๐๏ธ Clean, Scalable Project Structure
๐ ๏ธ Optional Sample Files (Models, Controllers, Routes)
๐ Auto-generated .env file
๐ฏWhy Use This?
โ
Saves time with ready-made structure
โ
Follows backend best practices
โ
Easily customizable through interactive CLI
โ
Quickly get started with real projects
๐งCLI Options
When running create-mern-backend, you'll be prompted:
Do you want Authentication Middleware?
Do you want Sample Files?
Your project is customized based on these answers.
๐งโ๐ปAuthor
Shraddha Tiwari
Designed to save developers from writing the same boilerplate repeatedly.