# minhthanhhlht/web_task_mtdd architecture

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

- Interactive diagram: https://gitdiagram.com/minhthanhhlht/web_task_mtdd
- Repository: https://github.com/minhthanhhlht/web_task_mtdd

## Overview

This is a small-team personal task tracker: users sign in, manage tasks and their progress, then review daily reporting and task history. Admins also manage accounts, statuses, reference data, checklist templates, and deleted tasks; the README documents backup and seed-data workflows. The browser UI calls a Node server, whose database layer owns SQLite persistence. Edges are limited to relationships shown in excerpts or the source index; the API-to-server link is unverified because the route wiring was not excerpted.

Main entry points: [`frontend/src/api.js`](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/api.js) (API client), [`frontend/src/App.jsx`](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/App.jsx) (App navigation), [`backend/server.js`](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/backend/server.js) (HTTP server), [`backend/db.js`](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/backend/db.js) (SQLite data layer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web interface"]
  node_app["App navigation<br/>[App.jsx]"]
  node_auth_ui["Sign-in flow<br/>[AuthGate.jsx]"]
  node_auth_context["Session state<br/>[AuthContext.jsx]"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_taskwork["Task workflows"]
  node_task_list["Task list<br/>[TaskList.jsx]"]
  node_task_view["Task list view<br/>[TaskListView.jsx]"]
  node_task_new["Create task<br/>[TaskNew.jsx]"]
  node_task_detail["Task details<br/>[TaskDetail.jsx]"]
  node_task_form["Task editor<br/>[TaskForm.jsx]"]
  node_checklist["Checklist templates<br/>[Checklist.jsx]"]
  node_endday["Daily reporting<br/>[EndOfDay.jsx]"]
  node_report_summary["Report summary"]
  node_archive["Archive tasks<br/>[Archive.jsx]"]
  node_deleted["Deleted tasks<br/>[DeletedTasks.jsx]"]
end

subgraph group_admin["Administration"]
  node_accounts["Account management<br/>[Accounts.jsx]"]
  node_statuses["Status management<br/>[StatusManager.jsx]"]
  node_status_context["Shared statuses<br/>[StatusContext.jsx]"]
  node_data_manager["Reference data<br/>[DataManager.jsx]"]
end

subgraph group_backend["Server and persistence"]
  node_server["HTTP server<br/>[server.js]"]
  node_auth["Authentication<br/>[auth.js]"]
  node_db[("SQLite data layer<br/>[db.js]")]
  node_seed["Seed data<br/>[seed.js]"]
  node_backup["Database backup<br/>[backup.js]"]
end

node_user(("Team member"))

node_user -.->|"uses"| node_app
node_app -->|"routes to"| node_task_list
node_app -->|"routes to"| node_task_new
node_app -->|"routes to"| node_task_detail
node_app -->|"routes to"| node_accounts
node_app -->|"routes to"| node_statuses
node_app -->|"routes to"| node_data_manager
node_app -->|"routes to"| node_deleted
node_app -->|"loads"| node_report_summary
node_task_new -->|"renders"| node_task_form
node_task_detail -->|"renders"| node_task_form
node_task_list -.->|"renders"| node_task_view
node_task_view -->|"requests data"| node_api
node_task_new -->|"creates task"| node_api
node_task_detail -->|"updates task"| node_api
node_checklist -->|"manages templates"| node_api
node_endday -->|"loads reports"| node_api
node_report_summary -->|"lists tasks"| node_api
node_accounts -->|"manages accounts"| node_api
node_statuses -->|"manages statuses"| node_api
node_status_context -->|"loads statuses"| node_api
node_data_manager -->|"manages data"| node_api
node_deleted -->|"manages deleted tasks"| node_api
node_auth_ui -->|"authenticates via"| node_api
node_app -->|"reads session"| node_auth_context
node_api -.->|"sends HTTP requests"| node_server
node_server -->|"uses"| node_auth
node_server -->|"queries"| node_db
node_server -->|"loads seed data"| node_seed
node_auth -->|"uses"| node_db
node_seed -->|"writes seed data"| node_db
node_backup -->|"backs up"| node_db

click node_app "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/components/AuthGate.jsx"
click node_auth_context "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/components/AuthContext.jsx"
click node_api "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/api.js"
click node_task_list "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/TaskList.jsx"
click node_task_view "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/components/TaskListView.jsx"
click node_task_new "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/TaskNew.jsx"
click node_task_detail "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/TaskDetail.jsx"
click node_task_form "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/components/TaskForm.jsx"
click node_checklist "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/Checklist.jsx"
click node_endday "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/EndOfDay.jsx"
click node_report_summary "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/useReportSummary.js"
click node_archive "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/Archive.jsx"
click node_deleted "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/DeletedTasks.jsx"
click node_accounts "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/Accounts.jsx"
click node_statuses "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/StatusManager.jsx"
click node_status_context "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/components/StatusContext.jsx"
click node_data_manager "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/DataManager.jsx"
click node_server "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/backend/server.js"
click node_auth "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/backend/auth.js"
click node_db "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/backend/db.js"
click node_seed "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/backend/seed.js"
click node_backup "https://github.com/minhthanhhlht/web_task_mtdd/blob/main/backend/backup.js"

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_app,node_auth_ui,node_auth_context,node_api toneBlue
class node_task_list,node_task_view,node_task_new,node_task_detail,node_task_form,node_checklist,node_endday,node_report_summary,node_archive,node_deleted toneAmber
class node_accounts,node_statuses,node_status_context,node_data_manager toneMint
class node_server,node_auth,node_db,node_seed,node_backup toneRose
class node_user toneIndigo
```

## Components

### Web interface

- [App navigation](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Sign-in flow](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/components/AuthGate.jsx): `frontend/src/components/AuthGate.jsx`
- [Session state](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/components/AuthContext.jsx): `frontend/src/components/AuthContext.jsx`
- [API client](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/api.js): `frontend/src/api.js`

### Task workflows

- [Task list](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/TaskList.jsx): `frontend/src/pages/TaskList.jsx`
- [Task list view](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/components/TaskListView.jsx): `frontend/src/components/TaskListView.jsx`
- [Create task](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/TaskNew.jsx): `frontend/src/pages/TaskNew.jsx`
- [Task details](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/TaskDetail.jsx): `frontend/src/pages/TaskDetail.jsx`
- [Task editor](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/components/TaskForm.jsx): `frontend/src/components/TaskForm.jsx`
- [Checklist templates](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/Checklist.jsx): `frontend/src/pages/Checklist.jsx`
- [Daily reporting](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/EndOfDay.jsx): `frontend/src/pages/EndOfDay.jsx`
- [Report summary](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/useReportSummary.js): `frontend/src/useReportSummary.js`
- [Archive tasks](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/Archive.jsx): `frontend/src/pages/Archive.jsx`
- [Deleted tasks](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/DeletedTasks.jsx): `frontend/src/pages/DeletedTasks.jsx`

### Administration

- [Account management](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/Accounts.jsx): `frontend/src/pages/Accounts.jsx`
- [Status management](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/StatusManager.jsx): `frontend/src/pages/StatusManager.jsx`
- [Shared statuses](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/components/StatusContext.jsx): `frontend/src/components/StatusContext.jsx`
- [Reference data](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/frontend/src/pages/DataManager.jsx): `frontend/src/pages/DataManager.jsx`

### Server and persistence

- [HTTP server](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/backend/server.js): `backend/server.js`
- [Authentication](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/backend/auth.js): `backend/auth.js`
- [SQLite data layer](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/backend/db.js): `backend/db.js`
- [Seed data](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/backend/seed.js): `backend/seed.js`
- [Database backup](https://github.com/minhthanhhlht/web_task_mtdd/blob/main/backend/backup.js): `backend/backup.js`

### Other components

- **Team member**

## Connections

- Team member → App navigation: uses
- App navigation → Task list: routes to (evidence: `frontend/src/App.jsx`)
- App navigation → Create task: routes to (evidence: `frontend/src/App.jsx`)
- App navigation → Task details: routes to (evidence: `frontend/src/App.jsx`)
- App navigation → Account management: routes to (evidence: `frontend/src/App.jsx`)
- App navigation → Status management: routes to (evidence: `frontend/src/App.jsx`)
- App navigation → Reference data: routes to (evidence: `frontend/src/App.jsx`)
- App navigation → Deleted tasks: routes to (evidence: `frontend/src/App.jsx`)
- App navigation → Report summary: loads (evidence: `frontend/src/App.jsx`)
- Create task → Task editor: renders (evidence: `frontend/src/pages/TaskNew.jsx`)
- Task details → Task editor: renders (evidence: `frontend/src/pages/TaskDetail.jsx`)
- Task list → Task list view: renders
- Task list view → API client: requests data (evidence: `frontend/src/components/TaskListView.jsx`)
- Create task → API client: creates task (evidence: `frontend/src/pages/TaskNew.jsx`)
- Task details → API client: updates task (evidence: `frontend/src/pages/TaskDetail.jsx`)
- Checklist templates → API client: manages templates (evidence: `frontend/src/pages/Checklist.jsx`)
- Daily reporting → API client: loads reports (evidence: `frontend/src/pages/EndOfDay.jsx`)
- Report summary → API client: lists tasks (evidence: `frontend/src/useReportSummary.js`)
- Account management → API client: manages accounts (evidence: `frontend/src/pages/Accounts.jsx`)
- Status management → API client: manages statuses (evidence: `frontend/src/pages/StatusManager.jsx`)
- Shared statuses → API client: loads statuses (evidence: `frontend/src/components/StatusContext.jsx`)
- Reference data → API client: manages data (evidence: `frontend/src/pages/DataManager.jsx`)
- Deleted tasks → API client: manages deleted tasks (evidence: `frontend/src/pages/DeletedTasks.jsx`)
- Sign-in flow → API client: authenticates via (evidence: `frontend/src/components/AuthGate.jsx`)
- App navigation → Session state: reads session (evidence: `frontend/src/App.jsx`)
- API client → HTTP server: sends HTTP requests
- HTTP server → Authentication: uses (evidence: `backend/server.js`)
- HTTP server → SQLite data layer: queries (evidence: `backend/server.js`)
- HTTP server → Seed data: loads seed data (evidence: `backend/server.js`)
- Authentication → SQLite data layer: uses (evidence: `backend/auth.js`)
- Seed data → SQLite data layer: writes seed data (evidence: `backend/seed.js`)
- Database backup → SQLite data layer: backs up (evidence: `backend/backup.js`)
