# jefflenard007-jj/reliability-platform architecture

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

- Interactive diagram: https://gitdiagram.com/jefflenard007-jj/reliability-platform
- Repository: https://github.com/jefflenard007-jj/reliability-platform

## Overview

This repository is a cloud-native reliability platform centered on a small orders API. The user workflow is to submit or retrieve orders through the service; the platform also exposes health, metrics, logs, and runtime fault injection. Those signals feed monitoring and alerting, while Terraform, Helm, and Argo CD support deployment to AWS EKS. The graph preserves the README’s documented SLO, dashboard, chaos, and incident-response capabilities. Several platform links are documented in the README rather than sampled implementation, so their edges cite it; unsampled internals are represented only at supported directory paths.

Main entry points: [`app/src/main.py`](https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py) (FastAPI service), [`local/prometheus`](https://github.com/jefflenard007-jj/reliability-platform/tree/main/local/prometheus) (Prometheus SLOs), [`local/promtail`](https://github.com/jefflenard007-jj/reliability-platform/tree/main/local/promtail) (Promtail), [`local`](https://github.com/jefflenard007-jj/reliability-platform/tree/main/local) (Loki)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_service["Orders service"]
  node_api["FastAPI service<br/>[main.py]"]
  node_orders["Order endpoints<br/>[main.py]"]
  node_orderstore[("In-memory orders<br/>[main.py]")]
  node_probes["Health probes<br/>[main.py]"]
  node_chaos["Chaos controls<br/>[main.py]"]
  node_telemetry["RED metrics<br/>[main.py]"]
  node_jsonlogs["JSON logging<br/>[main.py]"]
end

subgraph group_observability["Observability"]
  node_prometheus["Prometheus SLOs"]
  node_alertmanager["Alertmanager"]
  node_grafana["Grafana dashboards"]
  node_promtail["Promtail"]
  node_loki[("Loki")]
end

subgraph group_delivery["Platform delivery"]
  node_terraform["AWS infrastructure"]
  node_eks["AWS EKS"]
  node_helm["Kubernetes chart"]
  node_argocd["Argo CD app"]
end

subgraph group_reliability["Reliability practice"]
  node_experiments["Chaos experiments<br/>[run_experiments.sh]"]
  node_runbooks["Incident runbooks"]
  node_postmortems["Postmortem template<br/>[TEMPLATE.md]"]
end

node_customer(("API client"))
node_operator(("Platform operator"))

node_customer -->|"sends requests"| node_api
node_api -->|"routes orders"| node_orders
node_api -->|"serves probes"| node_probes
node_api -->|"serves controls"| node_chaos
node_orders -->|"reads/writes"| node_orderstore
node_api -->|"records requests"| node_telemetry
node_api -->|"writes logs"| node_jsonlogs
node_api -->|"scrapes metrics"| node_prometheus
node_api -->|"emits JSON logs"| node_promtail
node_promtail -->|"ships logs"| node_loki
node_prometheus -->|"sends alerts"| node_alertmanager
node_prometheus -->|"provides metrics"| node_grafana
node_loki -->|"provides logs"| node_grafana
node_operator -->|"provisions"| node_terraform
node_terraform -->|"creates cluster"| node_eks
node_argocd -->|"syncs chart"| node_helm
node_helm -->|"deploys service"| node_eks
node_experiments -->|"injects faults"| node_chaos
node_runbooks -->|"guides response"| node_operator
node_operator -->|"documents incidents"| node_postmortems

click node_api "https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py"
click node_orders "https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py"
click node_orderstore "https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py"
click node_probes "https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py"
click node_chaos "https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py"
click node_telemetry "https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py"
click node_jsonlogs "https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py"
click node_prometheus "https://github.com/jefflenard007-jj/reliability-platform/tree/main/local/prometheus"
click node_alertmanager "https://github.com/jefflenard007-jj/reliability-platform/tree/main/local/alertmanager"
click node_grafana "https://github.com/jefflenard007-jj/reliability-platform/tree/main/local/grafana"
click node_promtail "https://github.com/jefflenard007-jj/reliability-platform/tree/main/local/promtail"
click node_loki "https://github.com/jefflenard007-jj/reliability-platform/tree/main/local"
click node_terraform "https://github.com/jefflenard007-jj/reliability-platform/tree/main/terraform"
click node_helm "https://github.com/jefflenard007-jj/reliability-platform/tree/main/helm/shop-api"
click node_argocd "https://github.com/jefflenard007-jj/reliability-platform/blob/main/argocd/shop-api-application.yaml"
click node_experiments "https://github.com/jefflenard007-jj/reliability-platform/blob/main/chaos/run_experiments.sh"
click node_runbooks "https://github.com/jefflenard007-jj/reliability-platform/tree/main/runbooks"
click node_postmortems "https://github.com/jefflenard007-jj/reliability-platform/blob/main/postmortems/TEMPLATE.md"

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_api,node_orders,node_orderstore,node_probes,node_chaos,node_telemetry,node_jsonlogs,node_customer toneBlue
class node_prometheus,node_alertmanager,node_grafana,node_promtail,node_loki toneAmber
class node_terraform,node_eks,node_helm,node_argocd toneMint
class node_experiments,node_runbooks,node_postmortems toneRose
class node_operator toneIndigo
```

## Components

### Orders service

- [FastAPI service](https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py): `app/src/main.py`
- [Order endpoints](https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py): `app/src/main.py`
- [In-memory orders](https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py): `app/src/main.py`
- [Health probes](https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py): `app/src/main.py`
- [Chaos controls](https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py): `app/src/main.py`
- [RED metrics](https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py): `app/src/main.py`
- [JSON logging](https://github.com/jefflenard007-jj/reliability-platform/blob/main/app/src/main.py): `app/src/main.py`

### Observability

- [Prometheus SLOs](https://github.com/jefflenard007-jj/reliability-platform/tree/main/local/prometheus): `local/prometheus`
- [Alertmanager](https://github.com/jefflenard007-jj/reliability-platform/tree/main/local/alertmanager): `local/alertmanager`
- [Grafana dashboards](https://github.com/jefflenard007-jj/reliability-platform/tree/main/local/grafana): `local/grafana`
- [Promtail](https://github.com/jefflenard007-jj/reliability-platform/tree/main/local/promtail): `local/promtail`
- [Loki](https://github.com/jefflenard007-jj/reliability-platform/tree/main/local): `local`

### Platform delivery

- [AWS infrastructure](https://github.com/jefflenard007-jj/reliability-platform/tree/main/terraform): `terraform`
- **AWS EKS**
- [Kubernetes chart](https://github.com/jefflenard007-jj/reliability-platform/tree/main/helm/shop-api): `helm/shop-api`
- [Argo CD app](https://github.com/jefflenard007-jj/reliability-platform/blob/main/argocd/shop-api-application.yaml): `argocd/shop-api-application.yaml`

### Reliability practice

- [Chaos experiments](https://github.com/jefflenard007-jj/reliability-platform/blob/main/chaos/run_experiments.sh): `chaos/run_experiments.sh`
- [Incident runbooks](https://github.com/jefflenard007-jj/reliability-platform/tree/main/runbooks): `runbooks`
- [Postmortem template](https://github.com/jefflenard007-jj/reliability-platform/blob/main/postmortems/TEMPLATE.md): `postmortems/TEMPLATE.md`

### Other components

- **API client**
- **Platform operator**

## Connections

- API client → FastAPI service: sends requests (evidence: `README.md`)
- FastAPI service → Order endpoints: routes orders (evidence: `app/src/main.py`)
- FastAPI service → Health probes: serves probes (evidence: `app/src/main.py`)
- FastAPI service → Chaos controls: serves controls (evidence: `app/src/main.py`)
- Order endpoints → In-memory orders: reads/writes (evidence: `app/src/main.py`)
- FastAPI service → RED metrics: records requests (evidence: `app/src/main.py`)
- FastAPI service → JSON logging: writes logs (evidence: `app/src/main.py`)
- FastAPI service → Prometheus SLOs: scrapes metrics (evidence: `README.md`)
- FastAPI service → Promtail: emits JSON logs (evidence: `README.md`)
- Promtail → Loki: ships logs (evidence: `README.md`)
- Prometheus SLOs → Alertmanager: sends alerts (evidence: `README.md`)
- Prometheus SLOs → Grafana dashboards: provides metrics (evidence: `README.md`)
- Loki → Grafana dashboards: provides logs (evidence: `README.md`)
- Platform operator → AWS infrastructure: provisions (evidence: `README.md`)
- AWS infrastructure → AWS EKS: creates cluster (evidence: `README.md`)
- Argo CD app → Kubernetes chart: syncs chart (evidence: `README.md`)
- Kubernetes chart → AWS EKS: deploys service (evidence: `README.md`)
- Chaos experiments → Chaos controls: injects faults (evidence: `README.md`)
- Incident runbooks → Platform operator: guides response (evidence: `README.md`)
- Platform operator → Postmortem template: documents incidents (evidence: `README.md`)
