ShopSphere is a backend service for an e-commerce platform built with Node.js, Express.js, and MongoDB. It provides RESTful APIs for user authentication, product management, order processing, and payment integration using Zarinpal.
- User authentication with JWT
- Product and category management
- Shopping cart and checkout system
- Secure payment integration with Zarinpal
- Image upload support with AWS S3
- Job queue processing using BullMQ
- Security enhancements: Rate limiting, CORS handling, and request logging
- Node.js & Express.js - Backend Framework
- MongoDB - Database
- Mongoose - ORM for database management
- AWS S3 - File storage solution
- BullMQ - Queue management for background jobs
- Zarinpal - Payment gateway integration
- Docker - Containerized deployment
git clone https://github.com/ErfanAlaeii/ShopSphere.git
cd ShopSphere npm installCreate a .env file and configure the following:
PORT=5000
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=yourpassword
DB_NAME=shopsphere
AWS_ACCESS_KEY_ID=your_aws_key
AWS_SECRET_ACCESS_KEY=your_aws_secret
AWS_REGION=your_aws_region
ZARINPAL_MERCHANT_ID=your_zarinpal_idnpx Mongoose-cli db:migrate npm run devServer will run on http://localhost:5000
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/signup |
Register a new user |
| POST | /api/auth/login |
User login |
| GET | /api/products |
Fetch all products |
| POST | /api/orders |
Create a new order |
| POST | /api/payment |
Process payment via Zarinpal |
To deploy using Docker, build and run the container:
docker build -t shopsphere-backend .
docker run -p 5000:5000 shopsphere-backendThis project is licensed under the MIT License.
Feel free to fork this repository and submit pull requests!
If you have any questions, reach out via:
- GitHub: ErfanAlaeii
- Email: erfanalaei2001@gmail.com