Skip to content

Latest commit

 

History

History
91 lines (65 loc) · 1.79 KB

README.md

File metadata and controls

91 lines (65 loc) · 1.79 KB

LinkedIn

E-Commerce CQRS Implementation

About The Project

CQRS implementation for product domain. The project consists of two microservices
i. product-command-service
ii. product-query-service

Built With

  • SpringBoot 3.3.2
  • SpringData JPA
  • Postgres
  • Docker

Port Configuration

  • product-command-service: 9090
  • product-query-service: 9091
  • product-command-db: 5433
  • product-query-db: 5432
  • kafka: 29092

Architecture

Alt text

Getting Started

Prerequisites

Make sure you have Docker and Docker Compose installed on your machine.

  • Docker
  • Docker Compose

Check docker is installed

docker --version

Installing

Clone the repository:

git clone https://github.com/aatifansari/E-commerce-CQRS-Implementation
cd E-commerce CQRS Implementation

Setup with Docker Compose

To start the application, run:

docker-compose up -d

This command will build the necessary Docker images (if they don't exist) and start the containers in detached mode.

Stopping the Application

To stop the application and remove the containers, run:

docker-compose down

Usage

  • Add product

    curl --location 'http://localhost:9090/products/save' \
    --header 'Content-Type: application/json' \
    --data '{
    "name" : "Fridge",
    "description" : "LG",
    "price" : 99999.99
    }'
  • Get All Product

    curl --location 'http://localhost:9091/products'