Skip to content

Demo e-commerce microservices backend project using ports & adapters architecture

License

Notifications You must be signed in to change notification settings

ariel-tchougang/demo-clean-architecture-springboot

Repository files navigation

Demo e-commerce microservices application

Using Hexagonal (Ports & Adapters) Architecture & TDD

This application is composed of 5 microservices serving specific purposes:

  • user-microservice: with REST endpoints for user management (add new user, fetch user details, get orders by userId)
  • order-microservice: with REST endpoints for order management (create new order, get status, get status change history)
  • inventory-microservice: with REST endpoint for inventory management (check stock for a list of items)
  • payment-microservice: to process orders payment
  • shipment-microservice: with REST endpoint for shipment management (create a new shipment, check shipment status, check status change history, update shipment status)

Technologies used:

  • Java 17
  • Spring boot 3.0.5
  • Lombok
  • Maven
  • DynamoDB Local (docker container amazon/dynamodb-local:latest)
  • RabbitMQ as communication broker (docker container bitnami/rabbitmq:latest)
  • org.testcontainers
  • Junit 5

Installing / Getting started

Start RabbitMQ

$ docker pull bitnami/rabbitmq:latest
$ docker run --name rabbitmq bitnami/rabbitmq:latest

More info at (https://hub.docker.com/r/bitnami/rabbitmq)

Default web interface: http://localhost:15672/

  • username: user
  • password: bitnami

Start DynamoDB Local

$ docker pull amazon/dynamodb-local:latest
$ docker run --name dynamodb-local -p 8000:8000 amazon/dynamodb-local -jar DynamoDBLocal.jar -sharedDb

Run each application separately

  • For user-microservice: UserApplication
  • For order-microservice: OrderApplication
  • For inventory-management: InventoryApplication
  • For payment-microservice: PaymentApplication
  • For shipment-microservice: ShipmentApplication

Use Swagger-ui to access each microservice

http://[microservice-host]:[port]/swagger-ui.html

About

Demo e-commerce microservices backend project using ports & adapters architecture

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages