Skip to content

A comprehensive e-commerce backend application built with Node.js, Express, and MongoDB. It provides RESTful API endpoints for user authentication, managing shopping carts, handling orders, and managing products.

Notifications You must be signed in to change notification settings

SzymonWilczewski/StoreRestApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Store REST API

A comprehensive e-commerce backend application built with Node.js, Express, and MongoDB. It provides RESTful API endpoints for user authentication, managing shopping carts, handling orders, and managing products.

Built With

        

Requirements

Installation

All commands must be executed in the project's root directory

Clone the repository:

  git clone https://github.com/SzymonWilczewski/StoreRestApi.git
  cd StoreRestApi

Verify that you have Docker CLI installed on your system:

  docker version

Depending on the environment version that you want to start type:

  docker compose --profile dev up

or

  docker compose --profile prod up

or

  docker compose --profile test up

The application should now be running on http://localhost:5000.

Endpoints

  • Authentication:

    • POST /register: Create a new user.
    • POST /login: Initiate a login session.
    • POST /logout: Terminate an existing login session.
    • PUT /change-password: Change the user's password.
  • Shopping Cart:

    • GET /cart: Retrieve the user's shopping cart.
    • POST /cart/product/:id: Add a product to the shopping cart.
    • DELETE /cart/product/:id: Remove a product from the shopping cart.
  • Orders:

    • GET /orders/:id: Retrieve an order by ID.
    • POST /orders: Create a new order.
    • PUT /orders/:id: Update an existing order.
    • PATCH /orders/:id: Modify an existing order.
    • DELETE /orders/:id: Delete an order.
  • Products:

    • GET /products: Retrieve all products.
    • GET /products/:id: Retrieve a product by ID.
    • POST /products: Create a new product.
    • PUT /products/:id: Update an existing product.
    • PATCH /products/:id: Modify an existing product.
    • DELETE /products/:id: Delete a product.
  • Users:

    • GET /users: Retrieve all users (admin only).
    • GET /users/:id: Retrieve a user by ID.
    • PATCH /users/:id: Modify a user's information.
    • DELETE /users/:id: Delete a user (admin only).

About

A comprehensive e-commerce backend application built with Node.js, Express, and MongoDB. It provides RESTful API endpoints for user authentication, managing shopping carts, handling orders, and managing products.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published