# danangelo6/eks-microservices-platform architecture

> Architecture diagram of the GitHub repository danangelo6/eks-microservices-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/danangelo6/eks-microservices-platform
- Repository: https://github.com/danangelo6/eks-microservices-platform

## Overview

This repository is an AWS EKS platform hosting a sample product-order application. A client reaches the gateway, which routes product and order requests; order creation checks product stock before recording an order. Terraform provisions the network, cluster, container registry, and cluster add-ons, while Kubernetes manifests define the services and monitoring configuration. Prometheus/Grafana/Loki provide the documented observability stack. The application source excerpts show the gateway and order-service calls; broader platform and monitoring connections are documented in the README, not verified from their implementation files.

Main entry points: [`terraform/modules/eks`](https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/eks) (EKS cluster), [`terraform/modules/monitoring`](https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/monitoring) (Prometheus stack), [`services/gateway/src/app.js`](https://github.com/danangelo6/eks-microservices-platform/blob/main/services/gateway/src/app.js) (API gateway), [`terraform/modules/ecr`](https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/ecr) (Image registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform["AWS platform"]
  node_vpc["VPC networking"]
  node_eks["EKS cluster"]
  node_ecr[("Image registry")]
  node_addons["Cluster add-ons"]
end

subgraph group_services["Application services"]
  node_gateway["API gateway<br/>[app.js]"]
  node_orders["Orders API<br/>[app.js]"]
  node_products["Products catalog<br/>[app.js]"]
  node_gw_config["Gateway runtime<br/>[server.js]"]
  node_orders_config["Orders runtime<br/>[server.js]"]
  node_products_config["Products runtime<br/>[server.js]"]
  node_k8s_gateway["Gateway deployment"]
  node_k8s_orders["Orders deployment"]
  node_k8s_products["Products deployment"]
end

subgraph group_observability["Observability"]
  node_prometheus["Prometheus stack"]
  node_monitoring_rules["Service alerts<br/>[alerts.yaml]"]
  node_dashboard["Grafana dashboard"]
  node_loki["Log aggregation"]
end

node_client(("API client"))
node_slack(("Slack alerts"))

node_client -->|"requests"| node_gateway
node_gateway -->|"proxies requests"| node_orders
node_gateway -->|"proxies requests"| node_products
node_orders -->|"checks product stock"| node_products
node_vpc -->|"hosts cluster"| node_eks
node_eks -->|"runs add-ons"| node_addons
node_eks -->|"runs workload"| node_k8s_gateway
node_eks -->|"runs workload"| node_k8s_orders
node_eks -->|"runs workload"| node_k8s_products
node_k8s_gateway -->|"deploys service"| node_gw_config
node_k8s_orders -->|"deploys service"| node_orders_config
node_k8s_products -->|"deploys service"| node_products_config
node_eks -->|"hosts monitoring"| node_prometheus
node_prometheus -->|"scrapes metrics"| node_gateway
node_prometheus -->|"scrapes metrics"| node_orders
node_prometheus -->|"scrapes metrics"| node_products
node_prometheus -->|"evaluates rules"| node_monitoring_rules
node_prometheus -->|"feeds dashboards"| node_dashboard
node_eks -->|"hosts logging"| node_loki
node_monitoring_rules -.->|"routes alerts"| node_slack
node_ecr -.->|"supplies images"| node_k8s_gateway
node_ecr -.->|"supplies images"| node_k8s_orders
node_ecr -.->|"supplies images"| node_k8s_products

click node_vpc "https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/vpc"
click node_eks "https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/eks"
click node_ecr "https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/ecr"
click node_addons "https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/addons"
click node_gateway "https://github.com/danangelo6/eks-microservices-platform/blob/main/services/gateway/src/app.js"
click node_orders "https://github.com/danangelo6/eks-microservices-platform/blob/main/services/orders/src/app.js"
click node_products "https://github.com/danangelo6/eks-microservices-platform/blob/main/services/products/src/app.js"
click node_gw_config "https://github.com/danangelo6/eks-microservices-platform/blob/main/services/gateway/src/server.js"
click node_orders_config "https://github.com/danangelo6/eks-microservices-platform/blob/main/services/orders/src/server.js"
click node_products_config "https://github.com/danangelo6/eks-microservices-platform/blob/main/services/products/src/server.js"
click node_k8s_gateway "https://github.com/danangelo6/eks-microservices-platform/tree/main/kubernetes/base/gateway"
click node_k8s_orders "https://github.com/danangelo6/eks-microservices-platform/tree/main/kubernetes/base/orders"
click node_k8s_products "https://github.com/danangelo6/eks-microservices-platform/tree/main/kubernetes/base/products"
click node_prometheus "https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/monitoring"
click node_monitoring_rules "https://github.com/danangelo6/eks-microservices-platform/blob/main/kubernetes/monitoring/alerts.yaml"
click node_dashboard "https://github.com/danangelo6/eks-microservices-platform/blob/main/kubernetes/monitoring/dashboard-microservices.json"
click node_loki "https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/monitoring"

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_vpc,node_eks,node_ecr,node_addons,node_client toneBlue
class node_gateway,node_orders,node_products,node_gw_config,node_orders_config,node_products_config,node_k8s_gateway,node_k8s_orders,node_k8s_products toneAmber
class node_prometheus,node_monitoring_rules,node_dashboard,node_loki toneMint
class node_slack toneIndigo
```

## Components

### AWS platform

- [VPC networking](https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/vpc): `terraform/modules/vpc`
- [EKS cluster](https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/eks): `terraform/modules/eks`
- [Image registry](https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/ecr): `terraform/modules/ecr`
- [Cluster add-ons](https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/addons): `terraform/modules/addons`

### Application services

- [API gateway](https://github.com/danangelo6/eks-microservices-platform/blob/main/services/gateway/src/app.js): `services/gateway/src/app.js`
- [Orders API](https://github.com/danangelo6/eks-microservices-platform/blob/main/services/orders/src/app.js): `services/orders/src/app.js`
- [Products catalog](https://github.com/danangelo6/eks-microservices-platform/blob/main/services/products/src/app.js): `services/products/src/app.js`
- [Gateway runtime](https://github.com/danangelo6/eks-microservices-platform/blob/main/services/gateway/src/server.js): `services/gateway/src/server.js`
- [Orders runtime](https://github.com/danangelo6/eks-microservices-platform/blob/main/services/orders/src/server.js): `services/orders/src/server.js`
- [Products runtime](https://github.com/danangelo6/eks-microservices-platform/blob/main/services/products/src/server.js): `services/products/src/server.js`
- [Gateway deployment](https://github.com/danangelo6/eks-microservices-platform/tree/main/kubernetes/base/gateway): `kubernetes/base/gateway`
- [Orders deployment](https://github.com/danangelo6/eks-microservices-platform/tree/main/kubernetes/base/orders): `kubernetes/base/orders`
- [Products deployment](https://github.com/danangelo6/eks-microservices-platform/tree/main/kubernetes/base/products): `kubernetes/base/products`

### Observability

- [Prometheus stack](https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/monitoring): `terraform/modules/monitoring`
- [Service alerts](https://github.com/danangelo6/eks-microservices-platform/blob/main/kubernetes/monitoring/alerts.yaml): `kubernetes/monitoring/alerts.yaml`
- [Grafana dashboard](https://github.com/danangelo6/eks-microservices-platform/blob/main/kubernetes/monitoring/dashboard-microservices.json): `kubernetes/monitoring/dashboard-microservices.json`
- [Log aggregation](https://github.com/danangelo6/eks-microservices-platform/tree/main/terraform/modules/monitoring): `terraform/modules/monitoring`

### Other components

- **API client**
- **Slack alerts**

## Connections

- API client → API gateway: requests (evidence: `README.md`)
- API gateway → Orders API: proxies requests (evidence: `services/gateway/src/app.js`)
- API gateway → Products catalog: proxies requests (evidence: `services/gateway/src/app.js`)
- Orders API → Products catalog: checks product stock (evidence: `services/orders/src/app.js`)
- VPC networking → EKS cluster: hosts cluster (evidence: `README.md`)
- EKS cluster → Cluster add-ons: runs add-ons (evidence: `README.md`)
- EKS cluster → Gateway deployment: runs workload (evidence: `README.md`)
- EKS cluster → Orders deployment: runs workload (evidence: `README.md`)
- EKS cluster → Products deployment: runs workload (evidence: `README.md`)
- Gateway deployment → Gateway runtime: deploys service (evidence: `README.md`)
- Orders deployment → Orders runtime: deploys service (evidence: `README.md`)
- Products deployment → Products runtime: deploys service (evidence: `README.md`)
- EKS cluster → Prometheus stack: hosts monitoring (evidence: `README.md`)
- Prometheus stack → API gateway: scrapes metrics (evidence: `README.md`)
- Prometheus stack → Orders API: scrapes metrics (evidence: `README.md`)
- Prometheus stack → Products catalog: scrapes metrics (evidence: `README.md`)
- Prometheus stack → Service alerts: evaluates rules (evidence: `README.md`)
- Prometheus stack → Grafana dashboard: feeds dashboards (evidence: `README.md`)
- EKS cluster → Log aggregation: hosts logging (evidence: `README.md`)
- Service alerts → Slack alerts: routes alerts (evidence: `README.md`)
- Image registry → Gateway deployment: supplies images (evidence: `README.md`)
- Image registry → Orders deployment: supplies images (evidence: `README.md`)
- Image registry → Products deployment: supplies images (evidence: `README.md`)
