# gajjarvatsall/aws-devops-platform architecture

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

- Interactive diagram: https://gitdiagram.com/gajjarvatsall/aws-devops-platform
- Repository: https://github.com/gajjarvatsall/aws-devops-platform

## Overview

This repository combines a Flask staging service with reusable Terraform modules and a staging environment that composes them into an AWS platform. The main user workflow is requesting the dashboard or health APIs; readiness and status checks load database credentials and test MySQL, while the dashboard also queries live AWS resource status. Infrastructure relationships below follow the README’s documented module composition; sampled application code supports the runtime relationships. Terraform module internals were not sampled, so their detailed resource wiring is not expanded.

Main entry points: [`environments/staging/main.tf`](https://github.com/gajjarvatsall/aws-devops-platform/blob/main/environments/staging/main.tf) (Staging root), [`modules/autoscaling`](https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/autoscaling) (Application capacity), [`app/app.py`](https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py) (Flask service), [`modules/alb`](https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/alb) (Load balancer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_service["Application service"]
  node_app["Flask service<br/>[app.py]"]
  node_dashboard["Live dashboard<br/>[app.py]"]
  node_health["Liveness check<br/>[app.py]"]
  node_readiness["Readiness check<br/>[app.py]"]
  node_status["Status API<br/>[app.py]"]
  node_dbcheck["Database check<br/>[app.py]"]
  node_secrets["Secret provider<br/>[app.py]"]
  node_awscheck["AWS status checks<br/>[app.py]"]
end

subgraph group_environment["Staging environment"]
  node_staging["Staging root<br/>[main.tf]"]
end

subgraph group_modules["Infrastructure modules"]
  node_vpc["Network"]
  node_security["Security and IAM"]
  node_alb["Load balancer"]
  node_autoscaling["Application capacity"]
  node_rds[("Managed database")]
  node_ecr[("Image registry")]
  node_s3[("Log buckets")]
  node_cloudwatch[("Application logs")]
end

subgraph group_bootstrap["State bootstrap"]
  node_backend[("State backend<br/>[main.tf]")]
end

node_user(("HTTP client"))
node_secretsmanager[("Secrets Manager")]
node_mysql[("MySQL database")]
node_awsapis["AWS status APIs"]
node_operator(("Platform operator"))

node_user -->|"requests"| node_app
node_app -->|"routes"| node_dashboard
node_app -->|"routes"| node_health
node_app -->|"routes"| node_readiness
node_app -->|"routes"| node_status
node_readiness -->|"checks database"| node_dbcheck
node_status -->|"checks database"| node_dbcheck
node_dashboard -->|"checks database"| node_dbcheck
node_dbcheck -->|"loads credentials"| node_secrets
node_secrets -->|"fetches secret"| node_secretsmanager
node_dbcheck -->|"tests connection"| node_mysql
node_dashboard -->|"reads live status"| node_awscheck
node_awscheck -->|"queries resources"| node_awsapis
node_operator -->|"deploys"| node_staging
node_staging -->|"composes"| node_vpc
node_staging -->|"composes"| node_security
node_staging -->|"composes"| node_alb
node_staging -->|"composes"| node_autoscaling
node_staging -->|"composes"| node_rds
node_staging -->|"composes"| node_ecr
node_staging -->|"composes"| node_s3
node_staging -->|"composes"| node_cloudwatch
node_staging -->|"stores state"| node_backend
node_vpc -->|"provides subnets"| node_alb
node_vpc -->|"provides subnets"| node_autoscaling
node_vpc -->|"provides subnets"| node_rds
node_ecr -->|"provides image"| node_autoscaling
node_s3 -->|"stores access logs"| node_alb
node_cloudwatch -->|"configures bootstrap logs"| node_autoscaling
node_security -->|"provides access controls"| node_alb
node_security -->|"provides role and profile"| node_autoscaling
node_security -->|"provides access controls"| node_rds
node_rds -->|"provides secret ARN"| node_autoscaling
node_alb -->|"provides target group"| node_autoscaling
node_autoscaling -->|"runs service"| node_app

click node_app "https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py"
click node_dashboard "https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py"
click node_health "https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py"
click node_readiness "https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py"
click node_status "https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py"
click node_dbcheck "https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py"
click node_secrets "https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py"
click node_awscheck "https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py"
click node_staging "https://github.com/gajjarvatsall/aws-devops-platform/blob/main/environments/staging/main.tf"
click node_vpc "https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/vpc"
click node_security "https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/security-groups"
click node_alb "https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/alb"
click node_autoscaling "https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/autoscaling"
click node_rds "https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/rds"
click node_ecr "https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/ecr"
click node_s3 "https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/s3"
click node_cloudwatch "https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/cloudwatch"
click node_backend "https://github.com/gajjarvatsall/aws-devops-platform/blob/main/bootstrap/backend/main.tf"

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_app,node_dashboard,node_health,node_readiness,node_status,node_dbcheck,node_secrets,node_awscheck,node_user toneBlue
class node_staging,node_secretsmanager,node_mysql toneAmber
class node_vpc,node_security,node_alb,node_autoscaling,node_rds,node_ecr,node_s3,node_cloudwatch,node_awsapis toneMint
class node_backend toneRose
class node_operator toneIndigo
```

## Components

### Application service

- [Flask service](https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py): `app/app.py`
- [Live dashboard](https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py): `app/app.py`
- [Liveness check](https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py): `app/app.py`
- [Readiness check](https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py): `app/app.py`
- [Status API](https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py): `app/app.py`
- [Database check](https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py): `app/app.py`
- [Secret provider](https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py): `app/app.py`
- [AWS status checks](https://github.com/gajjarvatsall/aws-devops-platform/blob/main/app/app.py): `app/app.py`

### Staging environment

- [Staging root](https://github.com/gajjarvatsall/aws-devops-platform/blob/main/environments/staging/main.tf): `environments/staging/main.tf`

### Infrastructure modules

- [Network](https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/vpc): `modules/vpc`
- [Security and IAM](https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/security-groups): `modules/security-groups`
- [Load balancer](https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/alb): `modules/alb`
- [Application capacity](https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/autoscaling): `modules/autoscaling`
- [Managed database](https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/rds): `modules/rds`
- [Image registry](https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/ecr): `modules/ecr`
- [Log buckets](https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/s3): `modules/s3`
- [Application logs](https://github.com/gajjarvatsall/aws-devops-platform/tree/main/modules/cloudwatch): `modules/cloudwatch`

### State bootstrap

- [State backend](https://github.com/gajjarvatsall/aws-devops-platform/blob/main/bootstrap/backend/main.tf): `bootstrap/backend/main.tf`

### Other components

- **HTTP client**
- **Secrets Manager**
- **MySQL database**
- **AWS status APIs**
- **Platform operator**

## Connections

- HTTP client → Flask service: requests (evidence: `README.md`)
- Flask service → Live dashboard: routes (evidence: `app/app.py`)
- Flask service → Liveness check: routes (evidence: `app/app.py`)
- Flask service → Readiness check: routes (evidence: `app/app.py`)
- Flask service → Status API: routes (evidence: `app/app.py`)
- Readiness check → Database check: checks database (evidence: `app/app.py`)
- Status API → Database check: checks database (evidence: `app/app.py`)
- Live dashboard → Database check: checks database (evidence: `app/app.py`)
- Database check → Secret provider: loads credentials (evidence: `app/app.py`)
- Secret provider → Secrets Manager: fetches secret (evidence: `app/app.py`)
- Database check → MySQL database: tests connection (evidence: `app/app.py`)
- Live dashboard → AWS status checks: reads live status (evidence: `app/app.py`)
- AWS status checks → AWS status APIs: queries resources (evidence: `app/app.py`)
- Platform operator → Staging root: deploys (evidence: `README.md`)
- Staging root → Network: composes (evidence: `README.md`)
- Staging root → Security and IAM: composes (evidence: `README.md`)
- Staging root → Load balancer: composes (evidence: `README.md`)
- Staging root → Application capacity: composes (evidence: `README.md`)
- Staging root → Managed database: composes (evidence: `README.md`)
- Staging root → Image registry: composes (evidence: `README.md`)
- Staging root → Log buckets: composes (evidence: `README.md`)
- Staging root → Application logs: composes (evidence: `README.md`)
- Staging root → State backend: stores state (evidence: `README.md`)
- Network → Load balancer: provides subnets (evidence: `README.md`)
- Network → Application capacity: provides subnets (evidence: `README.md`)
- Network → Managed database: provides subnets (evidence: `README.md`)
- Image registry → Application capacity: provides image (evidence: `README.md`)
- Log buckets → Load balancer: stores access logs (evidence: `README.md`)
- Application logs → Application capacity: configures bootstrap logs (evidence: `README.md`)
- Security and IAM → Load balancer: provides access controls (evidence: `README.md`)
- Security and IAM → Application capacity: provides role and profile (evidence: `README.md`)
- Security and IAM → Managed database: provides access controls (evidence: `README.md`)
- Managed database → Application capacity: provides secret ARN (evidence: `README.md`)
- Load balancer → Application capacity: provides target group (evidence: `README.md`)
- Application capacity → Flask service: runs service (evidence: `README.md`)
