Welcome to the E-Commerce Backend Project! This project provides the backend infrastructure for an e-commerce application built using Node.js, MongoDB, and several essential Node.js packages. It is designed to facilitate collaboration with frontend developers who can utilize this backend to build a full-fledged e-commerce platform.
The E-Commerce Backend Project serves as the foundation for an e-commerce platform, offering key functionalities for both customers and sellers. It includes user authentication, product management, cart functionality, and more. By leveraging this backend, frontend developers can focus on creating a visually appealing and user-friendly frontend, while the backend logic is already in place.
-
User Authentication:
- Register a new customer account (signup).
- Log in to an existing customer account (login).
- Update customer profile information.
-
Shopping Cart:
- Add products to the shopping cart.
- View the contents of the shopping cart.
- Rate products.
-
User Authentication:
- Register a new seller account (signup).
- Log in to an existing seller account (login).
-
Product Management:
- Add new products for sale.
This project utilizes the following technologies and packages:
- Node.js: A JavaScript runtime environment for server-side development.
- Express.js: A web application framework for Node.js, simplifying routing and middleware.
- bcrypt.js: A library for hashing and salting passwords, enhancing security.
- config.json: Configuration management for application settings.
- JSON Web Token (JWT): For user authentication and authorization.
- Joi: A validation library for ensuring the correctness of user inputs.
- MongoDB: A NoSQL database for storing user and product data.
To get started with the E-Commerce Backend Project, follow these steps:
- Clone the repository:
git clone https://github.com/Mohamed22198/Market.git- Navigate to the project directory:
cd Market - Install the required dependencies:
npm install- Set up your MongoDB database and update the configuration in
config.json.
To use this backend for your e-commerce application, you can create the frontend and connect it to these endpoints. The API endpoints are described in the API Endpoints section below.
- POST
/api/customer/signup: Register a new customer account. - POST
/api/customer/login: Log in to a customer account. - PUT
/api/customer/update-profile: Update customer profile information. - GET
/api/customer/profile: View Customer Profile. - POST
/api/customer/add-to-cart: Add a product to the shopping cart. - GET
/api/customer/view-cart: View the contents of the shopping cart. - POST
/api/customer/rate-product: Rate a product.
- POST
/api/seller/signup: Register a new seller account. - POST
/api/seller/login: Log in to a seller account. - POST
/api/seller/add-product: Add a new product for sale.
Please refer to the API documentation for more details on request and response formats.
Contributions to this project are welcome! If you'd like to contribute, please follow the Contributing Guidelines.
This project is licensed under the MIT License. See the LICENSE file for details.
Thank you for considering the E-Commerce Backend Project for your e-commerce application. If you have any questions or need further assistance, please don't hesitate to contact us.