Skip to content

MicroShop is a scalable e-commerce backend built with Node.js, Express, and MongoDB, following a microservices architecture. This project demonstrates the separation of concerns by dividing the application into distinct services for handling products, users, and orders.

Notifications You must be signed in to change notification settings

babaie774/MicroMall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MicroShop - A Microservices-Based E-Commerce Backend

MicroShop is a scalable backend application for e-commerce, built using Node.js, Express, and MongoDB. This project follows a microservices architecture, splitting the system into three distinct services: Product Service, User Service, and Order Service.

Table of Contents

Features

  • Microservices Architecture: Modular and scalable structure with separate services for products, users, and orders.
  • RESTful APIs: CRUD operations for products, user management, and order processing.
  • JWT Authentication: Secure user authentication and authorization.
  • MongoDB Integration: Persistent data storage with Mongoose ORM.
  • Dockerized Services: Simplified deployment with Docker and Docker Compose.
  • Unit & Integration Testing: Ensure reliability through automated tests.

Architecture

The application consists of three microservices, each responsible for different aspects of the e-commerce platform. The services communicate with each other via RESTful APIs (or optionally through message queues).

Services Overview

1. Product Service

  • Manages product data (CRUD operations)
  • Routes:
    • POST /products: Create a new product
    • GET /products: Fetch all products
    • GET /products/:id: Fetch a single product by ID
    • PUT /products/:id: Update a product by ID
    • DELETE /products/:id: Delete a product by ID

2. User Service

  • Handles user registration, authentication, and profile management
  • Routes:
    • POST /register: Register a new user
    • POST /login: Login a user and receive a JWT token
    • GET /profile: Get user profile (JWT protected)

3. Order Service

  • Manages order creation and retrieval for authenticated users
  • Routes:
    • POST /orders: Create a new order (JWT protected)
    • GET /orders: Get all orders for the authenticated user (JWT protected)

Prerequisites

  • Node.js (version 14.x or higher)
  • MongoDB (Local instance or cloud service)
  • Docker (optional, for containerization)
  • Postman or similar tool for API testing

About

MicroShop is a scalable e-commerce backend built with Node.js, Express, and MongoDB, following a microservices architecture. This project demonstrates the separation of concerns by dividing the application into distinct services for handling products, users, and orders.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published