This project is an e-commerce marketplace API built with Node.js, Express.js, and MongoDB using Mongoose. It provides functionality for users, sellers, catalogs, products, and orders. Buyers and sellers can register, manage catalogs, create orders, and more.
Before you begin, ensure you have the following software installed on your system:
- Node.js: Download and install from nodejs.org.
- MongoDB: Download and install from mongodb.com.
- Clone this repository to your local machine:
git clone https://github.com/Seudonym/UL-Assignment.git
- Navigate into the repository's folder:
cd UL-Assignment
- Install dependencies
npm install
- Run
npm start
Your API should now be running at https://localhost:3000/
-
Register a User:
- Endpoint:
POST /api/auth/register
- Description: Allows users to register.
- Endpoint:
-
User Login:
- Endpoint:
POST /api/auth/login
- Description: Allows registered users to log in.
- Endpoint:
-
Get List of Sellers:
- Endpoint:
GET /api/buyer/list-of-sellers
- Description: Retrieve a list of all sellers.
- Endpoint:
-
Get Seller's Catalog:
- Endpoint:
GET /api/buyer/seller-catalog/:seller_id
- Description: Get the catalog of a specific seller by
seller_id
.
- Endpoint:
-
Create Order:
- Endpoint:
POST /api/buyer/create-order/:seller_id
- Description: Allows buyers to create an order for a specific seller with
seller_id
.
- Endpoint:
-
Create a Catalog:
- Endpoint:
POST /api/seller/create-catalog
- Description: Sellers can create a catalog of items.
- Endpoint:
-
Retrieve Seller's Orders:
- Endpoint:
GET /api/seller/orders
- Description: Retrieve the list of orders received by a seller.
- Endpoint:
For more detailed information on these API endpoints, please refer to the project's source code.