# prahlad-dsai/todo-fastapi architecture

> Architecture diagram of the GitHub repository prahlad-dsai/todo-fastapi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prahlad-dsai/todo-fastapi
- Repository: https://github.com/prahlad-dsai/todo-fastapi

## Overview

This is a small browser-facing to-do app: FastAPI serves an HTML page and exposes endpoints to list, add, complete, and remove tasks. The same app module initializes the SQLite table and performs the task queries and updates. The template is shown as the page response, but its contents were not provided, so no browser-to-API behavior is inferred. The graph reflects the routes and database operations visible in app.py; no README documentation was supplied.

Main entry points: [`.gitignore/todos.db`](https://github.com/prahlad-dsai/todo-fastapi/blob/main/.gitignore/todos.db) (Tasks database), [`app.py`](https://github.com/prahlad-dsai/todo-fastapi/blob/main/app.py) (Page route), [`templates/index.html`](https://github.com/prahlad-dsai/todo-fastapi/blob/main/templates/index.html) (HTML page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_page["HTML page<br/>[index.html]"]
  node_page_route["Page route<br/>[app.py]"]
end

subgraph group_tasks["Task operations"]
  node_list_tasks["List tasks<br/>[app.py]"]
  node_add_task["Add task<br/>[app.py]"]
  node_complete_task["Complete task<br/>[app.py]"]
  node_remove_task["Remove task<br/>[app.py]"]
end

subgraph group_storage["Persistence"]
  node_schema_init["Schema initialization<br/>[app.py]"]
  node_sqlite[("Tasks database<br/>[todos.db]")]
end

node_browser(("Browser"))

node_browser -->|"requests page"| node_page_route
node_page_route -->|"renders"| node_page
node_browser -->|"requests tasks"| node_list_tasks
node_browser -->|"submits task"| node_add_task
node_browser -->|"marks complete"| node_complete_task
node_browser -->|"removes task"| node_remove_task
node_schema_init -->|"creates table"| node_sqlite
node_list_tasks -->|"reads tasks"| node_sqlite
node_add_task -->|"inserts task"| node_sqlite
node_complete_task -->|"updates task"| node_sqlite
node_remove_task -->|"deletes task"| node_sqlite

click node_page "https://github.com/prahlad-dsai/todo-fastapi/blob/main/templates/index.html"
click node_page_route "https://github.com/prahlad-dsai/todo-fastapi/blob/main/app.py"
click node_list_tasks "https://github.com/prahlad-dsai/todo-fastapi/blob/main/app.py"
click node_add_task "https://github.com/prahlad-dsai/todo-fastapi/blob/main/app.py"
click node_complete_task "https://github.com/prahlad-dsai/todo-fastapi/blob/main/app.py"
click node_remove_task "https://github.com/prahlad-dsai/todo-fastapi/blob/main/app.py"
click node_schema_init "https://github.com/prahlad-dsai/todo-fastapi/blob/main/app.py"
click node_sqlite "https://github.com/prahlad-dsai/todo-fastapi/blob/main/.gitignore/todos.db"

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_page,node_page_route,node_browser toneBlue
class node_list_tasks,node_add_task,node_complete_task,node_remove_task toneAmber
class node_schema_init,node_sqlite toneMint
```

## Components

### Web interface

- [HTML page](https://github.com/prahlad-dsai/todo-fastapi/blob/main/templates/index.html): `templates/index.html`
- [Page route](https://github.com/prahlad-dsai/todo-fastapi/blob/main/app.py): `app.py`

### Task operations

- [List tasks](https://github.com/prahlad-dsai/todo-fastapi/blob/main/app.py): `app.py`
- [Add task](https://github.com/prahlad-dsai/todo-fastapi/blob/main/app.py): `app.py`
- [Complete task](https://github.com/prahlad-dsai/todo-fastapi/blob/main/app.py): `app.py`
- [Remove task](https://github.com/prahlad-dsai/todo-fastapi/blob/main/app.py): `app.py`

### Persistence

- [Schema initialization](https://github.com/prahlad-dsai/todo-fastapi/blob/main/app.py): `app.py`
- [Tasks database](https://github.com/prahlad-dsai/todo-fastapi/blob/main/.gitignore/todos.db): `.gitignore/todos.db`

### Other components

- **Browser**

## Connections

- Browser → Page route: requests page (evidence: `app.py`)
- Page route → HTML page: renders (evidence: `app.py`)
- Browser → List tasks: requests tasks (evidence: `app.py`)
- Browser → Add task: submits task (evidence: `app.py`)
- Browser → Complete task: marks complete (evidence: `app.py`)
- Browser → Remove task: removes task (evidence: `app.py`)
- Schema initialization → Tasks database: creates table (evidence: `app.py`)
- List tasks → Tasks database: reads tasks (evidence: `app.py`)
- Add task → Tasks database: inserts task (evidence: `app.py`)
- Complete task → Tasks database: updates task (evidence: `app.py`)
- Remove task → Tasks database: deletes task (evidence: `app.py`)
