A complete E-commerce backend built using Node.js, Express.js, and MongoDB, featuring session-based authentication, user management, and CRUD operations for products, carts, and orders.
- 🧠 Session-Based Authentication – Secure user login and session handling
- 👤 User Management – Register, login, and manage users
- 🛍️ Product Management – Add, update, delete, and fetch products
- 🛒 Cart System – Add, update, and remove items from the cart
- 📦 Order Management – Place and retrieve orders from cart items
- 🖼️ Image Uploads – Handled with Multer
- 🔐 Middleware Authorization – Protects routes for users and admins
- ⚙️ Error Handling – Proper validation and error responses
| Technology | Description |
|---|---|
| Node.js | JavaScript runtime environment |
| Express.js | Backend web framework |
| MongoDB | NoSQL database |
| Mongoose | ODM library for MongoDB |
| Multer | Middleware for handling file uploads |
| Express-Session | For session-based authentication |
🔐 Authentication Overview
This project uses session-based authentication. When a user logs in, a session is created and stored on the server, allowing secure and persistent user state across routes — without using JWT.
--🧠 Future Improvements--
🔑 Add JWT authentication option 💳 Integrate payment gateway (Stripe / Razorpay) 📈 Add analytics and admin dashboard 🧰 Develop a frontend using React or Next.js
✨ Author
[linasliyakath] 💼 https://www.linkedin.com/in/linasliyakath/