A system built with Node.js, supporting:
- JWT-based authentication
- MongoDB & MySQL support
- Jobs, queues, logging, migrations, and seeders
- Multi-environment config (dev, SIT, UAT, production)
- PM2 process manager with clustering support
- 🔐 JWT Login / Authentication / Authorization
- 🗃️ Database abstraction (MySQL / MongoDB)
- 🧩 Modular service structure
- 📦 Job Queue system
- 📝 Daily log rotation with Winston
- 🧪 Environment-specific configs
- ⚙️ PM2 process management (dev/prod modes)
- 📁 Migrations and Seeders support
├── src/
│ ├── app.js # Entry point
│ ├── config/
│ ├── models/
│ ├── services/
│ ├── middlewares
│ ├── Repositories/
│ ├── routes/
│ ├── jobs/
│ ├── utils/
├── ecosystem.json
├── .env
You can create
.env.sit,.env.uat,.env.productionetc. for environment-specific setups.
pm2 start ecosystem.json --only NODE-DEVnpm run dev # Start app in dev mode (nodemon or pm2 --watch)
npm run migrate # Run DB migrations
npm run seed # Seed initial dataLogs are handled via winston:
- Console logs in development
- Daily rotated log files in
logs/directory - QUse as: Log.info("") [replace(info,warn,error)]