UNPKG

mernboot

Version:

A powerful CLI tool for generating full-stack MERN applications...

188 lines (136 loc) • 4.42 kB
<p align="center"> <img src="https://i.ibb.co/RkhVtGqr/mern-starter.png" alt="MERNBoot" width="300px" style="background-color: #ffffff; padding: 20px; border-radius: 10px;"/> </p> <div align="center"> # MERNBoot šŸš€ [![NPM Version](https://img.shields.io/npm/v/mernboot)](https://www.npmjs.com/package/mernboot) [![License](https://img.shields.io/npm/l/mernboot)](https://www.npmjs.com/package/mernboot) [![Weekly Downloads](https://img.shields.io/npm/dw/mernboot)](https://www.npmjs.com/package/mernboot) šŸŽÆ Generate production-ready MERN stack applications in minutes. Automated MongoDB Atlas setup, pre-configured Express backend, and modern React frontend with Tailwind CSS - all with one command! ✨ </div> ## šŸš€ Quick Start ### New Project ```bash # Create a new MERN project (No installation needed) npx mernboot ``` ### Existing Project ```bash # If you already have a package.json npm install mernboot npm run mernboot ``` ### Global Installation ```bash # Optional: Install globally to use anywhere npm install -g mernboot mernboot ``` ## ✨ Features ### 1. MongoDB Atlas Integration - šŸ”„ Automated cluster creation - šŸ”‘ Secure authentication setup - šŸ“Š Database configuration - šŸ”Œ Connection string management ### 2. Express Backend - šŸ“ MVC architecture - šŸ›£ļø Pre-configured routes - šŸ”’ Middleware setup - šŸŽÆ Best practices structure ### 3. React Frontend - ⚔ Vite for blazing fast development - šŸŽØ Tailwind CSS pre-configured - šŸ“± Responsive layouts - šŸŽÆ Modern development setup ### 4. Development Tools - šŸ”„ Hot reloading - šŸ“ Environment variables - šŸ› ļø Concurrent development servers - šŸ“¦ Dependency management ## šŸ“‹ Project Structure ``` my-app/ ā”œā”€ā”€ client/ # React Frontend │ ā”œā”€ā”€ public/ │ ā”œā”€ā”€ src/ │ │ ā”œā”€ā”€ components/ │ │ └── App.jsx │ └── package.json │ | # Express Backend │── controllers/ │── models/ │── routes/ │── middleware/ │── server.js │ ā”œā”€ā”€ .env # Environment Variables └── package.json ``` ## šŸ› ļø Step-by-Step Guide ### 1. Create Your Project ```bash npx mernboot ``` ### 2. MongoDB Setup ```bash # Choose MongoDB Atlas Setup from the menu # Follow the interactive prompts for: # - Project creation # - Cluster setup # - Database user configuration ``` ### 3. Start Development ```bash # Start both frontend and backend npm run dev:all # Or start them separately npm run dev:server # Backend only npm run dev:client # Frontend only ``` ## šŸ’» Commands | Command | Description | | -------------------- | ------------------------------- | | `npm run dev:all` | Start both frontend and backend | | `npm run dev:server` | Start backend only | | `npm run dev:client` | Start frontend only | | `npm run build` | Build frontend | | `npm start` | Start production server | ## āš™ļø Configuration ### Environment Variables ```env PORT=5000 MONGODB_URI=your_mongodb_uri NODE_ENV=development ``` ### Available Options - MongoDB Atlas configuration - Custom port settings - Development/Production modes - CORS settings ## šŸ“š Requirements - Node.js 14.0 or later - npm 6.0 or later - MongoDB Atlas account (free tier works great!) ## šŸ¤ Contributing 1. Fork the repository 2. Create your feature branch (`git checkout -b feature/AmazingFeature`) 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`) 4. Push to the branch (`git push origin feature/AmazingFeature`) 5. Open a Pull Request ## šŸ“ License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## Acknowledgments - MongoDB Atlas for database hosting - Express.js for backend framework - React for frontend library - Node.js for runtime environment - Tailwind CSS for styling ## šŸ“® Support Having trouble? Open an issue or reach out to us: - [GitHub Issues](https://github.com/thejaAshwin62/mernboot/issues) - [Email Support](mailto:your-email@example.com) --- <div align="center"> Made with ā™¾ļø by Theja Ashwin </div>