ibrinfotech-mern
v1.0.0
Published
A CLI tool to create MERN stack projects with FAANG company standards and best practices
Maintainers
Readme
ibrinfotech-mern
A powerful CLI tool to create MERN stack projects with FAANG company standards and best practices. This package automatically clones the MERN Project Standard repository and sets up a complete development environment.
🚀 Features
- Interactive CLI: User-friendly command-line interface with prompts
- Automatic Setup: Clones the MERN template and configures it for your project
- Best Practices: Follows FAANG company standards and modern development practices
- Complete Stack: Includes frontend (React) and backend (Express.js) setup
- Modern Tools: React 18, TypeScript-ready, Tailwind CSS, Zustand, React Query
- Authentication: JWT-based authentication system
- Code Quality: ESLint, Prettier, and modern coding standards
📦 Installation
Global Installation (Recommended)
npm install -g ibrinfotech-mernLocal Installation
npm install ibrinfotech-mern🎯 Usage
Interactive Mode (Default)
ibrinfotech-mernThis will start an interactive session where you'll be prompted for:
- Project name
- Confirmation to proceed
Programmatic Usage
const { createProject } = require('ibrinfotech-mern');
// Create a new project
await createProject('my-awesome-app', '/path/to/projects');🔧 What Gets Created
When you run the tool, it will:
- Clone the Repository: Downloads the latest MERN template from GitHub
- Setup Project Structure: Creates the project directory and organizes files
- Customize Configuration: Updates package.json and README with your project name
- Remove Git History: Starts fresh without the template's git history
- Generate Documentation: Creates a comprehensive README for your project
📁 Project Structure
your-project-name/
├── frontend/ # React application
│ ├── src/
│ ├── public/
│ ├── package.json
│ └── ...
├── backend/ # Express.js server
│ ├── src/
│ ├── routes/
│ ├── middleware/
│ ├── package.json
│ └── ...
├── package.json # Root package.json with scripts
└── README.md # Project documentation🛠️ Available Scripts
After project creation, you can use these commands:
Installation
npm run install:all # Install all dependencies
npm run install:frontend # Install frontend dependencies only
npm run install:backend # Install backend dependencies onlyDevelopment
npm run dev # Start both servers
npm run dev:frontend # Start frontend only
npm run dev:backend # Start backend onlyProduction
npm run build # Build frontend
npm run start # Start production backend🌟 Tech Stack
Frontend
- React 18 with functional components and hooks
- TypeScript-ready architecture
- Tailwind CSS for utility-first styling
- Zustand for lightweight state management
- React Query for server state management
- React Router for navigation
- React Hook Form for form handling
- Axios for API integration
Backend
- Express.js framework
- MongoDB with Mongoose ODM
- JWT Authentication with refresh tokens
- Middleware for validation and security
- RESTful API design
- Error handling and logging
Development Tools
- ESLint and Prettier for code quality
- Nodemon for backend development
- Hot reload for frontend development
- Cross-env for environment variables
📝 Environment Variables
Frontend (.env)
REACT_APP_API_URL=http://localhost:5000/apiBackend (.env)
NODE_ENV=development
PORT=5000
MONGODB_URI=mongodb://localhost:27017/your-database
JWT_SECRET=your-jwt-secret
JWT_EXPIRES_IN=7d🚀 Quick Start Guide
Install the package:
npm install -g ibrinfotech-mernCreate a new project:
ibrinfotech-mernFollow the prompts:
- Enter your project name
- Confirm the creation
Navigate to your project:
cd your-project-nameInstall dependencies:
npm run install:allStart development:
npm run devAccess your application:
- Frontend: http://localhost:3000
- Backend: http://localhost:5000
🔍 Troubleshooting
Common Issues
Port already in use:
- Frontend: Change port in
frontend/package.jsonscripts - Backend: Change port in
.envfile
- Frontend: Change port in
MongoDB connection issues:
- Ensure MongoDB is running
- Check connection string in backend
.env
Dependencies issues:
- Run
npm run clean:installto clean and reinstall
- Run
Git clone errors:
- Check your internet connection
- Ensure you have git installed
Getting Help
- Check the console for error messages
- Review the browser console for frontend issues
- Check the terminal for backend server logs
- Ensure all environment variables are set correctly
🤝 Contributing
We welcome contributions! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Built on top of the MERN Project Standard template
- Inspired by modern development practices and FAANG company standards
- Community contributions and feedback
📞 Support
- GitHub Issues: Report bugs or request features
- Documentation: MERN Project Standard
- Email: Contact IBR Infotech for enterprise support
Made with ❤️ by IBR Infotech
Empowering developers to build better applications with modern tools and best practices.
