create-project-mern
v1.0.1
Published
Create production-ready MERN apps
Maintainers
Readme
A production-ready MERN stack scaffolding CLI tool that instantly generates full-stack MERN boilerplate applications with JavaScript or TypeScript support.
Note: This tool is NOT a tutorial. Users only need to run one command, select options, and their project is ready automatically. No manual React, Express, MongoDB, Vite, Tailwind, or TypeScript setup required.
✨ Features
- 📦 MERN Stack Boilerplate - Pre-configured and ready to use.
- 🔠 JavaScript + TypeScript Support - Choose your preferred language.
- ⚡ Vite Frontend - Blazing fast frontend build tool.
- 🚂 Express Backend - Robust backend server.
- 🍃 MongoDB Ready - Database connection pre-configured.
- 🎨 TailwindCSS Setup - Instant styling with Tailwind (optional).
- 🔐 Authentication Ready - JWT Auth Support included.
- ⬇️ Auto Dependency Installation - Sit back while we install everything.
- 🐙 Automatic Git Initialization - Start tracking changes immediately.
- 🏗️ Production Ready Structure - Clean and scalable folder structure.
- 🖥️ Modern UI Starter - Beautiful starting dashboard.
- ⚙️ Environment Variables Included -
.envtemplates ready to go. - 🩺 Ready-to-use Backend Health Check API - Built-in status checks.
🚀 Installation
You can install the package globally:
npm install -g create-project-mernBut npx is recommended to always use the latest version:
npx create-project-mern myApp💻 Usage
Running the CLI is simple. Just use the npx command followed by your project name.
npx create-project-mern myAppExample Flow
$ npx create-project-mern myApp
🚀 Welcome to Create Project MERN!
? What is your project named? myApp
? Do you want to use TypeScript/JavaScript?
⚙️ Setting up your project...
📦 Installing dependencies...
🐙 Initializing Git repository...
✅ Project myApp created successfully!📂 Generated Project Structure
myApp/
├── client/ # Frontend React + Vite app
├── server/ # Backend Express app
├── .gitignore
└── package.jsonclient→ The frontend application, pre-configured with Vite, React, and optional TailwindCSS.server→ The backend application, pre-configured with Express, MongoDB connection, and optional JWT authentication.
🛠️ Included Features
When you generate a project, it automatically comes configured with:
- React + Vite: Fast, modern frontend setup.
- Express Server: RESTful API ready backend.
- MongoDB Setup: Mongoose connection logic pre-written.
- Environment Variables:
.envfiles for both client and server. - TailwindCSS: Ready to use utility classes (if selected).
- JWT Auth: User authentication boilerplate (if selected).
- Backend Health API: Ready
/api/healthendpoint to verify backend status. - Dependency Installation: All
npm installcommands run during setup.
📸 Screenshots
CLI Preview

Generated App UI

Folder Structure

Terminal Setup

🏃♂️ Running The App
Navigate to your project directory and start both servers.
Start the Frontend:
cd myApp/client
npm run devFrontend runs at →
http://localhost:5173
Start the Backend:
cd myApp/server
npm run devBackend runs at →
http://localhost:5000
🌟 Example Generated UI
The generated starter dashboard includes:
- Frontend Status: Indicates if the React app is running correctly.
- Backend Status: Real-time ping to the backend health API.
- MongoDB Status: Shows if the database connection is successful.
- API Test Button: Quick button to test API interactions.
- Setup Guide Section: Next steps to customize your application.
🤔 Why Use This Package?
- ⏱️ Saves Setup Time: Go from idea to coding in seconds.
- 🚫 No Manual Configuration: Skip the tedious setup of Webpack, Babel, Vite, Mongoose, etc.
- 🏢 Production-ready Boilerplate: Best practices baked in from the start.
- 🧹 Clean Architecture: Separation of concerns between client and server.
- 👶 Beginner Friendly: Simple prompts, no complex flags required.
- ⚡ Fast Setup: Automated dependency installation and git init.
📋 Requirements
- Node.js >= 18
- npm installed
- MongoDB (optional, but recommended for the backend)
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
