How wazimughal/ca2-enterprise-architecture works
This repository implements a small checkout system composed of a gateway and pricing, inventory, and checkout services. The principal workflow is a client request to the gateway, forwarding to checkout, then separate price and stock lookups; checkout calculates the total, records an audit row in PostgreSQL, and returns the result. Pricing and inventory use in-memory SKU data, and the services expose health and Prometheus metrics endpoints. The README is only a title; these relationships come from the sampled service code, while Kubernetes manifests indicate deployment configuration but do not establish additional runtime calls.
Main entry points: k8s Kubernetes resources · checkout/app.py Checkout handler · gateway/app.py API gateway · pricing/app.py Pricing lookup
Components 10
Request entry
- API gateway
gateway/app.py
Checkout services
- Checkout handler
checkout/app.py - Pricing lookup
pricing/app.py - Stock lookup
inventory/app.py - Price list
pricing/app.py - Stock data
inventory/app.py
Persistence
- Audit table
checkout/app.py - PostgreSQL
k8s/postgres-deployment.yaml
Deployment
Other components
- Client
Connections 14
- Client → API gateway: submits checkout
- API gateway → Checkout handler: forwards request
- Checkout handler → Pricing lookup: requests price
- Pricing lookup → Price list: reads price
- Checkout handler → Stock lookup: checks stock
- Stock lookup → Stock data: reads quantity
- Checkout handler → PostgreSQL: saves audit
- PostgreSQL → Audit table: stores row
- API gateway → Client: returns response
- Kubernetes resources → API gateway: deploys service
- Kubernetes resources → Checkout handler: deploys service
- Kubernetes resources → Pricing lookup: deploys service
- Kubernetes resources → Stock lookup: deploys service
- Kubernetes resources → PostgreSQL: deploys database