A full-fledged production-ready E-commerce Backend API built with Node.js, Express.js, MongoDB, and modern backend architecture.
This project provides secure authentication, product management, cart system, wishlist, orders, payments, admin panel, image uploads, and email notifications.
- User Registration & Login
- JWT Authentication
- Password Hashing with bcrypt
- Role-based Authorization (User / Admin)
- Profile Management
- Google Login Integration
- Add Products
- Update Products
- Delete Products
- Get All Products
- Get Single Product
- Category-wise Filtering
- Product Image Uploads
- Cloudinary Integration
- Add to Cart
- Update Quantity
- Remove from Cart
- View Cart
- Add to Wishlist
- Remove from Wishlist
- Get Wishlist Products
- Place Order
- Order History
- Order Status Tracking
- Admin Order Management
- Razorpay Integration
- Secure Payment Flow
- Email Notifications using Nodemailer
- Order Confirmation Mail
- User Notifications
- Users Data
- Orders Data
- Revenue Stats
- Product Analytics
| Technology | Usage |
|---|---|
| Node.js | Backend Runtime |
| Express.js | Server Framework |
| MongoDB | Database |
| Mongoose | ODM |
| JWT | Authentication |
| bcryptjs | Password Security |
| Razorpay | Payments |
| Cloudinary | Image Storage |
| Nodemailer | Emails |
| dotenv | Environment Variables |
bash Ecom_Backend/ │── config/ │ ├── cloudinary.js │ └── db.config.js │ │── controllers/ │ ├── admin.controllers.js │ ├── cart.controllers.js │ ├── dashboard.controller.js │ ├── google.controller.js │ ├── order.controllers.js │ ├── product.controllers.js │ ├── user.controllers.js │ └── wishlist.controllers.js │ │── middlewares/ │ └── auth.middleware.js │ │── models/ │ ├── cart.model.js │ ├── order.model.js │ ├── product.model.js │ ├── review.model.js │ └── user.model.js │ │── routes/ │ ├── adminRoutes.js │ ├── cartRoutes.js │ ├── dashboardRoutes.js │ ├── googleRoutes.js │ ├── orderRoutes.js │ ├── productRoutes.js │ ├── userRoutes.js │ └── wishlistRoutes.js │ │── uploads/ │── utils/ │── app.js │── package.json
Installation Process
git clone https://github.com/Samadali123/Ecom_Backend.git cd Ecom_Backend
**Dependecies Installation npm install
Dot env fike PORT=5000
MONGO_URI=your_mongodb_connection JWT_SECRET=your_secret_key RAZORPAY_KEY=your_key RAZORPAY_SECRET=your_secret CLOUDINARY_NAME=your_name CLOUDINARY_KEY=your_key CLOUDINARY_SECRET=your_secret EMAIL_USER=your_email EMAIL_PASS=your_password PORT=5000 RAZORPAY_KEY=your_key RAZORPAY_SECRET=your_secret CLOUDINARY_NAME=your_name CLOUDINARY_KEY=your_key CLOUDINARY_SECRET=your_secret
** Run Server ** npm start
👨💻 Author Syed Samad Ali
GitHub: https://github.com/Samadali123 LinkedIn: https://linkedin.com/in/syedsamad125
If you like this project, give it a ⭐ on GitHub.