# itzaadiiiii/eks-project-realtime-mimic architecture

> Architecture diagram of the GitHub repository itzaadiiiii/eks-project-realtime-mimic, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/itzaadiiiii/eks-project-realtime-mimic
- Repository: https://github.com/itzaadiiiii/eks-project-realtime-mimic

## Overview

This is a Go ecommerce application deployed as microservices. A customer browses products and submits an order through the API gateway; the order service records it and emits work to a queue. A worker coordinates inventory reservation, payment, order confirmation, notification, and shipping, while the dashboard exposes order and operational status. The graph preserves the documented workflow and the major services. Some service-to-service and queue behavior is documented or visible in excerpts; unsampled consumer, gateway, and infrastructure details are not inferred.

Main entry points: [`services/api-gateway/main.go`](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/api-gateway/main.go) (API gateway), [`services/worker/main.go`](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/worker/main.go) (Order worker), [`kubernetes/database/postgres/statefullset.yaml`](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/kubernetes/database/postgres/statefullset.yaml) (PostgreSQL), [`services/order-service/main.go`](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/order-service/main.go) (Order service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Customer access"]
  node_gateway["API gateway<br/>[main.go]"]
  node_dashboard["Dashboard API<br/>[main.go]"]
  node_dashboard_ui["Dashboard UI<br/>[index.html]"]
end

subgraph group_commerce["Commerce services"]
  node_inventory["Inventory service<br/>[main.go]"]
  node_orders["Order service<br/>[main.go]"]
  node_payments["Payment service<br/>[main.go]"]
  node_shipping["Shipping service<br/>[main.go]"]
  node_notifications["Notification service<br/>[main.go]"]
end

subgraph group_operations["Background processing"]
  node_worker["Order worker<br/>[main.go]"]
  node_scheduler["Scheduler<br/>[main.go]"]
end

subgraph group_state["Application state"]
  node_queue["SQS queue"]
  node_postgres[("PostgreSQL<br/>[statefullset.yaml]")]
  node_redis[("Redis<br/>[statefullset.yaml]")]
end

node_customer(("Customer"))

node_customer -->|"browses and orders"| node_gateway
node_gateway -->|"routes requests"| node_orders
node_gateway -->|"routes requests"| node_inventory
node_gateway -->|"routes requests"| node_payments
node_gateway -->|"routes requests"| node_notifications
node_gateway -->|"routes requests"| node_shipping
node_gateway -->|"routes requests"| node_dashboard
node_customer -->|"views status"| node_dashboard_ui
node_dashboard_ui -.->|"loads dashboard"| node_dashboard
node_orders -->|"publishes order events"| node_queue
node_payments -->|"publishes payment events"| node_queue
node_shipping -->|"publishes shipment events"| node_queue
node_queue -.->|"feeds order work"| node_worker
node_worker -->|"reserves or releases"| node_inventory
node_worker -->|"requests payment"| node_payments
node_worker -->|"updates order status"| node_orders
node_worker -->|"requests notification"| node_notifications
node_worker -->|"creates shipment"| node_shipping
node_orders -->|"reads and writes"| node_postgres
node_inventory -->|"reads and writes"| node_postgres
node_payments -->|"reads and writes"| node_postgres
node_shipping -->|"reads and writes"| node_postgres
node_notifications -->|"reads and writes"| node_postgres
node_dashboard -->|"reads metrics"| node_postgres
node_scheduler -->|"queries and updates"| node_postgres
node_gateway -->|"uses rate limiting"| node_redis

click node_gateway "https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/api-gateway/main.go"
click node_dashboard "https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/dashboard-api/main.go"
click node_dashboard_ui "https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/dashboard-api/static/index.html"
click node_inventory "https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/inventory-service/main.go"
click node_orders "https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/order-service/main.go"
click node_payments "https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/payment-service/main.go"
click node_shipping "https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/shipping-service/main.go"
click node_notifications "https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/notification-service/main.go"
click node_worker "https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/worker/main.go"
click node_scheduler "https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/scheduler/main.go"
click node_postgres "https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/kubernetes/database/postgres/statefullset.yaml"
click node_redis "https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/kubernetes/database/redis/statefullset.yaml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gateway,node_dashboard,node_dashboard_ui toneBlue
class node_inventory,node_orders,node_payments,node_shipping,node_notifications toneAmber
class node_worker,node_scheduler toneMint
class node_queue,node_postgres,node_redis toneRose
class node_customer toneIndigo
```

## Components

### Customer access

- [API gateway](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/api-gateway/main.go): `services/api-gateway/main.go`
- [Dashboard API](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/dashboard-api/main.go): `services/dashboard-api/main.go`
- [Dashboard UI](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/dashboard-api/static/index.html): `services/dashboard-api/static/index.html`

### Commerce services

- [Inventory service](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/inventory-service/main.go): `services/inventory-service/main.go`
- [Order service](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/order-service/main.go): `services/order-service/main.go`
- [Payment service](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/payment-service/main.go): `services/payment-service/main.go`
- [Shipping service](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/shipping-service/main.go): `services/shipping-service/main.go`
- [Notification service](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/notification-service/main.go): `services/notification-service/main.go`

### Background processing

- [Order worker](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/worker/main.go): `services/worker/main.go`
- [Scheduler](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/services/scheduler/main.go): `services/scheduler/main.go`

### Application state

- **SQS queue**
- [PostgreSQL](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/kubernetes/database/postgres/statefullset.yaml): `kubernetes/database/postgres/statefullset.yaml`
- [Redis](https://github.com/itzaadiiiii/eks-project-realtime-mimic/blob/main/kubernetes/database/redis/statefullset.yaml): `kubernetes/database/redis/statefullset.yaml`

### Other components

- **Customer**

## Connections

- Customer → API gateway: browses and orders (evidence: `README.md`)
- API gateway → Order service: routes requests (evidence: `services/api-gateway/main.go`)
- API gateway → Inventory service: routes requests (evidence: `services/api-gateway/main.go`)
- API gateway → Payment service: routes requests (evidence: `services/api-gateway/main.go`)
- API gateway → Notification service: routes requests (evidence: `services/api-gateway/main.go`)
- API gateway → Shipping service: routes requests (evidence: `services/api-gateway/main.go`)
- API gateway → Dashboard API: routes requests (evidence: `services/api-gateway/main.go`)
- Customer → Dashboard UI: views status (evidence: `README.md`)
- Dashboard UI → Dashboard API: loads dashboard
- Order service → SQS queue: publishes order events (evidence: `services/order-service/main.go`)
- Payment service → SQS queue: publishes payment events (evidence: `services/payment-service/main.go`)
- Shipping service → SQS queue: publishes shipment events (evidence: `services/shipping-service/main.go`)
- SQS queue → Order worker: feeds order work (evidence: `README.md`)
- Order worker → Inventory service: reserves or releases (evidence: `services/worker/main.go`)
- Order worker → Payment service: requests payment (evidence: `services/worker/main.go`)
- Order worker → Order service: updates order status (evidence: `services/worker/main.go`)
- Order worker → Notification service: requests notification (evidence: `services/worker/main.go`)
- Order worker → Shipping service: creates shipment (evidence: `services/worker/main.go`)
- Order service → PostgreSQL: reads and writes (evidence: `services/order-service/main.go`)
- Inventory service → PostgreSQL: reads and writes (evidence: `services/inventory-service/main.go`)
- Payment service → PostgreSQL: reads and writes (evidence: `services/payment-service/main.go`)
- Shipping service → PostgreSQL: reads and writes (evidence: `services/shipping-service/main.go`)
- Notification service → PostgreSQL: reads and writes (evidence: `services/notification-service/main.go`)
- Dashboard API → PostgreSQL: reads metrics (evidence: `services/dashboard-api/main.go`)
- Scheduler → PostgreSQL: queries and updates (evidence: `services/scheduler/main.go`)
- API gateway → Redis: uses rate limiting (evidence: `services/api-gateway/main.go`)
