Skip to content

Repository files navigation

Market Backend Project

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.

Table of Contents

Introduction

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.

Features

Customer Features:

  • 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.

Seller Features:

  • User Authentication:

    • Register a new seller account (signup).
    • Log in to an existing seller account (login).
  • Product Management:

    • Add new products for sale.

Technologies Used

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.

Installation

To get started with the E-Commerce Backend Project, follow these steps:

  1. Clone the repository:
 git clone https://github.com/Mohamed22198/Market.git
  1. Navigate to the project directory:
cd Market 
  1. Install the required dependencies:
npm install
  1. Set up your MongoDB database and update the configuration in config.json.

Usage

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.

API Endpoints

Customer Endpoints:

  • 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.

Seller Endpoints:

  • 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.

Contributing

Contributions to this project are welcome! If you'd like to contribute, please follow the Contributing Guidelines.

License

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.

About

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages