Skip to content

About

The project implements the CQRS (Command Query Responsibility Segregation) microservice design pattern in the context of the product domain.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

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'

About

The project implements the CQRS (Command Query Responsibility Segregation) microservice design pattern in the context of the product domain.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages