Skip to content

AyariAhmed/springboot-microservices-cqrs-event-sourcing

Repository files navigation

Prerequisites to run the project:

Spin up the development environment through: docker-compose up -d

Start the project through starting all the defined microservices (starting with config-server)

API documentation:

  • Add product
POST http://localhost:8080/command/create

Request Body:

  {
    "ref": "string",
    "name": "string",
    "description": "string",
    "price": "number",
    "quantity": "integer"
  }
  • Buy Product
POST http://localhost:8080/command/buy/<product-ref>
  • Refill Product
POST http://localhost:8080/query/
  • Get All Products
GET http://localhost:8080/command/refill/<product-ref>?quantity=<quantity>
  • Get Product by reference
GET http://localhost:8080/query/<product-ref>
  • Clear query database
DELETE localhost:8080/query/purge
  • Clear command database
DELETE localhost:8080/command/purge

Application Architecture

cqrs

Service registry (Eureka server)

Screen Shot 2022-01-31 at 3 02 33 AM

Config Server

Github repository containing the microservices configuration.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages