# patil2771/devops-challenge architecture

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

- Interactive diagram: https://gitdiagram.com/patil2771/devops-challenge
- Repository: https://github.com/patil2771/devops-challenge

## Overview

This repository is a Flask task manager packaged for Kubernetes, with PostgreSQL persistence and a documented CI/CD and monitoring stack. The main user workflow serves the task page and exposes REST endpoints; task reads and writes go through the Flask app to PostgreSQL. The source excerpt confirms those app-level calls, while deployment, storage configuration, CI/CD, and monitoring are represented by the README and file tree only, so their detailed wiring is not asserted.

Main entry points: [`app/app.py`](https://github.com/patil2771/devops-challenge/blob/main/app/app.py) (Flask app), [`k8s/backend.yaml`](https://github.com/patil2771/devops-challenge/blob/main/k8s/backend.yaml) (Backend deployment), [`k8s/postgres.yaml`](https://github.com/patil2771/devops-challenge/blob/main/k8s/postgres.yaml) (PostgreSQL), [`k8s/secret.example.yaml`](https://github.com/patil2771/devops-challenge/blob/main/k8s/secret.example.yaml) (DB secrets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Task application"]
  node_flask["Flask app<br/>[app.py]"]
  node_task_page["Task page<br/>[index.html]"]
end

subgraph group_platform["Kubernetes platform"]
  node_postgres[("PostgreSQL<br/>[postgres.yaml]")]
  node_backend_deploy["Backend deployment<br/>[backend.yaml]"]
  node_db_secret["DB secrets"]
end

subgraph group_operations["Delivery and monitoring"]
  node_docker_image["Container image"]
  node_github_actions["GitHub Actions<br/>[deploy.yml]"]
  node_prometheus["Prometheus"]
  node_grafana["Grafana"]
end

node_user(("Task user"))

node_user -->|"requests"| node_flask
node_flask -->|"renders"| node_task_page
node_flask -->|"queries and writes"| node_postgres
node_backend_deploy -.->|"runs"| node_flask
node_backend_deploy -.->|"connects to"| node_postgres
node_db_secret -.->|"configures credentials"| node_backend_deploy
node_docker_image -.->|"packages app"| node_backend_deploy
node_github_actions -.->|"deploys"| node_backend_deploy
node_prometheus -.->|"monitors"| node_flask
node_grafana -.->|"visualizes metrics"| node_prometheus

click node_flask "https://github.com/patil2771/devops-challenge/blob/main/app/app.py"
click node_task_page "https://github.com/patil2771/devops-challenge/blob/main/app/templates/index.html"
click node_postgres "https://github.com/patil2771/devops-challenge/blob/main/k8s/postgres.yaml"
click node_backend_deploy "https://github.com/patil2771/devops-challenge/blob/main/k8s/backend.yaml"
click node_db_secret "https://github.com/patil2771/devops-challenge/blob/main/k8s/secret.example.yaml"
click node_docker_image "https://github.com/patil2771/devops-challenge/blob/main/app/Dockerfile"
click node_github_actions "https://github.com/patil2771/devops-challenge/blob/main/.github/workflows/deploy.yml"

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_flask,node_task_page toneBlue
class node_postgres,node_backend_deploy,node_db_secret toneAmber
class node_docker_image,node_github_actions,node_prometheus,node_grafana toneMint
class node_user toneRose
```

## Components

### Task application

- [Flask app](https://github.com/patil2771/devops-challenge/blob/main/app/app.py): `app/app.py`
- [Task page](https://github.com/patil2771/devops-challenge/blob/main/app/templates/index.html): `app/templates/index.html`

### Kubernetes platform

- [PostgreSQL](https://github.com/patil2771/devops-challenge/blob/main/k8s/postgres.yaml): `k8s/postgres.yaml`
- [Backend deployment](https://github.com/patil2771/devops-challenge/blob/main/k8s/backend.yaml): `k8s/backend.yaml`
- [DB secrets](https://github.com/patil2771/devops-challenge/blob/main/k8s/secret.example.yaml): `k8s/secret.example.yaml`

### Delivery and monitoring

- [Container image](https://github.com/patil2771/devops-challenge/blob/main/app/Dockerfile): `app/Dockerfile`
- [GitHub Actions](https://github.com/patil2771/devops-challenge/blob/main/.github/workflows/deploy.yml): `.github/workflows/deploy.yml`
- **Prometheus**
- **Grafana**

### Other components

- **Task user**

## Connections

- Task user → Flask app: requests (evidence: `app/app.py`)
- Flask app → Task page: renders (evidence: `app/app.py`)
- Flask app → PostgreSQL: queries and writes (evidence: `app/app.py`)
- Backend deployment → Flask app: runs (evidence: `README.md`)
- Backend deployment → PostgreSQL: connects to (evidence: `README.md`)
- DB secrets → Backend deployment: configures credentials (evidence: `README.md`)
- Container image → Backend deployment: packages app (evidence: `README.md`)
- GitHub Actions → Backend deployment: deploys (evidence: `README.md`)
- Prometheus → Flask app: monitors
- Grafana → Prometheus: visualizes metrics
