This is the backend for the Brandora e-commerce platform. It provides RESTful APIs for managing products, materials, orders, and users. Built with Node.js, Express, and MongoDB.
- Firebase JWT Authentication
- Role-based access control (Seller and Customer)
- Order management with automatic stock deduction
- Product and material CRUD operations
- Swagger UI for API documentation
- MongoDB aggregation for seller analytics
- Image uploads via Multer
cd backend_engine
npm installCreate a .env file in the backend_engine directory based on .env.example.
You will need a MongoDB URI and a Firebase serviceAccountKey.json file.
You can easily populate the database with test data (users, products, orders):
npm run seednpm run devThe server will start on port 8080.
Once the server is running, open your browser and navigate to:
http://localhost:8080/api-docs
Here you can test all the endpoints.
- Node.js & Express
- MongoDB & Mongoose
- Firebase Admin SDK
- Joi (Validation)
- Helmet & Express Rate Limit (Security)
