# prashantmhamunkar/task-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/prashantmhamunkar/task-tracker
- Repository: https://github.com/prashantmhamunkar/task-tracker

## Overview

This is a three-tier task-tracking application: a browser UI lets users create, list, toggle, and delete tasks through a Flask API backed by PostgreSQL. The README also documents health endpoints and containerized frontend/backend/database services. Source excerpts confirm the frontend-to-API and API-to-database behavior; the documented Nginx proxy and database initialization provide the remaining wiring. The database initialization SQL and deployment configuration were not excerpted, so their internal details are not inferred.

Main entry points: [`backend/app.py`](https://github.com/prashantmhamunkar/task-tracker/blob/main/backend/app.py) (Task and health API), [`docker-compose.yml`](https://github.com/prashantmhamunkar/task-tracker/blob/main/docker-compose.yml) (Compose services), [`frontend/src/main.js`](https://github.com/prashantmhamunkar/task-tracker/blob/main/frontend/src/main.js) (Task interface), [`frontend/nginx.conf`](https://github.com/prashantmhamunkar/task-tracker/blob/main/frontend/nginx.conf) (Nginx web server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Presentation"]
  node_frontend["Task interface<br/>[main.js]"]
  node_title_helpers["Title validation<br/>[utils.js]"]
  node_nginx["Nginx web server<br/>[nginx.conf]"]
end

subgraph group_api["Backend API"]
  node_api_routes["Task and health API<br/>[app.py]"]
  node_db_connection["Database connection<br/>[app.py]"]
end

subgraph group_persistence["Persistence"]
  node_postgres[("PostgreSQL")]
  node_schema["Task schema<br/>[init.sql]"]
end

subgraph group_runtime["Container Runtime"]
  node_compose["Compose services<br/>[docker-compose.yml]"]
end

node_user(("Task user"))

node_user -->|"uses"| node_frontend
node_frontend -->|"validates titles"| node_title_helpers
node_frontend -->|"requests API"| node_nginx
node_nginx -->|"proxies API"| node_api_routes
node_api_routes -->|"opens connection"| node_db_connection
node_db_connection -->|"connects"| node_postgres
node_api_routes -->|"reads and writes tasks"| node_postgres
node_compose -->|"runs service"| node_postgres
node_compose -->|"runs service"| node_api_routes
node_compose -->|"runs service"| node_nginx
node_schema -->|"initializes database"| node_postgres

click node_frontend "https://github.com/prashantmhamunkar/task-tracker/blob/main/frontend/src/main.js"
click node_title_helpers "https://github.com/prashantmhamunkar/task-tracker/blob/main/frontend/src/utils.js"
click node_nginx "https://github.com/prashantmhamunkar/task-tracker/blob/main/frontend/nginx.conf"
click node_api_routes "https://github.com/prashantmhamunkar/task-tracker/blob/main/backend/app.py"
click node_db_connection "https://github.com/prashantmhamunkar/task-tracker/blob/main/backend/app.py"
click node_schema "https://github.com/prashantmhamunkar/task-tracker/blob/main/db/init.sql"
click node_compose "https://github.com/prashantmhamunkar/task-tracker/blob/main/docker-compose.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_frontend,node_title_helpers,node_nginx toneBlue
class node_api_routes,node_db_connection toneAmber
class node_postgres,node_schema toneMint
class node_compose,node_user toneRose
```

## Components

### Presentation

- [Task interface](https://github.com/prashantmhamunkar/task-tracker/blob/main/frontend/src/main.js): `frontend/src/main.js`
- [Title validation](https://github.com/prashantmhamunkar/task-tracker/blob/main/frontend/src/utils.js): `frontend/src/utils.js`
- [Nginx web server](https://github.com/prashantmhamunkar/task-tracker/blob/main/frontend/nginx.conf): `frontend/nginx.conf`

### Backend API

- [Task and health API](https://github.com/prashantmhamunkar/task-tracker/blob/main/backend/app.py): `backend/app.py`
- [Database connection](https://github.com/prashantmhamunkar/task-tracker/blob/main/backend/app.py): `backend/app.py`

### Persistence

- **PostgreSQL**
- [Task schema](https://github.com/prashantmhamunkar/task-tracker/blob/main/db/init.sql): `db/init.sql`

### Container Runtime

- [Compose services](https://github.com/prashantmhamunkar/task-tracker/blob/main/docker-compose.yml): `docker-compose.yml`

### Other components

- **Task user**

## Connections

- Task user → Task interface: uses
- Task interface → Title validation: validates titles (evidence: `frontend/src/main.js`)
- Task interface → Nginx web server: requests API (evidence: `README.md`)
- Nginx web server → Task and health API: proxies API (evidence: `README.md`)
- Task and health API → Database connection: opens connection (evidence: `backend/app.py`)
- Database connection → PostgreSQL: connects (evidence: `backend/app.py`)
- Task and health API → PostgreSQL: reads and writes tasks (evidence: `backend/app.py`)
- Compose services → PostgreSQL: runs service (evidence: `README.md`)
- Compose services → Task and health API: runs service (evidence: `README.md`)
- Compose services → Nginx web server: runs service (evidence: `README.md`)
- Task schema → PostgreSQL: initializes database (evidence: `README.md`)
