Skip to content

owaishkhumar/e-commerce-web-api-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E Commerce Rest-Api using Nodejs & MongoDB

Overview

This project is a RESTful API for an e-commerce platform built using Node.js and MongoDB. It provides endpoints for user authentication, product management, shopping cart operations, and order processing. The API is designed to be scalable, secure, and efficient.

Table of Content

  • Features
  • Technologies Used
  • API Endpoints
  • Contact

Features

Certainly! A RESTful API for e-commerce typically involves a variety of features to support the functionalities of an online shopping platform. Here's a list of common features for an e-commerce RESTful API:

1) User Authentication and Authorization:

  • User Registration: Allowing users to create accounts by - providing necessary details.
  • User Login: Authenticating users and providing access tokens for secure interactions.

2) Product Management:

  • Product Listing: Retrieving a list of available products.
  • Product Details: Getting detailed information about a specific product.
  • Product Creation: Adding new products to the inventory.
  • Product Update and Deletion: Modifying existing product details and removing products from the inventory.
  • Image Upload for Products: Allowing users to upload images for product representation.

3) Category Management:

  • Category Listing: Retrieving a list of available product categories.
  • Category Details: Getting detailed information about a specific category.
  • Category Creation: Adding new product categories.
  • Category Update and Deletion: Modifying existing category details and removing categories.

4) Order Processing:

  • Place Order: Allowing users to place a new order.
  • Order Details: Retrieving details about a specific order.
  • Order Listing: Getting a list of all placed orders.
  • Update Order Status: Modifying the status of an order (e.g., processing, shipped, delivered).

5) Security:

  • Token-based Authentication: Using tokens (JWT) to secure API endpoints.
  • Password Hashing: Storing passwords securely using hashing algorithms.

Technologies Used

  • Node.js: Backend development using JavaScript runtime.
  • Express.js: Fast, unopinionated, minimalist web framework for Node.js.
  • MongoDB: NoSQL database for scalable and flexible data storage.
  • JSON Web Token (JWT): For secure authentication and authorization.
  • Bcrypt: Password hashing library for enhanced security.
  • Multer: Middleware for handling file uploads, used for image upload functionality.

API Endpoints

Routes

Products

    GET         /api/v1/products
    GET         /api/v1/products/:id
    POST        /api/v1/products
    PUT         /api/v1/products/:id
    DELETE      /api/v1/products/:id
    PUT         /api/v1/products/gallery-images/:id
    GET         /api/v1/products/get/featured/:count
    GET         /api/v1/products/get/count

Category

    GET      /api/v1/category
    GET      /api/v1/category/:id
    POST     /api/v1/category
    PUT      /api/v1/category/:id
    DELETE   /api/v1/category/:id

Orders

    GET      /api/v1/order
    GET      /api/v1/order/:id
    POST     /api/v1/order
    PUT      /api/v1/order/:id
    DELETE   /api/v1/order/:id
    GET      /api/v1/order/get/count

User

    GET      /api/v1/users
    GET      /api/v1/users/:id
    POST     /api/v1/users
    PUT      /api/v1/users/:id
    DELETE   /api/v1/users/:id
    GET      /api/v1/users/get/count

Register new user

    POST     /api/v1/users/register

Login user

    POST     /api/v1/users/login

Contact

About

This repository contains the source code for an e-commerce web API developed using Node.js and MongoDB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors