Skip to content

Commit

Permalink
ci: add README
Browse files Browse the repository at this point in the history
  • Loading branch information
bruderj15 committed Jan 6, 2025
1 parent 904d63f commit d99fd87
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Monolith E-Commerce Demo

This repository provides a minimal example showcasing the Monolith-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](https://github.com/Beleg-6-EAP/Belegarbeit).

## Get running

Either run the docker image via plain docker:
```bash
bash> sudo docker build -t demo-monolith-ecommerce .
bash> sudo docker run -p 8080:8080 demo-monolith-ecommerce
```
or with the given `docker-compose`:
```bash
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`:

```json
{
"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!

0 comments on commit d99fd87

Please sign in to comment.