Windows-compatible MERN stack generator with MVC architecture
npm install ameen-mvc
.env support.
sh
npm install -g ameen-mvc
`
š Usage
To create a new MERN project, run:
`sh
ameen-mvc myProject
`
This will:
ā Create a new myProject/ directory.
ā Generate a MERN MVC folder structure.
ā Install backend dependencies.
ā Initialize Git.
ā Create a React frontend inside client/.
š Project Structure
`bash
myProject/
āāā client/ # React frontend (Generated using create-react-app)
āāā controllers/ # Business logic (MVC)
āāā models/ # Mongoose schemas
āāā routes/ # Express routes
āāā middleware/ # JWT authentication, logging, etc.
āāā config/ # Database connection
āāā utils/ # Helper functions
āāā tests/ # Test cases
āāā .gitignore # Ignoring unnecessary files
āāā .env # Environment variables
āāā package.json # Project metadata & scripts
āāā server.js # Express server entry point
āāā README.md # Project documentation
`
š Available Scripts
Inside your generated project, you can run:
š¹ Start Backend Server
`sh
npm start
`
š¹ Start React Frontend
`sh
cd client
npm start
`
š¹ Run Both Backend & Frontend Together
`sh
npm run dev
`
š¹ Install Frontend Dependencies
`sh
npm run install-client
`
š¹ Build Frontend for Production
`sh
npm run build
`
ā Configuration
Before running the project, configure your .env file:
`ini
MONGODB_URI=mongodb://localhost:27017/your-database
JWT_SECRET=your-secret-key
PORT=5000
`
š Dependencies
$3
- Express.js
- Mongoose
- Morgan
- Helmet
- Compression
- Cors
- Dotenv
- JWT Authentication
$3
- Nodemon
- Concurrently
š Contributing
Contributions are welcome! Follow these steps:
1. Fork this repository.
2. Create a feature branch:
`sh
git checkout -b feature-newFeature
`
3. Commit your changes:
`sh
git commit -m "feat: add new feature"
`
4. Push to your branch:
`sh
git push origin feature-newFeature
``