Fast, secure, and maintainable REST API for an e-commerce backend built with Node.js, Express, MongoDB/Mongoose, Joi validation, JWT auth with refresh rotation, Redis caching/queues (ioredis), Socket.IO for realtime events, and express-fileupload for media uploads.
Author: Boolean
- Runtime: Node.js 20+
- Web: Express 4
- DB: MongoDB 7+ with Mongoose 8
- Cache/Queue: Redis 7+ with ioredis
- Auth: JWT (access + refresh rotation)
- Validation: Joi 17
- Realtime: Socket.IO 4
- Uploads: express-fileupload
- Config: dotenv
- User registration/login/logout with access/refresh JWT
- Role-based access (user/admin) via middleware
- Products, Categories, Carts, Orders endpoints
- Inventory & price management
- File uploads for product images
- Caching for read-heavy endpoints (e.g., product lists)
- Soft error handling with consistent JSON shape
- Realtime order status updates over Socket.IO
- Production-ready project structure and ENV config