# sandeepkumar1703/three-tier-devops architecture

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

- Interactive diagram: https://gitdiagram.com/sandeepkumar1703/three-tier-devops
- Repository: https://github.com/sandeepkumar1703/three-tier-devops

## Overview

TaskFlow is a three-tier task-management application: users register or log in, then manage their own tasks through a React UI backed by an Express API and PostgreSQL. The repository also delivers local Docker Compose operation, Kubernetes/Helm deployment options, multi-cloud Terraform provisioning, and Prometheus/Grafana observability. API and database behavior is supported by sampled source; deployment and monitoring relationships reflect the README and repository structure, whose implementation details were not sampled.

Main entry points: [`backend/src/server.js`](https://github.com/sandeepkumar1703/three-tier-devops/blob/main/backend/src/server.js) (Express API), [`frontend/src/App.jsx`](https://github.com/sandeepkumar1703/three-tier-devops/blob/main/frontend/src/App.jsx) (React UI), [`kubernetes/base`](https://github.com/sandeepkumar1703/three-tier-devops/tree/main/kubernetes/base) (Kubernetes manifests), [`docker-compose.yml`](https://github.com/sandeepkumar1703/three-tier-devops/blob/main/docker-compose.yml) (Local stack)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["TaskFlow application"]
  node_ui["React UI<br/>[App.jsx]"]
  node_api["Express API<br/>[server.js]"]
  node_auth["JWT authentication<br/>[auth.js]"]
end

subgraph group_runtime["Runtime and data"]
  node_config["Runtime config<br/>[config.js]"]
  node_dbpool["Database pool<br/>[db.js]"]
  node_schema["PostgreSQL schema<br/>[01_schema.sql]"]
  node_postgres[("PostgreSQL")]
  node_compose["Local stack<br/>[docker-compose.yml]"]
end

subgraph group_observability["Observability"]
  node_accesslogs["Structured access logs<br/>[logger.js]"]
  node_prometheus["Prometheus<br/>[prometheus.yml]"]
  node_grafana["Grafana dashboard"]
end

subgraph group_deployment["Workload deployment"]
  node_k8s["Kubernetes manifests"]
  node_overlays["Cloud overlays"]
  node_helm["Helm chart"]
end

subgraph group_cloud["Cloud provisioning"]
  node_terraform["Terraform plans"]
  node_aws{{"AWS"}}
  node_azure{{"Azure"}}
  node_gcp{{"GCP"}}
end

node_user(("Web user"))

node_user -->|"uses"| node_ui
node_ui -->|"sends auth and task requests"| node_api
node_api -->|"validates tokens; issues JWTs"| node_auth
node_api -->|"queries users and tasks"| node_dbpool
node_dbpool -->|"reads and writes"| node_postgres
node_schema -->|"defines tables"| node_postgres
node_api -->|"reads settings"| node_config
node_dbpool -->|"reads connection settings"| node_config
node_api -->|"records request logs"| node_accesslogs
node_prometheus -.->|"scrapes metrics"| node_accesslogs
node_prometheus -->|"feeds dashboards"| node_grafana
node_compose -->|"runs locally"| node_ui
node_compose -->|"runs locally"| node_api
node_compose -->|"runs locally"| node_postgres
node_k8s -->|"deploys"| node_ui
node_k8s -->|"deploys"| node_api
node_k8s -->|"deploys"| node_postgres
node_overlays -->|"configures clouds"| node_k8s
node_helm -->|"deploys"| node_ui
node_helm -->|"deploys"| node_api
node_helm -->|"deploys"| node_postgres
node_terraform -->|"provisions"| node_aws
node_terraform -->|"provisions"| node_azure
node_terraform -->|"provisions"| node_gcp

click node_ui "https://github.com/sandeepkumar1703/three-tier-devops/blob/main/frontend/src/App.jsx"
click node_api "https://github.com/sandeepkumar1703/three-tier-devops/blob/main/backend/src/server.js"
click node_auth "https://github.com/sandeepkumar1703/three-tier-devops/blob/main/backend/src/utils/auth.js"
click node_config "https://github.com/sandeepkumar1703/three-tier-devops/blob/main/backend/src/config.js"
click node_dbpool "https://github.com/sandeepkumar1703/three-tier-devops/blob/main/backend/src/db.js"
click node_schema "https://github.com/sandeepkumar1703/three-tier-devops/blob/main/database/init/01_schema.sql"
click node_compose "https://github.com/sandeepkumar1703/three-tier-devops/blob/main/docker-compose.yml"
click node_accesslogs "https://github.com/sandeepkumar1703/three-tier-devops/blob/main/backend/src/middleware/logger.js"
click node_prometheus "https://github.com/sandeepkumar1703/three-tier-devops/blob/main/monitoring/prometheus.yml"
click node_grafana "https://github.com/sandeepkumar1703/three-tier-devops/blob/main/monitoring/grafana-dashboard.json"
click node_k8s "https://github.com/sandeepkumar1703/three-tier-devops/tree/main/kubernetes/base"
click node_overlays "https://github.com/sandeepkumar1703/three-tier-devops/tree/main/kubernetes/overlays"
click node_helm "https://github.com/sandeepkumar1703/three-tier-devops/tree/main/helm/three-tier-app"
click node_terraform "https://github.com/sandeepkumar1703/three-tier-devops/tree/main/terraform"

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_ui,node_api,node_auth,node_user toneBlue
class node_config,node_dbpool,node_schema,node_postgres,node_compose toneAmber
class node_accesslogs,node_prometheus,node_grafana toneMint
class node_k8s,node_overlays,node_helm toneRose
class node_terraform,node_aws,node_azure,node_gcp toneIndigo
```

## Components

### TaskFlow application

- [React UI](https://github.com/sandeepkumar1703/three-tier-devops/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Express API](https://github.com/sandeepkumar1703/three-tier-devops/blob/main/backend/src/server.js): `backend/src/server.js`
- [JWT authentication](https://github.com/sandeepkumar1703/three-tier-devops/blob/main/backend/src/utils/auth.js): `backend/src/utils/auth.js`

### Runtime and data

- [Runtime config](https://github.com/sandeepkumar1703/three-tier-devops/blob/main/backend/src/config.js): `backend/src/config.js`
- [Database pool](https://github.com/sandeepkumar1703/three-tier-devops/blob/main/backend/src/db.js): `backend/src/db.js`
- [PostgreSQL schema](https://github.com/sandeepkumar1703/three-tier-devops/blob/main/database/init/01_schema.sql): `database/init/01_schema.sql`
- **PostgreSQL**
- [Local stack](https://github.com/sandeepkumar1703/three-tier-devops/blob/main/docker-compose.yml): `docker-compose.yml`

### Observability

- [Structured access logs](https://github.com/sandeepkumar1703/three-tier-devops/blob/main/backend/src/middleware/logger.js): `backend/src/middleware/logger.js`
- [Prometheus](https://github.com/sandeepkumar1703/three-tier-devops/blob/main/monitoring/prometheus.yml): `monitoring/prometheus.yml`
- [Grafana dashboard](https://github.com/sandeepkumar1703/three-tier-devops/blob/main/monitoring/grafana-dashboard.json): `monitoring/grafana-dashboard.json`

### Workload deployment

- [Kubernetes manifests](https://github.com/sandeepkumar1703/three-tier-devops/tree/main/kubernetes/base): `kubernetes/base`
- [Cloud overlays](https://github.com/sandeepkumar1703/three-tier-devops/tree/main/kubernetes/overlays): `kubernetes/overlays`
- [Helm chart](https://github.com/sandeepkumar1703/three-tier-devops/tree/main/helm/three-tier-app): `helm/three-tier-app`

### Cloud provisioning

- [Terraform plans](https://github.com/sandeepkumar1703/three-tier-devops/tree/main/terraform): `terraform`
- **AWS**
- **Azure**
- **GCP**

### Other components

- **Web user**

## Connections

- Web user → React UI: uses
- React UI → Express API: sends auth and task requests
- Express API → JWT authentication: validates tokens; issues JWTs
- Express API → Database pool: queries users and tasks
- Database pool → PostgreSQL: reads and writes
- PostgreSQL schema → PostgreSQL: defines tables
- Express API → Runtime config: reads settings
- Database pool → Runtime config: reads connection settings
- Express API → Structured access logs: records request logs
- Prometheus → Structured access logs: scrapes metrics
- Prometheus → Grafana dashboard: feeds dashboards
- Local stack → React UI: runs locally
- Local stack → Express API: runs locally
- Local stack → PostgreSQL: runs locally
- Kubernetes manifests → React UI: deploys
- Kubernetes manifests → Express API: deploys
- Kubernetes manifests → PostgreSQL: deploys
- Cloud overlays → Kubernetes manifests: configures clouds
- Helm chart → React UI: deploys
- Helm chart → Express API: deploys
- Helm chart → PostgreSQL: deploys
- Terraform plans → AWS: provisions
- Terraform plans → Azure: provisions
- Terraform plans → GCP: provisions
