ecommerce Backend is a Node.js + Express-based backend service designed to power scalable web and mobile applications. The project follows a modular architecture with clear separation of concerns (controllers, services, routes, models, and configurations). It includes authentication, database integration, third-party services, and API documentation support.
This repository represents a production-ready backend setup with best practices for security, configuration management, and extensibility.
-
Runtime: Node.js
-
Framework: Express.js
-
Database: MongoDB (Mongoose)
-
Authentication: Passport.js (JWT-based)
-
API Documentation: Swagger (swagger-ui-express)
-
Cloud & Integrations:
- AWS SDK
- Firebase Admin SDK
-
Utilities & Tools:
- Nodemon (development)
- Jest & Supertest (testing)
- Multer (file uploads)
- Bcrypt (password hashing)
Ecommerce-backend/
├── app.js # Express app configuration
├── bin/www # Server bootstrap
├── package.json # Dependencies and scripts
├── src/
│ ├── config/ # DB, Firebase, Passport, and app configs
│ ├── constants/ # Reusable constants
│ ├── controller/ # Request handlers
│ ├── middleware/ # Custom middlewares (auth, validation, etc.)
│ ├── model/ # Mongoose schemas and models
│ ├── routes/ # API route definitions
│ ├── services/ # Business logic layer
│ ├── utils/ # Helper and utility functions
│ └── validations/ # Request validation logic
└── README.md
- RESTful API architecture
- JWT-based authentication & authorization
- Secure password hashing with bcrypt
- MongoDB integration using Mongoose
- File upload handling with Multer
- Firebase integration for notifications / auth support
- AWS SDK integration
- Environment-based configuration using dotenv
- Swagger-based API documentation
- Activity & event tracking utilities
Swagger UI is enabled for easy API exploration.
http://localhost:<PORT>/api-docs