# raghavendrabaheti/task-todo architecture

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

- Interactive diagram: https://gitdiagram.com/raghavendrabaheti/task-todo
- Repository: https://github.com/raghavendrabaheti/task-todo

## Overview

TaskFlow is a web task manager with account registration/login, authenticated task management, and task analytics. Users register or sign in, then reach a protected dashboard to create, view, update, and delete tasks; a separate analytics page presents task summaries. The backend exposes auth, task, and analytics routes, with SQLAlchemy-backed task storage and an in-memory user registry in the sampled auth code. Frontend-to-analytics request wiring and several modules were not sampled, so uncertain connections are omitted.

Main entry points: [`taskflow-frontend/src/App.tsx`](https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/App.tsx) (Page routing), [`backend/app/auth/routes.py`](https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/auth/routes.py) (Auth routes), [`taskflow-frontend/src/pages/Dashboard.tsx`](https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/pages/Dashboard.tsx) (Task dashboard), [`backend/app/tasks/routes.py`](https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/tasks/routes.py) (Task routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web app"]
  node_entry["App bootstrap<br/>[main.tsx]"]
  node_router["Page routing<br/>[App.tsx]"]
  node_api["HTTP client<br/>[axios.ts]"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
  node_analyticsui["Analytics page<br/>[Analytics.tsx]"]
end

subgraph group_identity["Identity"]
  node_login["Login page<br/>[Login.tsx]"]
  node_register["Registration page<br/>[Register.tsx]"]
  node_authcontext["Auth state<br/>[AuthContext.tsx]"]
  node_guard["Route guard<br/>[ProtectedRoute.tsx]"]
  node_authroutes["Auth routes<br/>[routes.py]"]
  node_authlogic["Token and passwords<br/>[utils.py]"]
  node_authdeps["User dependency<br/>[deps.py]"]
  node_users[("In-memory users<br/>[routes.py]")]
end

subgraph group_tasks["Task management"]
  node_dashboard["Task dashboard<br/>[Dashboard.tsx]"]
  node_taskcard["Task card<br/>[TaskCard.tsx]"]
  node_taskroutes["Task routes<br/>[routes.py]"]
  node_taskmodel["Task model<br/>[models.py]"]
end

subgraph group_backend["Backend services"]
  node_server["API application<br/>[main.py]"]
  node_analyticsroutes["Analytics routes<br/>[routes.py]"]
  node_dbsession["Database sessions<br/>[database.py]"]
  node_database[("Task database<br/>[database.py]")]
end

node_user(("User"))

node_user -->|"uses"| node_entry
node_entry -->|"provides state"| node_authcontext
node_entry -->|"renders"| node_router
node_router -->|"routes"| node_login
node_router -->|"routes"| node_register
node_router -->|"protects pages"| node_guard
node_guard -->|"allows access"| node_dashboard
node_guard -->|"allows access"| node_analyticsui
node_login -->|"signs in"| node_authcontext
node_register -->|"registers"| node_authcontext
node_authcontext -->|"sends requests"| node_api
node_dashboard -->|"task requests"| node_api
node_dashboard -->|"renders tasks"| node_taskcard
node_dashboard -->|"renders"| node_navbar
node_analyticsui -->|"renders"| node_navbar
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_taskroutes
node_server -->|"mounts"| node_analyticsroutes
node_authroutes -->|"reads and writes"| node_users
node_authroutes -->|"hashes and issues tokens"| node_authlogic
node_authroutes -->|"serves auth requests"| node_api
node_taskroutes -->|"requires user"| node_authdeps
node_taskroutes -->|"uses session"| node_dbsession
node_taskroutes -->|"queries and updates"| node_taskmodel
node_analyticsroutes -->|"requires user"| node_authdeps
node_analyticsroutes -->|"uses session"| node_dbsession
node_analyticsroutes -->|"counts tasks"| node_taskmodel
node_dbsession -->|"reads and writes"| node_database

click node_entry "https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/main.tsx"
click node_router "https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/App.tsx"
click node_login "https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/auth/Login.tsx"
click node_register "https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/auth/Register.tsx"
click node_authcontext "https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/context/AuthContext.tsx"
click node_guard "https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/auth/ProtectedRoute.tsx"
click node_api "https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/api/axios.ts"
click node_dashboard "https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/pages/Dashboard.tsx"
click node_taskcard "https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/components/TaskCard.tsx"
click node_navbar "https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/components/Navbar.tsx"
click node_analyticsui "https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/pages/Analytics.tsx"
click node_server "https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/main.py"
click node_authroutes "https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/auth/routes.py"
click node_authlogic "https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/auth/utils.py"
click node_authdeps "https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/auth/deps.py"
click node_users "https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/auth/routes.py"
click node_taskroutes "https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/tasks/routes.py"
click node_analyticsroutes "https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/analytics/routes.py"
click node_taskmodel "https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/tasks/models.py"
click node_dbsession "https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/database.py"
click node_database "https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/database.py"

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_entry,node_router,node_api,node_navbar,node_analyticsui,node_user toneBlue
class node_login,node_register,node_authcontext,node_guard,node_authroutes,node_authlogic,node_authdeps,node_users toneAmber
class node_dashboard,node_taskcard,node_taskroutes,node_taskmodel toneMint
class node_server,node_analyticsroutes,node_dbsession,node_database toneRose
```

## Components

### Web app

- [App bootstrap](https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/main.tsx): `taskflow-frontend/src/main.tsx`
- [Page routing](https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/App.tsx): `taskflow-frontend/src/App.tsx`
- [HTTP client](https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/api/axios.ts): `taskflow-frontend/src/api/axios.ts`
- [Navigation](https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/components/Navbar.tsx): `taskflow-frontend/src/components/Navbar.tsx`
- [Analytics page](https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/pages/Analytics.tsx): `taskflow-frontend/src/pages/Analytics.tsx`

### Identity

- [Login page](https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/auth/Login.tsx): `taskflow-frontend/src/auth/Login.tsx`
- [Registration page](https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/auth/Register.tsx): `taskflow-frontend/src/auth/Register.tsx`
- [Auth state](https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/context/AuthContext.tsx): `taskflow-frontend/src/context/AuthContext.tsx`
- [Route guard](https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/auth/ProtectedRoute.tsx): `taskflow-frontend/src/auth/ProtectedRoute.tsx`
- [Auth routes](https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/auth/routes.py): `backend/app/auth/routes.py`
- [Token and passwords](https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/auth/utils.py): `backend/app/auth/utils.py`
- [User dependency](https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/auth/deps.py): `backend/app/auth/deps.py`
- [In-memory users](https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/auth/routes.py): `backend/app/auth/routes.py`

### Task management

- [Task dashboard](https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/pages/Dashboard.tsx): `taskflow-frontend/src/pages/Dashboard.tsx`
- [Task card](https://github.com/raghavendrabaheti/task-todo/blob/main/taskflow-frontend/src/components/TaskCard.tsx): `taskflow-frontend/src/components/TaskCard.tsx`
- [Task routes](https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/tasks/routes.py): `backend/app/tasks/routes.py`
- [Task model](https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/tasks/models.py): `backend/app/tasks/models.py`

### Backend services

- [API application](https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/main.py): `backend/app/main.py`
- [Analytics routes](https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/analytics/routes.py): `backend/app/analytics/routes.py`
- [Database sessions](https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/database.py): `backend/app/database.py`
- [Task database](https://github.com/raghavendrabaheti/task-todo/blob/main/backend/app/database.py): `backend/app/database.py`

### Other components

- **User**

## Connections

- User → App bootstrap: uses
- App bootstrap → Auth state: provides state
- App bootstrap → Page routing: renders
- Page routing → Login page: routes
- Page routing → Registration page: routes
- Page routing → Route guard: protects pages
- Route guard → Task dashboard: allows access
- Route guard → Analytics page: allows access
- Login page → Auth state: signs in
- Registration page → Auth state: registers
- Auth state → HTTP client: sends requests
- Task dashboard → HTTP client: task requests
- Task dashboard → Task card: renders tasks
- Task dashboard → Navigation: renders
- Analytics page → Navigation: renders
- API application → Auth routes: mounts
- API application → Task routes: mounts
- API application → Analytics routes: mounts
- Auth routes → In-memory users: reads and writes
- Auth routes → Token and passwords: hashes and issues tokens
- Auth routes → HTTP client: serves auth requests
- Task routes → User dependency: requires user
- Task routes → Database sessions: uses session
- Task routes → Task model: queries and updates
- Analytics routes → User dependency: requires user
- Analytics routes → Database sessions: uses session
- Analytics routes → Task model: counts tasks
- Database sessions → Task database: reads and writes
