Skip to content

Welcome to Store Management API, a Node.js and MongoDB-based RESTful API designed for managing products, orders, and users in an online shop setting. Explore essential features such as product CRUD operations, order processing, user authentication, and file uploads. Simplify e-commerce development with Store Management API.

Notifications You must be signed in to change notification settings

Apsara1505/Store-Management-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Store Management API

This project is a RESTful API built with Node.js and MongoDB to manage products, orders, and users for a online store.

Getting Started

To get started with the project, follow these instructions:

Prerequisites

  • Node.js and npm installed on your machine
  • MongoDB installed and running locally or accessible remotely

Installation

  • Clone the repository to your local machine:

    git clone
  • Install dependencies:

    cd folderName
    npm install
  • Configure environment variables:

  • Create a .env file in the root directory of the project and specify the following environment variables:

    PORT=3000
    MONGO_URI= your_mongodb_uri
  • Run the server:

    npm start

Usage

Once the server is running, you can access the API endpoints using tools like Postman. Here are the available endpoints:

  • /products: Endpoint to manage products (GET, POST)
  • /products/{productId}: Endpoint to get, update, or delete a product by ID (GET, PATCH, DELETE)
  • /orders: Endpoint to manage orders (GET, POST)
  • /orders/{orderId}: Endpoint to get or delete an order by ID (GET, DELETE)
  • /users/signup: Endpoint to register a new user (POST)
  • /users/login: Endpoint to authenticate a user and generate a JWT token (POST)
  • /users/{userId}: Endpoint to delete a user by ID (DELETE)

Make sure to include the required authentication token in the headers for protected routes.

Built With

  • Node.js - JavaScript runtime environment
  • Express.js - Web application framework for Node.js
  • MongoDB - NoSQL database
  • JWT - JSON Web Tokens for user authentication
  • Multer - Middleware for handling multipart/form-data (file uploads)

Author

Apsara De Silva

THANK YOU ❤️

About

Welcome to Store Management API, a Node.js and MongoDB-based RESTful API designed for managing products, orders, and users in an online shop setting. Explore essential features such as product CRUD operations, order processing, user authentication, and file uploads. Simplify e-commerce development with Store Management API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published