# souravsahoo08/microservice-on-k8s architecture

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

- Interactive diagram: https://gitdiagram.com/souravsahoo08/microservice-on-k8s
- Repository: https://github.com/souravsahoo08/microservice-on-k8s

## Overview

TaskFlow is a small task-management app: a browser uses a static page to list, create, update, and delete tasks through a Node/Express API, which persists them in Postgres. The repository also contains Kubernetes configuration and Terraform infrastructure files. The API and frontend flow is documented and the API’s database operations are visible in source; deployment relationships are described in the README, but the deployment files were not sampled, so those links are limited to documented behavior.

Main entry points: [`frontend/index.html`](https://github.com/souravsahoo08/microservice-on-k8s/blob/main/frontend/index.html) (Task page), [`backend/server.js`](https://github.com/souravsahoo08/microservice-on-k8s/blob/main/backend/server.js) (Tasks API), [`kubernetes/taskflow_backend.yml`](https://github.com/souravsahoo08/microservice-on-k8s/blob/main/kubernetes/taskflow_backend.yml) (Backend workload), [`frontend/nginx.conf`](https://github.com/souravsahoo08/microservice-on-k8s/blob/main/frontend/nginx.conf) (Static serving config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Task application"]
  node_frontend["Task page<br/>[index.html]"]
end

subgraph group_runtime["Runtime services"]
  node_backend["Tasks API<br/>[server.js]"]
  node_database[("Postgres tasks")]
  node_nginx["Static serving config<br/>[nginx.conf]"]
end

subgraph group_deployment["Deployment and infrastructure"]
  node_k8s_frontend["Frontend workload"]
  node_k8s_backend["Backend workload"]
  node_k8s_config["Runtime config"]
  node_k8s_namespace["Kubernetes namespace<br/>[taskflow_ns.yml]"]
  node_terraform["Cloud infrastructure<br/>[main.tf]"]
end

node_user(("Task user"))
node_cluster["Kubernetes cluster"]

node_user -->|"uses"| node_frontend
node_frontend -->|"HTTP task requests"| node_backend
node_backend -->|"queries tasks"| node_database
node_nginx -->|"serves static files"| node_frontend
node_k8s_frontend -.->|"deploys"| node_frontend
node_k8s_backend -.->|"deploys"| node_backend
node_k8s_config -->|"configures"| node_k8s_backend
node_k8s_namespace -.->|"declares namespace"| node_cluster
node_terraform -->|"provisions"| node_cluster

click node_frontend "https://github.com/souravsahoo08/microservice-on-k8s/blob/main/frontend/index.html"
click node_backend "https://github.com/souravsahoo08/microservice-on-k8s/blob/main/backend/server.js"
click node_nginx "https://github.com/souravsahoo08/microservice-on-k8s/blob/main/frontend/nginx.conf"
click node_k8s_frontend "https://github.com/souravsahoo08/microservice-on-k8s/blob/main/kubernetes/taskflow_frontend.yml"
click node_k8s_backend "https://github.com/souravsahoo08/microservice-on-k8s/blob/main/kubernetes/taskflow_backend.yml"
click node_k8s_config "https://github.com/souravsahoo08/microservice-on-k8s/blob/main/kubernetes/taskflow_configmap.yml"
click node_k8s_namespace "https://github.com/souravsahoo08/microservice-on-k8s/blob/main/kubernetes/taskflow_ns.yml"
click node_terraform "https://github.com/souravsahoo08/microservice-on-k8s/blob/main/Terraform/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_frontend toneBlue
class node_backend,node_database,node_nginx toneAmber
class node_k8s_frontend,node_k8s_backend,node_k8s_config,node_k8s_namespace,node_terraform toneMint
class node_user toneRose
class node_cluster toneIndigo
```

## Components

### Task application

- [Task page](https://github.com/souravsahoo08/microservice-on-k8s/blob/main/frontend/index.html): `frontend/index.html`

### Runtime services

- [Tasks API](https://github.com/souravsahoo08/microservice-on-k8s/blob/main/backend/server.js): `backend/server.js`
- **Postgres tasks**
- [Static serving config](https://github.com/souravsahoo08/microservice-on-k8s/blob/main/frontend/nginx.conf): `frontend/nginx.conf`

### Deployment and infrastructure

- [Frontend workload](https://github.com/souravsahoo08/microservice-on-k8s/blob/main/kubernetes/taskflow_frontend.yml): `kubernetes/taskflow_frontend.yml`
- [Backend workload](https://github.com/souravsahoo08/microservice-on-k8s/blob/main/kubernetes/taskflow_backend.yml): `kubernetes/taskflow_backend.yml`
- [Runtime config](https://github.com/souravsahoo08/microservice-on-k8s/blob/main/kubernetes/taskflow_configmap.yml): `kubernetes/taskflow_configmap.yml`
- [Kubernetes namespace](https://github.com/souravsahoo08/microservice-on-k8s/blob/main/kubernetes/taskflow_ns.yml): `kubernetes/taskflow_ns.yml`
- [Cloud infrastructure](https://github.com/souravsahoo08/microservice-on-k8s/blob/main/Terraform/main.tf): `Terraform/main.tf`

### Other components

- **Task user**
- **Kubernetes cluster**

## Connections

- Task user → Task page: uses (evidence: `README.md`)
- Task page → Tasks API: HTTP task requests (evidence: `README.md`)
- Tasks API → Postgres tasks: queries tasks (evidence: `backend/server.js`)
- Static serving config → Task page: serves static files (evidence: `README.md`)
- Frontend workload → Task page: deploys
- Backend workload → Tasks API: deploys
- Runtime config → Backend workload: configures (evidence: `README.md`)
- Kubernetes namespace → Kubernetes cluster: declares namespace
- Cloud infrastructure → Kubernetes cluster: provisions (evidence: `README.md`)
