# nisa2003-ops/cloudops-platform architecture

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

- Interactive diagram: https://gitdiagram.com/nisa2003-ops/cloudops-platform
- Repository: https://github.com/nisa2003-ops/cloudops-platform

## Overview

CloudOps combines a FastAPI reliability API with AWS provisioning, automated delivery, and operations observability. The user-to-result path begins with a developer push, passes through GitHub Actions and image deployment, and ends at the running API; Terraform provisions the cloud foundation, while Prometheus and Grafana support operational visibility. Within the API, routing delegates health, readiness, and chaos behavior to the reliability service, while middleware records request metrics. Connections for infrastructure, CI/CD, and monitoring are based on README descriptions; their implementation details were not sampled.

Main entry points: [`app/main.py`](https://github.com/nisa2003-ops/cloudops-platform/blob/main/app/main.py) (FastAPI Service), [`.github/workflows`](https://github.com/nisa2003-ops/cloudops-platform/tree/main/.github/workflows) (GitHub Actions), [`terraform/environments`](https://github.com/nisa2003-ops/cloudops-platform/tree/main/terraform/environments) (Terraform Environments), [`app/routes/api.py`](https://github.com/nisa2003-ops/cloudops-platform/blob/main/app/routes/api.py) (API Routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_delivery["Release Automation"]
  node_actions["GitHub Actions<br/>[workflows]"]
  node_container["Container Image"]
end

subgraph group_provisioning["Cloud Provisioning"]
  node_iam{{"AWS IAM Role"}}
  node_terraform["Terraform Environments"]
  node_tfmodules["Terraform Modules"]
  node_bootstrap[("Terraform Bootstrap")]
  node_ecr[("Amazon ECR")]
  node_ec2["EC2 Host"]
end

subgraph group_runtime["API Runtime"]
  node_api["FastAPI Service<br/>[main.py]"]
  node_config["Application Settings<br/>[config.py]"]
  node_routes["API Routes<br/>[api.py]"]
  node_reliability["Reliability Service<br/>[reliability.py]"]
end

subgraph group_operations["Observability and SRE"]
  node_prometheus["Prometheus"]
  node_grafana["Grafana Dashboards"]
  node_runbooks["SRE Runbooks"]
end

node_developer(("Developer"))

node_developer -->|"pushes code"| node_actions
node_actions -->|"federates via OIDC"| node_iam
node_actions -->|"pushes image"| node_ecr
node_ecr -->|"supplies image"| node_ec2
node_ec2 -->|"runs"| node_api
node_terraform -.->|"uses modules"| node_tfmodules
node_terraform -.->|"provisions host"| node_ec2
node_terraform -.->|"provisions registry"| node_ecr
node_bootstrap -.->|"supports state"| node_terraform
node_actions -.->|"builds image"| node_container
node_api -->|"loads settings"| node_config
node_api -->|"mounts routes"| node_routes
node_api -->|"applies latency"| node_reliability
node_routes -->|"delegates probes"| node_reliability
node_prometheus -.->|"scrapes metrics"| node_api
node_grafana -.->|"visualizes telemetry"| node_prometheus
node_runbooks -.->|"guides recovery"| node_api

click node_actions "https://github.com/nisa2003-ops/cloudops-platform/tree/main/.github/workflows"
click node_terraform "https://github.com/nisa2003-ops/cloudops-platform/tree/main/terraform/environments"
click node_tfmodules "https://github.com/nisa2003-ops/cloudops-platform/tree/main/terraform/modules"
click node_bootstrap "https://github.com/nisa2003-ops/cloudops-platform/tree/main/terraform/bootstrap"
click node_container "https://github.com/nisa2003-ops/cloudops-platform/blob/main/Dockerfile"
click node_api "https://github.com/nisa2003-ops/cloudops-platform/blob/main/app/main.py"
click node_config "https://github.com/nisa2003-ops/cloudops-platform/blob/main/app/config.py"
click node_routes "https://github.com/nisa2003-ops/cloudops-platform/blob/main/app/routes/api.py"
click node_reliability "https://github.com/nisa2003-ops/cloudops-platform/blob/main/app/services/reliability.py"
click node_prometheus "https://github.com/nisa2003-ops/cloudops-platform/tree/main/monitoring/prometheus"
click node_grafana "https://github.com/nisa2003-ops/cloudops-platform/tree/main/monitoring/grafana"
click node_runbooks "https://github.com/nisa2003-ops/cloudops-platform/tree/main/docs/incidents"

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_actions,node_container toneBlue
class node_iam,node_terraform,node_tfmodules,node_bootstrap,node_ecr,node_ec2 toneAmber
class node_api,node_config,node_routes,node_reliability toneMint
class node_prometheus,node_grafana,node_runbooks toneRose
class node_developer toneIndigo
```

## Components

### Release Automation

- [GitHub Actions](https://github.com/nisa2003-ops/cloudops-platform/tree/main/.github/workflows): `.github/workflows`
- [Container Image](https://github.com/nisa2003-ops/cloudops-platform/blob/main/Dockerfile): `Dockerfile`

### Cloud Provisioning

- **AWS IAM Role**
- [Terraform Environments](https://github.com/nisa2003-ops/cloudops-platform/tree/main/terraform/environments): `terraform/environments`
- [Terraform Modules](https://github.com/nisa2003-ops/cloudops-platform/tree/main/terraform/modules): `terraform/modules`
- [Terraform Bootstrap](https://github.com/nisa2003-ops/cloudops-platform/tree/main/terraform/bootstrap): `terraform/bootstrap`
- **Amazon ECR**
- **EC2 Host**

### API Runtime

- [FastAPI Service](https://github.com/nisa2003-ops/cloudops-platform/blob/main/app/main.py): `app/main.py`
- [Application Settings](https://github.com/nisa2003-ops/cloudops-platform/blob/main/app/config.py): `app/config.py`
- [API Routes](https://github.com/nisa2003-ops/cloudops-platform/blob/main/app/routes/api.py): `app/routes/api.py`
- [Reliability Service](https://github.com/nisa2003-ops/cloudops-platform/blob/main/app/services/reliability.py): `app/services/reliability.py`

### Observability and SRE

- [Prometheus](https://github.com/nisa2003-ops/cloudops-platform/tree/main/monitoring/prometheus): `monitoring/prometheus`
- [Grafana Dashboards](https://github.com/nisa2003-ops/cloudops-platform/tree/main/monitoring/grafana): `monitoring/grafana`
- [SRE Runbooks](https://github.com/nisa2003-ops/cloudops-platform/tree/main/docs/incidents): `docs/incidents`

### Other components

- **Developer**

## Connections

- Developer → GitHub Actions: pushes code (evidence: `README.md`)
- GitHub Actions → AWS IAM Role: federates via OIDC (evidence: `README.md`)
- GitHub Actions → Amazon ECR: pushes image (evidence: `README.md`)
- Amazon ECR → EC2 Host: supplies image (evidence: `README.md`)
- EC2 Host → FastAPI Service: runs (evidence: `README.md`)
- Terraform Environments → Terraform Modules: uses modules (evidence: `README.md`)
- Terraform Environments → EC2 Host: provisions host (evidence: `README.md`)
- Terraform Environments → Amazon ECR: provisions registry (evidence: `README.md`)
- Terraform Bootstrap → Terraform Environments: supports state (evidence: `README.md`)
- GitHub Actions → Container Image: builds image (evidence: `README.md`)
- FastAPI Service → Application Settings: loads settings (evidence: `app/main.py`)
- FastAPI Service → API Routes: mounts routes (evidence: `app/main.py`)
- FastAPI Service → Reliability Service: applies latency (evidence: `app/main.py`)
- API Routes → Reliability Service: delegates probes (evidence: `app/routes/api.py`)
- Prometheus → FastAPI Service: scrapes metrics (evidence: `README.md`)
- Grafana Dashboards → Prometheus: visualizes telemetry (evidence: `README.md`)
- SRE Runbooks → FastAPI Service: guides recovery (evidence: `README.md`)
