1.0.4 • Published 5 months ago

ameen-mvc v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

šŸš€ ameen-mvc - A Modern MERN Stack CLI Generator

A CLI tool to generate a modern, Windows-compatible MERN stack project with MVC architecture.

šŸ“– Overview

ameen-mvc is a simple and efficient CLI tool to generate a MERN (MongoDB, Express.js, React, Node.js) stack project with a clean MVC architecture. It helps developers set up a full-stack project within seconds.

✨ Features

āœ… MERN Stack Ready - Generates a full-stack project with backend and frontend.

āœ… MVC Architecture - Organized file structure for scalability.

āœ… Windows-Compatible - Ensures smooth setup on Windows.

āœ… Pre-configured Scripts - Includes development, production, and deployment scripts.

āœ… Authentication Middleware - JWT-based authentication setup included.

āœ… MongoDB Configuration - Pre-set for database connection with .env support.

āœ… Git Initialization - Initializes a Git repository for easy version control.

šŸ› ļø Installation

To install the CLI globally on your system, run:

npm install -g ameen-mvc

šŸš€ Usage

To create a new MERN project, run:

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

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

npm start

šŸ”¹ Start React Frontend

cd client
npm start

šŸ”¹ Run Both Backend & Frontend Together

npm run dev

šŸ”¹ Install Frontend Dependencies

npm run install-client

šŸ”¹ Build Frontend for Production

npm run build

āš™ Configuration

Before running the project, configure your .env file:

MONGODB_URI=mongodb://localhost:27017/your-database
JWT_SECRET=your-secret-key
PORT=5000

šŸ›  Dependencies

Backend

  • Express.js
  • Mongoose
  • Morgan
  • Helmet
  • Compression
  • Cors
  • Dotenv
  • JWT Authentication

Development Tools

  • Nodemon
  • Concurrently

šŸ™Œ Contributing

Contributions are welcome! Follow these steps:

  1. Fork this repository.
  2. Create a feature branch:
    git checkout -b feature-newFeature
  3. Commit your changes:
    git commit -m "feat: add new feature"
  4. Push to your branch:
    git push origin feature-newFeature
  5. Open a Pull Request.

šŸ“œ License

This project is licensed under the MIT License - feel free to use and modify it!

⭐ Show Some Love

If you found this tool useful, please ⭐ star this repository on GitHub! 😊

šŸ”— GitHub Repo: ameen-mvc)

šŸ”— NPM Package: ameen-mvc)

Thank you for using ameen-mvc! šŸŽ‰

1.0.4

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago