# naresh1401/enterprise-multi-cloud architecture

> Architecture diagram of the GitHub repository naresh1401/enterprise-multi-cloud, 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/naresh1401/enterprise-multi-cloud
- Repository: https://github.com/naresh1401/enterprise-multi-cloud

## Overview

This repository combines a Flask/PostgreSQL sample service with infrastructure and deployment paths for six AWS, Google Cloud, and Azure targets. The user-facing flow is HTTP request → health/readiness or item handling → database access; a separate deployment flow provisions a target, builds and publishes the image, runs migrations, then routes traffic to the new version. Runtime edges are supported by the excerpts; cloud deployment relationships are documented in the README, while detailed infrastructure internals were not sampled.

Main entry points: [`.github/workflows`](https://github.com/naresh1401/enterprise-multi-cloud/tree/main/.github/workflows) (Manual deploy workflows), [`app/db.py`](https://github.com/naresh1401/enterprise-multi-cloud/blob/main/app/db.py) (DB connections), [`app/main.py`](https://github.com/naresh1401/enterprise-multi-cloud/blob/main/app/main.py) (HTTP API), [`app/migrate.py`](https://github.com/naresh1401/enterprise-multi-cloud/blob/main/app/migrate.py) (Migration runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_service["Application service"]
  node_http["HTTP API<br/>[main.py]"]
  node_items["Items API<br/>[items.py]"]
end

subgraph group_database["Database lifecycle"]
  node_dbaccess["DB connections<br/>[db.py]"]
  node_postgres[("PostgreSQL")]
  node_migration["Migration runner<br/>[migrate.py]"]
  node_schema["Schema revisions"]
end

subgraph group_cloud["Cloud targets"]
  node_awsserverless["AWS ECS target"]
  node_awskube["AWS EKS target"]
  node_gcpserverless["Cloud Run target"]
  node_gcpkube["GKE target"]
  node_azureserverless["Container Apps target"]
  node_azurekube["AKS target"]
  node_platform["Cloud runtime"]
end

subgraph group_kubernetes["Kubernetes delivery"]
  node_helm["Kubernetes chart"]
end

subgraph group_release["Deployment flow"]
  node_dispatcher["Manual deploy workflows<br/>[workflows]"]
  node_image["Container image"]
end

node_client(("HTTP client"))

node_client -->|"sends requests"| node_http
node_http -->|"registers routes"| node_items
node_http -->|"checks readiness"| node_dbaccess
node_items -->|"opens connections"| node_dbaccess
node_dbaccess -->|"connects and queries"| node_postgres
node_migration -->|"creates database"| node_dbaccess
node_migration -->|"applies revisions"| node_schema
node_dispatcher -->|"builds image"| node_image
node_dispatcher -->|"provisions target"| node_awsserverless
node_dispatcher -->|"provisions target"| node_awskube
node_dispatcher -->|"provisions target"| node_gcpserverless
node_dispatcher -->|"provisions target"| node_gcpkube
node_dispatcher -->|"provisions target"| node_azureserverless
node_dispatcher -->|"provisions target"| node_azurekube
node_dispatcher -->|"runs migrations"| node_migration
node_dispatcher -->|"upgrades chart"| node_helm
node_awsserverless -->|"runs service"| node_platform
node_awskube -->|"runs service"| node_platform
node_gcpserverless -->|"runs service"| node_platform
node_gcpkube -->|"runs service"| node_platform
node_azureserverless -->|"runs service"| node_platform
node_azurekube -->|"runs service"| node_platform
node_helm -->|"deploys service"| node_platform

click node_http "https://github.com/naresh1401/enterprise-multi-cloud/blob/main/app/main.py"
click node_items "https://github.com/naresh1401/enterprise-multi-cloud/blob/main/app/items.py"
click node_dbaccess "https://github.com/naresh1401/enterprise-multi-cloud/blob/main/app/db.py"
click node_migration "https://github.com/naresh1401/enterprise-multi-cloud/blob/main/app/migrate.py"
click node_schema "https://github.com/naresh1401/enterprise-multi-cloud/blob/main/app/migrations/versions/0001_create_items.py"
click node_dispatcher "https://github.com/naresh1401/enterprise-multi-cloud/tree/main/.github/workflows"
click node_image "https://github.com/naresh1401/enterprise-multi-cloud/blob/main/Dockerfile"
click node_awsserverless "https://github.com/naresh1401/enterprise-multi-cloud/tree/main/infra/aws"
click node_awskube "https://github.com/naresh1401/enterprise-multi-cloud/tree/main/infra/eks"
click node_gcpserverless "https://github.com/naresh1401/enterprise-multi-cloud/tree/main/infra/gcp"
click node_gcpkube "https://github.com/naresh1401/enterprise-multi-cloud/tree/main/infra/gke"
click node_azureserverless "https://github.com/naresh1401/enterprise-multi-cloud/tree/main/infra/azure"
click node_azurekube "https://github.com/naresh1401/enterprise-multi-cloud/tree/main/infra/aks"
click node_helm "https://github.com/naresh1401/enterprise-multi-cloud/tree/main/deploy/helm/multi-cloud-app"

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_http,node_items,node_client toneBlue
class node_dbaccess,node_postgres,node_migration,node_schema toneAmber
class node_awsserverless,node_awskube,node_gcpserverless,node_gcpkube,node_azureserverless,node_azurekube,node_platform toneMint
class node_helm toneRose
class node_dispatcher,node_image toneIndigo
```

## Components

### Application service

- [HTTP API](https://github.com/naresh1401/enterprise-multi-cloud/blob/main/app/main.py): `app/main.py`
- [Items API](https://github.com/naresh1401/enterprise-multi-cloud/blob/main/app/items.py): `app/items.py`

### Database lifecycle

- [DB connections](https://github.com/naresh1401/enterprise-multi-cloud/blob/main/app/db.py): `app/db.py`
- **PostgreSQL**
- [Migration runner](https://github.com/naresh1401/enterprise-multi-cloud/blob/main/app/migrate.py): `app/migrate.py`
- [Schema revisions](https://github.com/naresh1401/enterprise-multi-cloud/blob/main/app/migrations/versions/0001_create_items.py): `app/migrations/versions/0001_create_items.py`

### Cloud targets

- [AWS ECS target](https://github.com/naresh1401/enterprise-multi-cloud/tree/main/infra/aws): `infra/aws`
- [AWS EKS target](https://github.com/naresh1401/enterprise-multi-cloud/tree/main/infra/eks): `infra/eks`
- [Cloud Run target](https://github.com/naresh1401/enterprise-multi-cloud/tree/main/infra/gcp): `infra/gcp`
- [GKE target](https://github.com/naresh1401/enterprise-multi-cloud/tree/main/infra/gke): `infra/gke`
- [Container Apps target](https://github.com/naresh1401/enterprise-multi-cloud/tree/main/infra/azure): `infra/azure`
- [AKS target](https://github.com/naresh1401/enterprise-multi-cloud/tree/main/infra/aks): `infra/aks`
- **Cloud runtime**

### Kubernetes delivery

- [Kubernetes chart](https://github.com/naresh1401/enterprise-multi-cloud/tree/main/deploy/helm/multi-cloud-app): `deploy/helm/multi-cloud-app`

### Deployment flow

- [Manual deploy workflows](https://github.com/naresh1401/enterprise-multi-cloud/tree/main/.github/workflows): `.github/workflows`
- [Container image](https://github.com/naresh1401/enterprise-multi-cloud/blob/main/Dockerfile): `Dockerfile`

### Other components

- **HTTP client**

## Connections

- HTTP client → HTTP API: sends requests (evidence: `app/main.py`)
- HTTP API → Items API: registers routes (evidence: `app/main.py`)
- HTTP API → DB connections: checks readiness (evidence: `app/main.py`)
- Items API → DB connections: opens connections (evidence: `app/items.py`)
- DB connections → PostgreSQL: connects and queries (evidence: `app/db.py`)
- Migration runner → DB connections: creates database (evidence: `app/migrate.py`)
- Migration runner → Schema revisions: applies revisions (evidence: `app/migrate.py`)
- Manual deploy workflows → Container image: builds image (evidence: `README.md`)
- Manual deploy workflows → AWS ECS target: provisions target (evidence: `README.md`)
- Manual deploy workflows → AWS EKS target: provisions target (evidence: `README.md`)
- Manual deploy workflows → Cloud Run target: provisions target (evidence: `README.md`)
- Manual deploy workflows → GKE target: provisions target (evidence: `README.md`)
- Manual deploy workflows → Container Apps target: provisions target (evidence: `README.md`)
- Manual deploy workflows → AKS target: provisions target (evidence: `README.md`)
- Manual deploy workflows → Migration runner: runs migrations (evidence: `README.md`)
- Manual deploy workflows → Kubernetes chart: upgrades chart (evidence: `README.md`)
- AWS ECS target → Cloud runtime: runs service (evidence: `README.md`)
- AWS EKS target → Cloud runtime: runs service (evidence: `README.md`)
- Cloud Run target → Cloud runtime: runs service (evidence: `README.md`)
- GKE target → Cloud runtime: runs service (evidence: `README.md`)
- Container Apps target → Cloud runtime: runs service (evidence: `README.md`)
- AKS target → Cloud runtime: runs service (evidence: `README.md`)
- Kubernetes chart → Cloud runtime: deploys service (evidence: `README.md`)
