create-puchi-balani
v1.0.0
Published
Quickly scaffold a production-ready Node.js/Express application with a clean, organized folder structure
Maintainers
Readme
create-puchi-balani
Quickly scaffold a production-ready Node.js/Express application with a clean, organized folder structure.
✨ Features
- 🚀 Quick Setup - Get started in seconds with a single command
- 📁 Organized Structure - Pre-configured folder structure following best practices
- 🔧 Modern Stack - Express.js, MongoDB/Mongoose, JWT, bcrypt, and more
- 🌍 CORS Enabled - Ready for cross-origin requests
- 🔐 Security Ready - JWT authentication and bcrypt password hashing included
- 📝 Environment Config - Built-in .env support with dotenv
- ✅ Health Checks - Pre-configured health check endpoint
- 🎯 Error Handling - Centralized error handling middleware
📦 Usage
Create a new Node.js project with one command:
npx create-puchi-balani my-awesome-appOr with npm:
npm create puchi-balani my-awesome-appThen navigate to your project and start coding:
cd my-awesome-app
npm run devYour server will be running at http://localhost:3000 🎉
📁 Generated Project Structure
my-awesome-app/
├── src/
│ ├── config/
│ │ └── db.js # MongoDB connection configuration
│ ├── controllers/ # Route controllers (business logic)
│ ├── middlewares/ # Custom middleware functions
│ ├── models/ # Database models (Mongoose schemas)
│ ├── routes/
│ │ └── index.js # API routes definition
│ ├── app.js # Express app setup & middleware
│ └── server.js # Server entry point
├── .env.example # Environment variables template
├── .gitignore # Git ignore rules
├── package.json # Dependencies and scripts
└── README.md # Project documentation🛠️ What's Included
The generated project comes with:
- Express.js - Fast, unopinionated web framework
- MongoDB/Mongoose - ODM for MongoDB (optional)
- JWT - JSON Web Tokens for authentication
- bcrypt - Password hashing
- dotenv - Environment variable management
- CORS - Cross-origin resource sharing
📝 Next Steps
After creating your project:
Configure Environment
cp .env.example .env # Edit .env with your configurationSet Up Database (if using MongoDB)
- Update
MONGODB_URIin.env - Uncomment
connectDB()insrc/server.js
- Update
Create Your Models
- Add Mongoose schemas in
src/models/
- Add Mongoose schemas in
Define Routes
- Add route handlers in
src/controllers/ - Register routes in
src/routes/
- Add route handlers in
Add Middleware
- Create custom middleware in
src/middlewares/
- Create custom middleware in
🚀 API Endpoints
Your new project includes:
GET /health- Health check endpointGET /api- Sample API root endpoint
🤝 Contributing
Contributions, issues, and feature requests are welcome!
📄 License
MIT © [Your Name]
🌟 Show Your Support
Give a ⭐️ if this project helped you!
Made with ❤️ for the Node.js community
