# rohanbhowmik2022/multi-cloud-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/rohanbhowmik2022/multi-cloud-dashboard
- Repository: https://github.com/rohanbhowmik2022/multi-cloud-dashboard

## Overview

This is a multi-cloud cost and service-status dashboard. Users choose AWS, Azure, or GCP, then view regional/availability-zone server counts and monthly service costs; a polling worker collects or generates those metrics, stores them, and the API serves them to the provider-specific pages. The README also documents Terraform infrastructure automation, represented as a separate capability rather than a runtime data-flow stage. Collection details vary by provider: sampled code shows AWS collection and dummy Azure/GCP metrics. Deployment pipelines are omitted.

Main entry points: [`app/frontend/src/App.js`](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/frontend/src/App.js) (App routing), [`app/backend/api/metrics.py`](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/backend/api/metrics.py) (Cost/status endpoints), [`app/worker/worker.py`](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/worker/worker.py) (Polling worker), [`infra/terraform/main.tf`](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/infra/terraform/main.tf) (Terraform provisioning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Dashboard UI"]
  node_app["App routing<br/>[App.js]"]
  node_selector["Cloud selector<br/>[CloudSelector.js]"]
  node_header["Dashboard header<br/>[Header.js]"]
  node_aws_page["AWS dashboard<br/>[AWS.js]"]
  node_azure_page["Azure dashboard<br/>[Azure.js]"]
  node_gcp_page["GCP dashboard<br/>[GCP.js]"]
end

subgraph group_api["Metrics API"]
  node_api_entry["API server entry<br/>[main.py]"]
  node_metrics_api["Cost/status endpoints<br/>[metrics.py]"]
  node_db_access["API DB access<br/>[database.py]"]
end

subgraph group_collector["Metric Collection"]
  node_worker["Polling worker<br/>[worker.py]"]
  node_aws_collect["AWS metrics<br/>[aws_module.py]"]
  node_azure_collect["Azure metrics<br/>[azure_module.py]"]
  node_gcp_collect["GCP metrics<br/>[gcp_module.py]"]
end

subgraph group_infra["Infrastructure"]
  node_terraform["Terraform provisioning<br/>[main.tf]"]
  node_rds[("RDS database<br/>[main.tf]")]
  node_network["VPC and ALB<br/>[main.tf]"]
end

node_user(("Dashboard user"))
node_metrics_store[("Metrics database<br/>[schema.sql]")]
node_cloud_services{{"Cloud accounts"}}

node_user -->|"opens dashboard"| node_app
node_app -->|"renders"| node_header
node_app -->|"renders"| node_selector
node_app -->|"selects page"| node_aws_page
node_app -->|"selects page"| node_azure_page
node_app -->|"selects page"| node_gcp_page
node_api_entry -->|"starts"| node_metrics_api
node_aws_page -->|"fetches AWS metrics"| node_metrics_api
node_azure_page -->|"fetches Azure metrics"| node_metrics_api
node_gcp_page -->|"fetches GCP metrics"| node_metrics_api
node_metrics_api -->|"opens connection"| node_db_access
node_db_access -.->|"queries"| node_metrics_store
node_worker -->|"invokes collection"| node_aws_collect
node_worker -->|"invokes collection"| node_azure_collect
node_worker -->|"invokes collection"| node_gcp_collect
node_aws_collect -.->|"collects metrics"| node_cloud_services
node_worker -->|"writes metrics"| node_metrics_store
node_terraform -.->|"provisions"| node_rds
node_terraform -.->|"provisions"| node_network

click node_app "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/frontend/src/App.js"
click node_selector "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/frontend/src/components/CloudSelector.js"
click node_header "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/frontend/src/components/Header.js"
click node_aws_page "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/frontend/src/pages/AWS.js"
click node_azure_page "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/frontend/src/pages/Azure.js"
click node_gcp_page "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/frontend/src/pages/GCP.js"
click node_api_entry "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/backend/main.py"
click node_metrics_api "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/backend/api/metrics.py"
click node_db_access "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/backend/core/database.py"
click node_metrics_store "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/database/schema.sql"
click node_worker "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/worker/worker.py"
click node_aws_collect "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/worker/aws_module.py"
click node_azure_collect "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/worker/azure_module.py"
click node_gcp_collect "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/worker/gcp_module.py"
click node_terraform "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/infra/terraform/main.tf"
click node_rds "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/infra/terraform/modules/database/main.tf"
click node_network "https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/infra/terraform/modules/vpc/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_selector,node_header,node_aws_page,node_azure_page,node_gcp_page,node_user toneBlue
class node_api_entry,node_metrics_api,node_db_access,node_metrics_store toneAmber
class node_worker,node_aws_collect,node_azure_collect,node_gcp_collect toneMint
class node_terraform,node_rds,node_network toneRose
class node_cloud_services toneIndigo
```

## Components

### Dashboard UI

- [App routing](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/frontend/src/App.js): `app/frontend/src/App.js`
- [Cloud selector](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/frontend/src/components/CloudSelector.js): `app/frontend/src/components/CloudSelector.js`
- [Dashboard header](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/frontend/src/components/Header.js): `app/frontend/src/components/Header.js`
- [AWS dashboard](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/frontend/src/pages/AWS.js): `app/frontend/src/pages/AWS.js`
- [Azure dashboard](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/frontend/src/pages/Azure.js): `app/frontend/src/pages/Azure.js`
- [GCP dashboard](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/frontend/src/pages/GCP.js): `app/frontend/src/pages/GCP.js`

### Metrics API

- [API server entry](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/backend/main.py): `app/backend/main.py`
- [Cost/status endpoints](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/backend/api/metrics.py): `app/backend/api/metrics.py`
- [API DB access](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/backend/core/database.py): `app/backend/core/database.py`

### Metric Collection

- [Polling worker](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/worker/worker.py): `app/worker/worker.py`
- [AWS metrics](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/worker/aws_module.py): `app/worker/aws_module.py`
- [Azure metrics](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/worker/azure_module.py): `app/worker/azure_module.py`
- [GCP metrics](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/worker/gcp_module.py): `app/worker/gcp_module.py`

### Infrastructure

- [Terraform provisioning](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/infra/terraform/main.tf): `infra/terraform/main.tf`
- [RDS database](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/infra/terraform/modules/database/main.tf): `infra/terraform/modules/database/main.tf`
- [VPC and ALB](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/infra/terraform/modules/vpc/main.tf): `infra/terraform/modules/vpc/main.tf`

### Other components

- **Dashboard user**
- [Metrics database](https://github.com/rohanbhowmik2022/multi-cloud-dashboard/blob/main/app/database/schema.sql): `app/database/schema.sql`
- **Cloud accounts**

## Connections

- Dashboard user → App routing: opens dashboard (evidence: `README.md`)
- App routing → Dashboard header: renders (evidence: `app/frontend/src/App.js`)
- App routing → Cloud selector: renders (evidence: `app/frontend/src/App.js`)
- App routing → AWS dashboard: selects page (evidence: `app/frontend/src/App.js`)
- App routing → Azure dashboard: selects page (evidence: `app/frontend/src/App.js`)
- App routing → GCP dashboard: selects page (evidence: `app/frontend/src/App.js`)
- API server entry → Cost/status endpoints: starts (evidence: `app/backend/main.py`)
- AWS dashboard → Cost/status endpoints: fetches AWS metrics (evidence: `app/frontend/src/pages/AWS.js`)
- Azure dashboard → Cost/status endpoints: fetches Azure metrics (evidence: `app/frontend/src/pages/Azure.js`)
- GCP dashboard → Cost/status endpoints: fetches GCP metrics (evidence: `app/frontend/src/pages/GCP.js`)
- Cost/status endpoints → API DB access: opens connection (evidence: `app/backend/api/metrics.py`)
- API DB access → Metrics database: queries
- Polling worker → AWS metrics: invokes collection (evidence: `app/worker/worker.py`)
- Polling worker → Azure metrics: invokes collection (evidence: `app/worker/worker.py`)
- Polling worker → GCP metrics: invokes collection (evidence: `app/worker/worker.py`)
- AWS metrics → Cloud accounts: collects metrics
- Polling worker → Metrics database: writes metrics (evidence: `app/worker/worker.py`)
- Terraform provisioning → RDS database: provisions
- Terraform provisioning → VPC and ALB: provisions
