{"id":17602359,"url":"https://github.com/manishraj27/mern-project-cli","last_synced_at":"2025-08-19T11:32:24.601Z","repository":{"id":258517219,"uuid":"874416215","full_name":"manishraj27/mern-project-cli","owner":"manishraj27","description":"A developer-friendly CLI tool that streamlines MERN stack development by automating project setup, database configuration, and boilerplate generation by implementing MVC Architecture. Create production-ready MongoDB, Express, React, and Node.js applications with best practices built-in","archived":false,"fork":false,"pushed_at":"2024-11-05T18:42:12.000Z","size":117,"stargazers_count":20,"open_issues_count":4,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-11T22:02:03.480Z","etag":null,"topics":["cli","collaborate","github","github-codespaces","hacktoberfest","mern-project-cli","mern-stack","node","npm"],"latest_commit_sha":null,"homepage":"https://devcli.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manishraj27.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-17T19:37:25.000Z","updated_at":"2024-12-04T22:32:40.000Z","dependencies_parsed_at":"2024-10-28T11:07:20.590Z","dependency_job_id":null,"html_url":"https://github.com/manishraj27/mern-project-cli","commit_stats":null,"previous_names":["manishraj27/mern-project-cli"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manishraj27%2Fmern-project-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manishraj27%2Fmern-project-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manishraj27%2Fmern-project-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manishraj27%2Fmern-project-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manishraj27","download_url":"https://codeload.github.com/manishraj27/mern-project-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230351169,"owners_count":18212788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","collaborate","github","github-codespaces","hacktoberfest","mern-project-cli","mern-stack","node","npm"],"created_at":"2024-10-22T13:08:01.307Z","updated_at":"2025-08-19T11:32:24.587Z","avatar_url":"https://github.com/manishraj27.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/user-attachments/assets/1226438f-19e0-46e4-beff-5483e429ee69\" width=200\u003e\n\n# 🚀 MERN Project Generator CLI\n\n\u003e Create production-ready MERN stack projects in seconds!\n\n### NPM Package Website [mern-project-cli](https://www.npmjs.com/package/mern-project-cli)\n\n### Website [https://devcli.vercel.app](https://devcli.vercel.app)\n\n![NPM Total Downloads](https://img.shields.io/npm/dt/mern-project-cli?color=brightgreen\u0026label=Total%20Downloads\u0026style=for-the-badge)\n![NPM Weekly Downloads](https://img.shields.io/npm/dw/mern-project-cli?color=blue\u0026label=Weekly%20Downloads\u0026style=for-the-badge)\n[![Node.js Package](https://github.com/manishraj27/mern-project-cli/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/manishraj27/mern-project-cli/actions/workflows/npm-publish.yml)\n\n**MERN Project Generator CLI** is a powerful tool designed to simplify the process of setting up a complete, production-ready MERN stack project in seconds.\n\nThis tool eliminates the need for manual configurations, boilerplate code copying, and repetitive tasks, allowing developers to start building their apps right away with best practices in place. Perfect for both beginners and experienced developers, it saves time and ensures a solid project foundation.\n\n### It complies with latest React v19 and tailwindcss v4 \n\n## ✨ Features\n\n- **One Command Setup**: Generate both frontend and backend with a single command\n- **Industry-Standard Structure**: Pre-configured folder structure following best practices\n- **Create frontend with shadcn and vite**, a new React project with either Shadcn UI + Tailwind CSS or just Vite + Tailwind CSS using a single command.\n- **Instant MongoDB Integration**: Connect to MongoDB with zero configuration\n- **Generate Mongoose Schema**: Generate Mongoose Schema with just one command\n- **Development Ready**: Hot-reloading enabled for both frontend and backend\n- **Pre-configured Environment**: `.env.example` files included with sensible defaults\n- **Git Ready**: Initialized Git repository with proper `.gitignore` files\n\n## 📑 Index\n\n- [Requirements](#-requirements)\n- [Installation](#-installation)\n- [Commands](#%EF%B8%8F-commands)\n  - [1. devcli create](#1-create-mern-project)\n  - [2. devcli mongodb-connect](#2-connect-mongodb)\n  - [3. devcli mongoose-schema](#3-mongoose-schema)\n  - [4. devcli add-redux](#4-add-redux)\n  - [5. devcli create-frontend \u003cproject_name\u003e](#5-create-frontend-project)\n  - [6. devcli init-dockerfiles](#6-initialize-docker-files)\n  - [7. devcli add-eslint](#7-add-eslint-and-prettierrc)\n  - [8. devcli add-jwt-auth](#8-add-jwt-authetication-and-authorization)\n  - [9. devcli deploy --vercel](#9-deploy-frontend-to-Vercel)\n- [Complete User Journey Example](#-Complete-User-Journey-Example)\n- [Future Enhancements](#-future-enhancements)\n- [Contribute](#-contribute-to-the-project)\n- [License](#-license)\n- [Support the project](#-support-the-project)\n\n## ⚡ Requirements\n\nBefore you begin, ensure your system meets these requirements:\n\n- **Node.js**: Version 14.x or higher\n- **npm**: Version 6.x or higher\n- **MongoDB**: Local or remote installation\n\n## 📦 Installation\n\nInstall the CLI tool globally to use it from anywhere in your system:\n\n```bash\nnpm install -g mern-project-cli\n```\n\nTo check installation version:\n\n```bash\ndevcli --version\n```\n\n## 🛠️ Commands\n\n### 1. Create MERN Project\n\n```bash\ndevcli create \u003cyour_project_name\u003e\n```\n\n#### What This Command Does:\n\n##### 1. **📁 Creates Project Structure**:\n\nThe generated project follows the MVC (Model-View-Controller) pattern, a battle-tested architecture that separates your application into three main components:\n\n```\nyour-project-name/\n├── backend/\n│   ├── controllers/         # Handle business logicdocumentation\n│   ├── db/                  # Database configuration\n│   ├── middlewares/         # Custom middleware functionsdocumentation\n│   ├── models/              # MongoDB Schema model\n│   ├── routes/              # API route definitions\n│   ├── utils/               # Helper functionsdocumentation\n│   ├── .env.example         # Environment variables template\n│   ├── .gitignore           # Git ignore rules\n│   ├── constants.js         # Application constants\n│   ├── package.json         # Dependencies and scripts\n│   ├── README.md            # Backend documentation\n│   └── server.js            # Server entry point\n└── frontend/\n    ├── public/              # Static files\n    ├── src/                 # React source code\n    │   ├── components/      # React components\n    │   ├── pages/           # Page components\n    │   ├── utils/           # Helper functions\n    │   └── App.js           # Root component\n    ├── .env.example         # Frontend environment template\n    └── package.json         # Frontend dependencies\n```\n\n##### 2. **Installs Dependencies**:\n\n- Backend: Express, Mongoose, CORS, dotenv, nodemon.\n- Frontend: React, React Router, Axios, Other Create React App dependencies.\n\n#### After Creation:\n\n##### **Start Backend Development**:\n\n```bash\ncd your-project-name/backend\n```\n\n```bash\nnpm run dev             # Start development server with nodemon\n```\n\n##### **Start Frontend Development**:\n\n```bash\ncd your-project-name/frontend\n```\n\n```\nnpm start               # Start React App\n```\n\nOption:\n\nTo create only backend directory.\n```bash\ndevcli create my_backend --backend\n```\n\n```bash\ndevcli create my_project --next\n```\n\n### 2. Connect MongoDB\n\n- Create database as your_project_name_db\n\n```bash\ndevcli mongodb-connect\n```\n\n- Or with custom database name\n\n```\ndevcli mongodb-connect --project custom-name\n```\n\n#### Options:\n\n- `-p, --project \u003cname\u003e`: Specify custom database name\n- No options: Uses project folder name as database name\n\n#### What This Command Does:\n\n##### 1. **Creates Database Connection**:\n\n- Generates `connection.js` in the `db` folder\n- Sets up Mongoose connection with error handling\n- Configures connection string based on environment variables\n\n##### 2. **Updates Server Configuration**:\n\n- Adds database connection import to `server.js`\n- Sets up connection status logging\n\n#### Usage Examples:\n\n```bash\n# Using project name\ndevcli mongodb-connect\n\n# Using custom database name\ndevcli mongodb-connect --project custom_name\n```\n\n#### Generated Files:\n\n```javascript\n// db/connection.js\nrequire('dotenv').config();\nconst mongoose = require('mongoose');\n\nconst dburl = process.env.DB_URL || 'mongodb://localhost:27017/your_db_name';\nmongoose\n  .connect(dburl)\n  .then(() =\u003e console.log('Connected to DB Successfully'))\n  .catch((err) =\u003e console.log(err.message));\n```\n\n### 3. Generate Mongoose Schema\n\n- Create mongoose schema for your backend.\n\n```bash\ndevcli devcli mongoose-schema \u003cschema-name\u003e \u003cfieldName:fieldType fieldName:fieldType ...\u003e\n\n```\n\n#### Usage Example\n\n```bash\ndevcli mongoose-schema User name:String email:String password:String\n```\n\nThis will create a `User.js` file with a Mongoose schema inside the `models/` directory:\n\n```javascript\n//models/User.js\nimport mongoose from 'mongoose';\n\nconst UserSchema = new mongoose.Schema({\n  name: { type: String, required: true },\n  email: { type: String, required: true },\n  password: { type: String, required: true },\n});\n\nconst User = mongoose.model('User', UserSchema);\nexport default User;\n```\n\n#### Explanation:\n\nThe `mongoose-schema` command takes a model name (User) and field definitions (name:String, email:String, password:String), generating a Mongoose model file in the `models/` folder.\n\n### 4. Add Redux\n\nSet up Redux in your project or add new Redux slices.\n\n#### Initialize Redux\n\n```bash\ndevcli add-redux --init\n```\n\n###### What does this command do:\n\n- Sets up Redux store configuration\n- Creates necessary store files and directories\n- Installs required dependencies (@reduxjs/toolkit and react-redux)\n- Creates hooks for easier Redux usage\n\n#### Create Redux Slice\n\n```bash\ndevcli add-redux --slice \u003csliceName\u003e --actions=\"action1,action2\" --state=\"field1:type,field2:type\"\n```\n\nOptions:\n\n- `--slice`: Name of the slice to create\n- `--actions`: Comma-separated list of actions for the slice\n- `--state`: Initial state fields with types (string, boolean, array)\n\n#### Usage Example:\n\n```bash\ndevcli add-redux --slice user --actions=\"login,logout\" --state=\"username:string,isLoggedIn:boolean\"\n```\n\nThis creates:\n\n- A new slice file in `src/store/slices`\n- Boilerplate for specified actions\n- Initial state with typed fields\n- Automatic integration with the Redux store\n\n#### Example Generated Redux Slice\n\nWhen you run the command:\n\n```bash\ndevcli add-redux --slice user --actions=\"login,logout\" --state=\"username:string,isLoggedIn:boolean\"\n```\n\nIt generates the following slice in `src/store/slices/userSlice.js`:\n\n```javascript\nimport { createSlice } from '@reduxjs/toolkit';\n\nconst initialState = {\n  username: '',\n  isLoggedIn: false,\n};\n\nconst userSlice = createSlice({\n  name: 'user',\n  initialState,\n  reducers: {\n    login: (state, action) =\u003e {\n      // Implement login logic here\n    },\n    logout: (state, action) =\u003e {\n      // Implement logout logic here\n    },\n  },\n});\n\nexport const { login, logout } = userSlice.actions;\nexport default userSlice.reducer;\n```\n\n### 5. Create Frontend Project\n\nCreate a new React project with either Shadcn UI + Tailwind CSS or just Vite + Tailwind CSS using a single command.\n\n```bash\n# Create project with Shadcn UI\ndevcli create-frontend \u003cproject_name\u003e --shadcn\n\n# Create project with Vite + Tailwind CSS\ndevcli create-frontend \u003cproject_name\u003e --vite\n```\n\n#### Features\n\n##### With --shadcn flag:\n\n- Creates a Vite + React project\n- Installs and configures Tailwind CSS\n- Sets up Shadcn UI with New York style and Zinc color scheme\n- Configures project structure with best practices\n- Adds initial button component as example\n- Sets up path aliases for better imports\n- Includes all necessary configuration files\n\n##### With --vite flag:\n\n- Creates a basic Vite + React project\n- Installs and configures Tailwind CSS\n- Sets up minimal project structure\n- Includes starter template with modern styling\n\n#### Options\n\n- `--shadcn`: Include Shadcn UI setup with Tailwind CSS\n- `--vite`: Create basic Vite project with Tailwind CSS only\n\n#### Usage Examples\n\n```bash\n# Create a new React project with Shadcn UI\ndevcli create-frontend my-app --shadcn\n\n# Create a new React project with just Vite + Tailwind\ndevcli create-frontend my-app --vite\n\n# Navigate to project\ncd my-app\n\n# Start development server\nnpm run dev\n```\n\n#### Generated Project Structure with --shadcn\n\n```\nyour-project/\n├── src/\n│   ├── components/\n│   │   └── ui/\n│   │       └── button.jsx\n│   ├── lib/\n│   │   └── utils.js\n│   ├── App.jsx\n│   └── index.css\n├── jsconfig.json\n├── tailwind.config.js\n├── vite.config.js\n└── components.json\n```\n\n#### After Creation with --shadcn\n\n- Add more Shadcn components using:\n  ```bash\n  npx shadcn@latest add \u003ccomponent-name\u003e\n  ```\n- Available components can be found at [shadcn/ui components](https://ui.shadcn.com/docs/components)\n- Customize theme in `tailwind.config.js`\n- Add your own components in `src/components`\n\n### 6. Initialize Docker Files\n\nGenerate Dockerfiles for both backend and frontend, along with a docker-compose.yml file for your MERN stack project.\n\n```bash\ndevcli init-dockerfiles\n```\n\n#### What This Command Does:\n\n1. **Creates Backend Dockerfile**:\n\n   - Uses Node.js 20 Alpine image\n   - Sets up working directory\n   - Installs dependencies\n   - Configures for development mode\n   - Exposes port 5000\n\n2. **Creates Frontend Dockerfile**:\n\n   - Uses Node.js 20 Alpine image\n   - Sets up working directory\n   - Installs dependencies\n   - Exposes port 3000\n   - Configures for development mode\n\n3. **Generates docker-compose.yml**:\n   - Configures services for backend, frontend, and MongoDB\n   - Sets up proper networking between services\n   - Configures volumes for development\n   - Sets environment variables\n   - Establishes service dependencies\n\n#### Requirements:\n\n- Project must have `backend` and `frontend` directories in root\n- Docker must be installed on your system\n\n#### Generated Files:\n\n```\nyour-project/\n├── backend/\n│   ├── Dockerfile\n│   └── .dockerignore\n├── frontend/\n│   ├── Dockerfile\n│   └── .dockerignore\n└── docker-compose.yml\n```\n\n#### Usage:\n\n```bash\n# Navigate to your project root\ncd your-project\n\n# Generate Docker files\ndevcli init-dockerfiles\n\n# Start the containerized application\ndocker-compose up\n```\n\nThis will start your application with:\n\n- Backend running on `http://localhost:5000`\n- Frontend running on `http://localhost:3000`\n- MongoDB running on port `27017`\n\n### 7. Add ESLint and Prettierrc\n\nInitialize ESLint in the specified directory (frontend, backend, or the current directory) to ensure consistent code quality with tailored configurations based on the project type.\n\n```bash\ndevcli add-eslint [directory]   # Set up ESLint in the specified directory (defaults to current directory)\n```\n\n#### What This Command Does:\n\n- **Automatically Detects Project Type**: Determines if the project is a React, Vue, TypeScript, Node.js, or plain JavaScript application.\n- **Configures ESLint**: Creates a `.eslintrc.json` file specific to the detected environment (e.g., browser for React, Node.js for backend).\n- **Installs Dependencies**: Automatically installs ESLint, Prettier, and their necessary plugins as development dependencies in the specified directory.\n- **Supports Multiple File Extensions**: Handles various file types based on the project structure.\n\n#### Example Usage\n\n- To set up ESLint in the backend directory:\n  ```bash\n  devcli add-eslint backend\n  ```\n- To set up ESLint in the frontend directory:\n\n  ```bash\n  devcli add-eslint frontend\n  ```\n\n- To set up ESLint in the current directory (default):\n  ```bash\n  devcli add-eslint\n  ```\n\n#### Example Generated ESLint Configuration\n\nThis command generates a basic ESLint configuration file (`.eslintrc.json`) that looks like this:\n\n**For Backend Directory:**\n\n```json\n{\n  \"env\": {\n    \"browser\": false,\n    \"node\": true,\n    \"es2021\": true\n  },\n  \"extends\": [\"eslint:recommended\", \"plugin:prettier/recommended\"],\n  \"parserOptions\": {\n    \"ecmaVersion\": 12\n  },\n  \"rules\": {}\n}\n```\n\n**For Frontend Directory:**\n\n```json\n{\n  \"env\": {\n    \"browser\": true,\n    \"node\": false,\n    \"es2021\": true\n  },\n  \"extends\": [\n    \"eslint:recommended\",\n    \"plugin:react/recommended\",\n    \"plugin:prettier/recommended\"\n  ],\n  \"parserOptions\": {\n    \"ecmaVersion\": 12,\n    \"ecmaFeatures\": {\n      \"jsx\": true\n    }\n  },\n  \"rules\": {}\n}\n```\n\n**For Arbitrary Folders (Defaulting to Node):**\n\n```json\n{\n  \"env\": {\n    \"browser\": false,\n    \"node\": true,\n    \"es2021\": true\n  },\n  \"extends\": [\"eslint:recommended\", \"plugin:prettier/recommended\"],\n  \"parserOptions\": {\n    \"ecmaVersion\": 12\n  },\n  \"rules\": {}\n}\n```\n\n#### Benefits\n\n- **Automates Setup**: Saves time by automating the ESLint configuration process based on project type.\n- **Ensures Consistency**: Helps maintain consistent linting rules across backend and frontend codebases.\n- **Supports Arbitrary Setup**: Allows for easy ESLint configuration in any directory, defaulting to Node.js environment.\n\n### 8. Add JWT Authetication and Authorization \nHere is the content for the 8th command, \"Add JWT Authentication\":\n\nAdd JWT authentication boilerplate to your backend project.\n\n```bash\ndevcli add-jwt-auth\n```\n\n#### What This Command Does:\n\n1. **Creates Necessary Directories**:\n   - `controllers/authController.js`\n   - `middlewares/authMiddleware.js`\n   - `models/userModel.js`\n   - `routes/authRoutes.js`\n\n2. **Generates Authentication Logic**:\n   - `authController.js` - Handles user registration and login with JWT token generation.\n   - `authMiddleware.js` - Implements middleware to authenticate and authorize requests using JWT tokens.\n   - `userModel.js` - Defines a Mongoose schema for the User model.\n   - `authRoutes.js` - Defines API routes for authentication, including register, login, and a protected route.\n\n3. **Installs Required Dependencies**:\n   - `bcryptjs` - For password hashing\n   - `jsonwebtoken` - For generating and verifying JWT tokens\n\n4. **Integrates Authentication Routes**:\n   - Adds the authentication routes to the `server.js` file.\n\n5. **Provides Next Steps**:\n   - Update the `.env` file with a secure `JWT_SECRET`.\n   - Start the server and test the authentication routes:\n     - `POST /api/auth/register`: Register a new user\n     - `POST /api/auth/login`: Log in and get the JWT token\n     - `GET /api/auth/protected`: Access the protected route with the JWT token\n\n#### Usage:\n\n1. Run the command in your project's `backend` directory:\n\n   ```bash\n   devcli add-jwt-auth\n   ```\n\n2. Update the `.env` file in the `backend` directory with a secure `JWT_SECRET`.\n3. Start the server and test the authentication routes.\n\n#### Generated Files:\n\n```\nbackend/\n├── controllers/\n│   └── authController.js\n├── middlewares/\n│   └── authMiddleware.js\n├── models/\n│   └── userModel.js\n├── routes/\n│   └── authRoutes.js\n```\n\nThe generated files implement the following functionality:\n\n1. **authController.js**: Handles user registration and login, generating JWT tokens.\n2. **authMiddleware.js**: Middleware to authenticate and authorize requests using JWT tokens.\n3. **userModel.js**: Mongoose schema and model for the User.\n4. **authRoutes.js**: API routes for authentication, including register, login, and a protected route.\n\nAfter running this command, you can start using the authentication system in your backend application.\n\n### 9. Deploy Frontend to Vercel\nDeploy your frontend application to Vercel with a single command. This feature supports production deployments, preview deployments, custom domains, and automatic environment variable handling.\n\n# 🚀 Frontend Deployment to Vercel CLI Guide\n\n## Overview\nDeploy your frontend application to Vercel with a single command using the `devcli` tool. This feature supports production deployments, preview deployments, custom domains, and automatic environment variable handling.\n\n## Command Syntax\n```bash\ndevcli deploy --vercel [options]\n```\n\n## Options\n\n| Option | Description |\n|--------|-------------|\n| `--vercel` | Deploy the frontend to Vercel |\n| `--preview` | Deploy a preview version (not production) |\n| `--domain \u003cdomain\u003e` | Specify a custom domain for deployment (e.g., `myapp.com`) |\n\n## Features\n\n#### 1. Automatic Environment Variable Handling\n- Uploads environment variables from `.env` files automatically\n- Validates required environment variables before deployment\n\n#### 2. Preview Deployments\n- Deploy a preview version of your app for testing and validation\n\n#### 3. Custom Domain Support\n- Deploy your application to a custom domain\n\n#### 4. Deployment Status and URL\n- Displays the deployment URL after successful deployment\n\n#### 5. Vercel Login Check\n- Automatically checks if the user is logged in to Vercel\n- Prompts for login if not authenticated\n\n#### Usage Examples\n\n#### 1. Production Deployment\n```bash\ndevcli deploy --vercel\n```\n\n**Expected Output:**\n```\n🚀 Deploying frontend to Vercel...\n📦 Uploading environment variables...\n✅ Frontend deployed successfully!\n\n🎉 Your frontend has been deployed to Vercel!\n👉 Open the deployed URL: https://myapp.vercel.app\n```\n\n#### 2. Preview Deployment\n```bash\ndevcli deploy --vercel --preview\n```\n\n**Expected Output:**\n```\n🚀 Deploying frontend to Vercel (preview)...\n📦 Uploading environment variables...\n✅ Frontend deployed successfully!\n\n🎉 Your frontend has been deployed to Vercel!\n👉 Open the preview URL: https://myapp-git-branch.vercel.app\n```\n\n#### 3. Custom Domain Deployment\n```bash\ndevcli deploy --vercel --domain myapp.com\n```\n\n**Expected Output:**\n```\n🚀 Deploying frontend to Vercel with custom domain...\n📦 Uploading environment variables...\n✅ Frontend deployed successfully!\n\n🎉 Your frontend has been deployed to Vercel!\n👉 Open the deployed URL: https://myapp.com\n```\n\n### Prerequisites\n\n### Vercel CLI Installation\nInstall the Vercel CLI globally:\n```bash\nnpm install -g vercel\n```\n\n### Vercel Login\nLog in to Vercel:\n```bash\nvercel login\n```\n\n### Error Handling\n\n#### 1. Invalid Directory\n```\n❌ This does not seem to be a valid frontend app. Make sure you are in the root of your frontend project.\n```\n\n#### 2. Vercel CLI Not Installed\n```\n❌ Vercel CLI is not installed. Please install it using `npm install -g vercel`.\n```\n\n#### 3. Vercel Login Required\n```\n🔑 You are not logged in to Vercel. Please log in to continue.\n```\n\n### Best Practices\n- Ensure your project has a valid `package.json`\n- Configure your Vercel project settings in the Vercel dashboard\n- Use environment variables for sensitive configuration\n- Regularly test preview deployments before production\n\n### Support\nFor additional help, consult the Vercel documentation or contact your development team's support channels.\n\n\n## 📖 Complete User Journey Example\n\nLet's create a blog application from scratch:\n\n```bash\n# Step 1: Install CLI globally\nnpm install -g mern-project-cli\n\n# Step 2: Create new project\ndevcli create my-blog-app\n\n# Step 3: Set up backend\ncd my-blog-app/backend\nnpm run dev\n\n# Step 4: Set up frontend (new terminal)\ncd ../frontend\nnpm start\n\n# Step 5: Connect MongoDB (optional)\ncd ../backend\ndevcli mongodb-connect\n\n# Step 6: Generate Mongoose Scheama (optional)\ndevcli mongoose-schema Blog name:String category:String\n\n\n# Step 7: Set up Redux\ncd ../frontend\ndevcli add-redux --init\n\n# Step 8: Set up Es-lint and prettierrc\ncd ../backend\ndevcli add-eslint\n\ncd ../frontend\ndevcli add-eslint\n# Step 9: Create blog slice for Redux\ndevcli add-redux --slice blog --actions=\"addPost,deletePost,updatePost\" --state=\"posts:array,loading:boolean\"\n\n# Step 10: Add jwt authetication \ncd ..backend\ndevcli add-jwt-auth\n\n🎉 Congratulations! Your blog application structure is ready with:\n- Backend running on `http://localhost:5000`\n- Frontend running on `http://localhost:3000`\n- MongoDB connected and ready to use\n```\n\n## ⚙️ Environment Configuration\n\n### Backend (.env)\n\n```env\n# Server Configuration\nPORT=5000\n\n# Database Configuration\nDB_URI=mongodb://localhost:27017/your_db_name\n```\n\n### Frontend (.env)\n\n```env\n# API Configuration\nREACT_APP_API_URL=http://localhost:5000\n\n```\n\n## 🔧 Available Commands\n\n### CLI Commands\n\n#### Project Setup\n\n```bash\nnpm install -g mern-project-cli    # Install CLI globally\ndevcli --version                   # Check CLI version\ndevcli create \u003cproject-name\u003e       # Create new MERN project\n```\n\n```bash\nOR [Create frontend with shadcn+tailwind/ vite+tailwind]\n\ndevcli create-frontend \u003cproject-name\u003e --shadcn    # shadcn-frontend\ndevcli create-frontend \u003cproject-name\u003e --vite      # vite-frontend\n```\n\n#### Backend CLI Commands\n\n```bash\n# Database Connection\ndevcli mongodb-connect                                          # Connect MongoDB using project name\ndevcli mongodb-connect -p custom-name                           # Connect with custom database name\n\n# Schema Generation\ndevcli mongoose-schema \u003cschema-name\u003e \u003cfieldName:fieldType ...\u003e  # Generate Mongoose schema\n# Example: devcli mongoose-schema User name:String email:String password:String\n```\n\n#### Frontend CLI Commands\n\n```bash\n# Redux Setup\ndevcli add-redux --init                                          # Initialize Redux in frontend\ndevcli add-redux --slice \u003cname\u003e --actions=\"action1,action2\" --state=\"field1:type,field2:type\"       #Create Slice\n# Example: devcli add-redux --slice user --actions=\"login,logout\" --state=\"username:string,isLoggedIn:boolean\"\n```\n\n#### Docker CLI Commands\n\n```bash\n# Docker Configuration\ndevcli init-dockerfiles            # Generate Dockerfiles and docker-compose.yml\n```\n\n### Development Commands\n\n#### Backend Development\n\n```bash\ncd backend                 # Navigate to backend directory\nnpm install                # Install dependencies\nnpm run dev                # Start with auto-reload (development)\nnpm start                  # Start without auto-reload (production)\n```\n\n#### Frontend Development\n\n```bash\ncd frontend                # Navigate to frontend directory\nnpm install                # Install dependencies\nnpm start                  # Start development server\n```\n\n#### Docker Development\n\n```bash\ndocker-compose up          # Start all services (backend, frontend, mongodb)\ndocker-compose down        # Stop all services\ndocker-compose up --build  # Rebuild and start all services\n```\n\n## 🔮 Future Enhancements\n\n1. **Code Generation**\n   More Code-Snippets\n\n## 🤝 Contribute to the Project\n\nWe welcome and appreciate contributions to MERN Project Generator CLI! If you’d like to help improve this tool, feel free to do so.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/manishraj27/mern-project-cli?tab=MIT-1-ov-file) file for details.\n\n## 🌟 Support the Project\n\nIf you find this tool helpful, please consider:\n\n- Giving it a star on [GitHub](https://github.com/manishraj27/mern-project-cli)\n- View on NPM [mern-project-cli](https://www.npmjs.com/package/mern-project-cli)\n- Sharing it with your fellow developers\n- Contributing to its development\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003e🌟 Build with ❤️ by Manish Raj\u003c/h3\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://manishraj.me/\"\u003ePortfolio\u003c/a\u003e •\n    \u003ca href=\"https://github.com/manishraj27\"\u003eGitHub\u003c/a\u003e •\n    \u003ca href=\"https://www.linkedin.com/in/manishraj27\"\u003eLinkedIn\u003c/a\u003e •\n    \u003ca href=\"https://x.com/manish_rraaj\"\u003eTwitter\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanishraj27%2Fmern-project-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanishraj27%2Fmern-project-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanishraj27%2Fmern-project-cli/lists"}