A robust backend API for an e-commerce platform built with Node.js, Express, and Mongoose, featuring user authentication (JWT), product catalog management, brand administration, order processing, and real-time order status updates via Socket.io.
- User Registration and Sign-In
- Viewing, Adding & Deleting of Products
- Viewing Products by Brand
- Viewing, Adding, Updating & Deleting Brands
- Customer Order Requests
- Viewing, Adding & Updating of Orders
- Change of Order Status by Admins
- Real time updates on order shipping status for customers
- User Profile Viewing
| Only admins are allowed to access the POST, PUT and DELETE brand endpoints |
- Node.js
- Express.js
- Mongoose
- MongoDB Atlas
- Socket.io
- Clone the repository
git clone git@github.com:njaumatilda/E-Commerce-API.git- Navigate to the project directory
cd E-Commerce-API- Install dependencies
npm install- Configure environment variables
To run this project, you will need to create a .env file in the project directory and make sure it is included in the .gitignore file. Configure the following environment variables:
DB_URL = your-db-url
PORT = your-port
SALT = your-salt
JWT_KEY = your-secret-keyReplace:
your-db-urlwith your specified db url,
your-portwith your specified port,
your-saltwith your specified salt and
your-secret-keywith your specified secret key
- Start the server
npm startHere is the reference on the usage of the API: API Documentation
The API has been deployed to a publicly accessible endpoint on Render: Live URL