Skip to content

Kotlin Spring Boot Application for demonstrating Microkernel Architecture in E-Commerce

License

Notifications You must be signed in to change notification settings

Beleg-6-EAP/demo-microkernel-ecommerce

Repository files navigation

Static Badge Static Badge Maven Build & Tests

Microkernel E-Commerce Demo

This repository provides a minimal example showcasing the Microkernel-Architecture in an E-Commerce setting. This setting includes orders, payment and shipping.

This demo is part of an article on Enterprise Architecture-Patterns. The article, including the complete explanation of the E-Commerce-Example, can be found here.

Get running

Either run the docker image via plain docker:

bash> sudo docker build -t demo-microkernel-ecommerce .
bash> sudo docker run -p 8080:8080 demo-microkernel-ecommerce  

or with the given docker-compose:

bash> sudo docker-compose up

Either will start a web-server running on http://localhost:8080 with the following endpoints:

  • CreateOrder: POST /api/orders
  • AllOrders: GET /api/orders
  • AllPayments: GET /api/payments
  • AllShipments: GET /api/shipments

We start with en empty database. To create an order POST below request to http://localhost:8080/api/orders:

{
    "userId": "1234-5678-8765-4321",
    "amount": 42.0,
    "status": "New"
}

This will initiate payment as well as shipment.

It's success can be checked by requesting the other endpoints via GET.

Troubleshooting

If there is any trouble or if you have any questions, feel free to open an issue!

About

Kotlin Spring Boot Application for demonstrating Microkernel Architecture in E-Commerce

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published