Skip to content

e commerce project demonstrating the use of redis, mongo db, nest js to manage stock and checkout process

Notifications You must be signed in to change notification settings

nnamdei/ecommerce

Repository files navigation

E-Commerce Web Service

This E-Commerce Web Service allows users to:

  • Create an account
  • Login and obtain an access token
  • Create, view, and update a store
  • Create, view, and update products for a store
  • Add products to a cart with specified quantities
  • Checkout items in the cart

Getting Started

Prerequisites

Before you begin, ensure that you have the following installed:

  • Node.js (version 14.x or later)
  • npm (Node package manager)

Setup Instructions

  1. Clone the repository:

    git clone <repository-url>
    cd <project-folder>
  2. Create an environment configuration:

    • Copy the .env.example file to .env:
      cp .env.example .env
    • Open the .env file and replace the values with your environment-specific configurations (such as database URI, JWT secret, etc.).
  3. Install dependencies:

    • Run the following command to install required packages:
      npm install
  4. Run the application in development mode:

    • Start the server with the following command:
      npm run start:dev
    • The application will be running on http://localhost:3000.
  5. Access the API Documentation:

    • Open your web browser and visit the following URL to view the API documentation:
      http://localhost:3000/docs
      

Available API Endpoints

Refer to the API documentation for detailed information about available endpoints and their usage. The documentation will provide you with the necessary details to interact with the service, including the request body, parameters, and response format.


Additional Information

  • Authentication: You can log in to the application using your credentials, which will return an access token. This token should be used to authenticate subsequent API requests by including it in the Authorization header as Bearer <token>.

  • Database: The application connects to a MongoDB database specified in the .env file. Make sure your database service is up and running.

Notes

  • The application is designed to handle typical e-commerce operations such as managing products, stores, and carts. It also supports basic authentication using JWT tokens.
  • Ensure you review and set proper environment variables in the .env file before running the app.

By following the steps above, you should be able to set up and run the e-commerce web service locally for development purposes. For production deployments, additional configurations may be necessary, such as configuring a production database, enabling SSL, or setting up environment-specific variables.

About

e commerce project demonstrating the use of redis, mongo db, nest js to manage stock and checkout process

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published