# rohitgit20/three-tier-devops architecture

> Architecture diagram of the GitHub repository rohitgit20/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/rohitgit20/three-tier-devops
- Repository: https://github.com/rohitgit20/three-tier-devops

## Overview

TaskFlow is a browser-based task manager: users register or log in, then create, view, edit, and delete their tasks through an authenticated API. The API verifies JWTs and reads or writes PostgreSQL; request logs feed the documented Prometheus/Grafana monitoring path. The repository also documents local Docker Compose operation and AWS, Azure, and GCP deployment options using Kubernetes, Helm, and Terraform. Deployment relationships reflect README capabilities and directory structure; unsampled infrastructure details are not inferred.

Main entry points: [`backend/src/server.js`](https://github.com/rohitgit20/three-tier-devops/blob/main/backend/src/server.js) (Express API), [`frontend/src/App.jsx`](https://github.com/rohitgit20/three-tier-devops/blob/main/frontend/src/App.jsx) (TaskFlow UI), [`database/init/01_schema.sql`](https://github.com/rohitgit20/three-tier-devops/blob/main/database/init/01_schema.sql) (PostgreSQL), [`docker-compose.yml`](https://github.com/rohitgit20/three-tier-devops/blob/main/docker-compose.yml) (Local stack)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_frontend["TaskFlow UI<br/>[App.jsx]"]
  node_browser["React entry<br/>[main.jsx]"]
end

subgraph group_services["API and data"]
  node_api["Express API<br/>[server.js]"]
  node_auth["JWT authentication<br/>[auth.js]"]
  node_dbclient["Database pool<br/>[db.js]"]
  node_database[("PostgreSQL<br/>[01_schema.sql]")]
end

subgraph group_platform["Deployment platform"]
  node_compose["Local stack<br/>[docker-compose.yml]"]
  node_k8s["Kubernetes manifests"]
  node_helm["Helm chart"]
  node_terraform["Cloud provisioning"]
end

subgraph group_operations["Observability"]
  node_logger["Request logger<br/>[logger.js]"]
  node_prometheus["Prometheus<br/>[prometheus.yml]"]
  node_grafana["Grafana dashboard"]
end

node_user(("Web user"))
node_aws{{"AWS"}}
node_azure{{"Azure"}}
node_gcp{{"GCP"}}

node_user -->|"uses"| node_frontend
node_browser -->|"renders"| node_frontend
node_frontend -->|"calls API"| node_api
node_api -->|"verifies tokens"| node_auth
node_api -->|"queries"| node_dbclient
node_dbclient -->|"reads/writes"| node_database
node_api -->|"records requests"| node_logger
node_logger -->|"provides logs"| node_prometheus
node_prometheus -->|"supplies metrics"| node_grafana
node_compose -->|"runs locally"| node_frontend
node_compose -->|"runs locally"| node_api
node_compose -->|"runs locally"| node_database
node_k8s -->|"deploys"| node_frontend
node_k8s -->|"deploys"| node_api
node_k8s -->|"deploys"| node_database
node_helm -->|"deploys"| node_frontend
node_helm -->|"deploys"| node_api
node_helm -->|"deploys"| node_database
node_terraform -->|"provisions"| node_aws
node_terraform -->|"provisions"| node_azure
node_terraform -->|"provisions"| node_gcp

click node_frontend "https://github.com/rohitgit20/three-tier-devops/blob/main/frontend/src/App.jsx"
click node_browser "https://github.com/rohitgit20/three-tier-devops/blob/main/frontend/src/main.jsx"
click node_api "https://github.com/rohitgit20/three-tier-devops/blob/main/backend/src/server.js"
click node_auth "https://github.com/rohitgit20/three-tier-devops/blob/main/backend/src/utils/auth.js"
click node_dbclient "https://github.com/rohitgit20/three-tier-devops/blob/main/backend/src/db.js"
click node_database "https://github.com/rohitgit20/three-tier-devops/blob/main/database/init/01_schema.sql"
click node_logger "https://github.com/rohitgit20/three-tier-devops/blob/main/backend/src/middleware/logger.js"
click node_prometheus "https://github.com/rohitgit20/three-tier-devops/blob/main/monitoring/prometheus.yml"
click node_grafana "https://github.com/rohitgit20/three-tier-devops/blob/main/monitoring/grafana-dashboard.json"
click node_compose "https://github.com/rohitgit20/three-tier-devops/blob/main/docker-compose.yml"
click node_k8s "https://github.com/rohitgit20/three-tier-devops/tree/main/kubernetes/base"
click node_helm "https://github.com/rohitgit20/three-tier-devops/tree/main/helm/three-tier-app"
click node_terraform "https://github.com/rohitgit20/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_frontend,node_browser,node_user toneBlue
class node_api,node_auth,node_dbclient,node_database toneAmber
class node_compose,node_k8s,node_helm,node_terraform toneMint
class node_logger,node_prometheus,node_grafana toneRose
class node_aws,node_azure,node_gcp toneIndigo
```

## Components

### Web application

- [TaskFlow UI](https://github.com/rohitgit20/three-tier-devops/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [React entry](https://github.com/rohitgit20/three-tier-devops/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`

### API and data

- [Express API](https://github.com/rohitgit20/three-tier-devops/blob/main/backend/src/server.js): `backend/src/server.js`
- [JWT authentication](https://github.com/rohitgit20/three-tier-devops/blob/main/backend/src/utils/auth.js): `backend/src/utils/auth.js`
- [Database pool](https://github.com/rohitgit20/three-tier-devops/blob/main/backend/src/db.js): `backend/src/db.js`
- [PostgreSQL](https://github.com/rohitgit20/three-tier-devops/blob/main/database/init/01_schema.sql): `database/init/01_schema.sql`

### Deployment platform

- [Local stack](https://github.com/rohitgit20/three-tier-devops/blob/main/docker-compose.yml): `docker-compose.yml`
- [Kubernetes manifests](https://github.com/rohitgit20/three-tier-devops/tree/main/kubernetes/base): `kubernetes/base`
- [Helm chart](https://github.com/rohitgit20/three-tier-devops/tree/main/helm/three-tier-app): `helm/three-tier-app`
- [Cloud provisioning](https://github.com/rohitgit20/three-tier-devops/tree/main/terraform): `terraform`

### Observability

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

### Other components

- **Web user**
- **AWS**
- **Azure**
- **GCP**

## Connections

- Web user → TaskFlow UI: uses
- React entry → TaskFlow UI: renders
- TaskFlow UI → Express API: calls API
- Express API → JWT authentication: verifies tokens
- Express API → Database pool: queries
- Database pool → PostgreSQL: reads/writes
- Express API → Request logger: records requests
- Request logger → Prometheus: provides logs
- Prometheus → Grafana dashboard: supplies metrics
- Local stack → TaskFlow UI: runs locally
- Local stack → Express API: runs locally
- Local stack → PostgreSQL: runs locally
- Kubernetes manifests → TaskFlow UI: deploys
- Kubernetes manifests → Express API: deploys
- Kubernetes manifests → PostgreSQL: deploys
- Helm chart → TaskFlow UI: deploys
- Helm chart → Express API: deploys
- Helm chart → PostgreSQL: deploys
- Cloud provisioning → AWS: provisions
- Cloud provisioning → Azure: provisions
- Cloud provisioning → GCP: provisions
