# yuhashini29/todoapp architecture

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

- Interactive diagram: https://gitdiagram.com/yuhashini29/todoapp
- Repository: https://github.com/yuhashini29/todoapp

## Overview

This is a Flask-backed to-do application with browser-based login and task management, backed by SQLite. The main workflow is a user opening the dashboard, loading and filtering tasks, then creating, editing, completing, or deleting them; the browser requests task data and statistics from Flask, which reads or writes the per-user database. The repository contains a second, apparently duplicated application under `todoapp/`. Its sampled Python and JavaScript match the root copies, but the HTML and database contents were not inspected.

Main entry points: [`app.py`](https://github.com/yuhashini29/todoapp/blob/main/app.py) (Account handlers), [`todoapp/app.py`](https://github.com/yuhashini29/todoapp/blob/main/todoapp/app.py) (Account handlers), [`app.js`](https://github.com/yuhashini29/todoapp/blob/main/app.js) (Task interactions), [`todoapp/app.js`](https://github.com/yuhashini29/todoapp/blob/main/todoapp/app.js) (Task interactions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_root["Root application"]
  node_root_login["Login page<br/>[login.html]"]
  node_root_dashboard["Task dashboard<br/>[index.html]"]
  node_root_ui["Task interactions<br/>[app.js]"]
  node_root_styles["Page styling<br/>[style.css]"]
  node_root_auth["Account handlers<br/>[app.py]"]
  node_root_tasks["Task API<br/>[app.py]"]
  node_root_stats["Task statistics<br/>[app.py]"]
end

subgraph group_nested["Todoapp copy"]
  node_nested_login["Login page<br/>[login.html]"]
  node_nested_dashboard["Task dashboard<br/>[index.html]"]
  node_nested_ui["Task interactions<br/>[app.js]"]
  node_nested_styles["Page styling<br/>[style.css]"]
  node_nested_auth["Account handlers<br/>[app.py]"]
  node_nested_tasks["Task API<br/>[app.py]"]
  node_nested_stats["Task statistics<br/>[app.py]"]
end

subgraph group_storage["SQLite storage"]
  node_root_db[("Task database<br/>[tasks.db]")]
  node_nested_db[("Task database<br/>[tasks.db]")]
end

node_user(("User"))

node_user -->|"opens"| node_root_login
node_user -->|"opens"| node_root_dashboard
node_root_auth -->|"serves"| node_root_login
node_root_auth -->|"serves"| node_root_dashboard
node_root_auth -->|"serves"| node_root_ui
node_root_auth -->|"serves"| node_root_styles
node_root_ui -->|"requests tasks"| node_root_tasks
node_root_ui -->|"requests stats"| node_root_stats
node_root_auth -->|"initializes users and tasks"| node_root_db
node_root_tasks -->|"reads and writes"| node_root_db
node_root_stats -->|"counts tasks"| node_root_db
node_user -->|"opens"| node_nested_login
node_user -->|"opens"| node_nested_dashboard
node_nested_auth -->|"serves"| node_nested_login
node_nested_auth -->|"serves"| node_nested_dashboard
node_nested_auth -->|"serves"| node_nested_ui
node_nested_auth -->|"serves"| node_nested_styles
node_nested_ui -->|"requests tasks"| node_nested_tasks
node_nested_ui -->|"requests stats"| node_nested_stats
node_nested_auth -->|"initializes users and tasks"| node_nested_db
node_nested_tasks -->|"reads and writes"| node_nested_db
node_nested_stats -->|"counts tasks"| node_nested_db

click node_root_login "https://github.com/yuhashini29/todoapp/blob/main/login.html"
click node_root_dashboard "https://github.com/yuhashini29/todoapp/blob/main/index.html"
click node_root_ui "https://github.com/yuhashini29/todoapp/blob/main/app.js"
click node_root_styles "https://github.com/yuhashini29/todoapp/blob/main/style.css"
click node_root_auth "https://github.com/yuhashini29/todoapp/blob/main/app.py"
click node_root_tasks "https://github.com/yuhashini29/todoapp/blob/main/app.py"
click node_root_stats "https://github.com/yuhashini29/todoapp/blob/main/app.py"
click node_root_db "https://github.com/yuhashini29/todoapp/blob/main/tasks.db"
click node_nested_login "https://github.com/yuhashini29/todoapp/blob/main/todoapp/login.html"
click node_nested_dashboard "https://github.com/yuhashini29/todoapp/blob/main/todoapp/index.html"
click node_nested_ui "https://github.com/yuhashini29/todoapp/blob/main/todoapp/app.js"
click node_nested_styles "https://github.com/yuhashini29/todoapp/blob/main/todoapp/style.css"
click node_nested_auth "https://github.com/yuhashini29/todoapp/blob/main/todoapp/app.py"
click node_nested_tasks "https://github.com/yuhashini29/todoapp/blob/main/todoapp/app.py"
click node_nested_stats "https://github.com/yuhashini29/todoapp/blob/main/todoapp/app.py"
click node_nested_db "https://github.com/yuhashini29/todoapp/blob/main/todoapp/tasks.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_root_login,node_root_dashboard,node_root_ui,node_root_styles,node_root_auth,node_root_tasks,node_root_stats,node_user toneBlue
class node_nested_login,node_nested_dashboard,node_nested_ui,node_nested_styles,node_nested_auth,node_nested_tasks,node_nested_stats toneAmber
class node_root_db,node_nested_db toneMint
```

## Components

### Root application

- [Login page](https://github.com/yuhashini29/todoapp/blob/main/login.html): `login.html`
- [Task dashboard](https://github.com/yuhashini29/todoapp/blob/main/index.html): `index.html`
- [Task interactions](https://github.com/yuhashini29/todoapp/blob/main/app.js): `app.js`
- [Page styling](https://github.com/yuhashini29/todoapp/blob/main/style.css): `style.css`
- [Account handlers](https://github.com/yuhashini29/todoapp/blob/main/app.py): `app.py`
- [Task API](https://github.com/yuhashini29/todoapp/blob/main/app.py): `app.py`
- [Task statistics](https://github.com/yuhashini29/todoapp/blob/main/app.py): `app.py`

### Todoapp copy

- [Login page](https://github.com/yuhashini29/todoapp/blob/main/todoapp/login.html): `todoapp/login.html`
- [Task dashboard](https://github.com/yuhashini29/todoapp/blob/main/todoapp/index.html): `todoapp/index.html`
- [Task interactions](https://github.com/yuhashini29/todoapp/blob/main/todoapp/app.js): `todoapp/app.js`
- [Page styling](https://github.com/yuhashini29/todoapp/blob/main/todoapp/style.css): `todoapp/style.css`
- [Account handlers](https://github.com/yuhashini29/todoapp/blob/main/todoapp/app.py): `todoapp/app.py`
- [Task API](https://github.com/yuhashini29/todoapp/blob/main/todoapp/app.py): `todoapp/app.py`
- [Task statistics](https://github.com/yuhashini29/todoapp/blob/main/todoapp/app.py): `todoapp/app.py`

### SQLite storage

- [Task database](https://github.com/yuhashini29/todoapp/blob/main/tasks.db): `tasks.db`
- [Task database](https://github.com/yuhashini29/todoapp/blob/main/todoapp/tasks.db): `todoapp/tasks.db`

### Other components

- **User**

## Connections

- User → Login page: opens
- User → Task dashboard: opens
- Account handlers → Login page: serves (evidence: `app.py`)
- Account handlers → Task dashboard: serves (evidence: `app.py`)
- Account handlers → Task interactions: serves (evidence: `app.py`)
- Account handlers → Page styling: serves (evidence: `app.py`)
- Task interactions → Task API: requests tasks (evidence: `app.js`)
- Task interactions → Task statistics: requests stats (evidence: `app.js`)
- Account handlers → Task database: initializes users and tasks (evidence: `app.py`)
- Task API → Task database: reads and writes (evidence: `app.py`)
- Task statistics → Task database: counts tasks (evidence: `app.py`)
- User → Login page: opens
- User → Task dashboard: opens
- Account handlers → Login page: serves (evidence: `todoapp/app.py`)
- Account handlers → Task dashboard: serves (evidence: `todoapp/app.py`)
- Account handlers → Task interactions: serves (evidence: `todoapp/app.py`)
- Account handlers → Page styling: serves (evidence: `todoapp/app.py`)
- Task interactions → Task API: requests tasks (evidence: `todoapp/app.js`)
- Task interactions → Task statistics: requests stats (evidence: `todoapp/app.js`)
- Account handlers → Task database: initializes users and tasks (evidence: `todoapp/app.py`)
- Task API → Task database: reads and writes (evidence: `todoapp/app.py`)
- Task statistics → Task database: counts tasks (evidence: `todoapp/app.py`)
