# reshma1038/todo_app architecture

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

- Interactive diagram: https://gitdiagram.com/reshma1038/todo_app
- Repository: https://github.com/reshma1038/todo_app

## Overview

TaskFlow is a collaborative todo application: users authenticate, open or create shared pages, manage and reorder tasks, and view reminders, analytics, and AI task assistance. The frontend routes users to page and analytics views and calls the FastAPI API; backend services enforce business rules and persist data in MongoDB. The README documents major capabilities whose route implementations were not sampled; those nodes are retained, with only documented or indexed relationships shown.

Main entry points: [`backend/app/main.py`](https://github.com/reshma1038/todo_app/blob/main/backend/app/main.py) (API application), [`backend/app/db/mongodb.py`](https://github.com/reshma1038/todo_app/blob/main/backend/app/db/mongodb.py) (MongoDB collections), [`frontend/src/App.jsx`](https://github.com/reshma1038/todo_app/blob/main/frontend/src/App.jsx) (Route application), [`backend/app/services/auth_service.py`](https://github.com/reshma1038/todo_app/blob/main/backend/app/services/auth_service.py) (Account service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_app["Route application<br/>[App.jsx]"]
  node_session["Session context<br/>[AuthContext.jsx]"]
  node_authview["Login and registration<br/>[Login.jsx]"]
  node_dashboard["Page dashboard<br/>[Dashboard.jsx]"]
  node_pageview["Shared task page<br/>[TodoPage.jsx]"]
  node_analyticsview["Analytics view<br/>[Analytics.jsx]"]
  node_http["Authenticated API client<br/>[axios.js]"]
end

subgraph group_identity["Identity and pages"]
  node_authapi["Authentication API<br/>[authApi.js]"]
  node_pageapi["Page API<br/>[pageApi.js]"]
  node_authroutes["Authentication routes<br/>[auth.py]"]
  node_authservice["Account service<br/>[auth_service.py]"]
  node_pagesroutes["Page and membership routes<br/>[pages.py]"]
  node_pageservice["Page service<br/>[page_service.py]"]
end

subgraph group_tasks["Tasks and insights"]
  node_todoroutes["Task routes<br/>[todos.py]"]
  node_todoservice["Task service<br/>[todo_service.py]"]
  node_ai["AI task intelligence<br/>[ai_service.py]"]
  node_airoutes["AI routes<br/>[ai.py]"]
  node_analytics["Analytics service"]
  node_analyticsroutes["Analytics routes<br/>[analytics.py]"]
end

subgraph group_storage["Persistence and security"]
  node_server["API application<br/>[main.py]"]
  node_authdep["JWT and page authorization<br/>[auth.py]"]
  node_security["Token and password security<br/>[security.py]"]
  node_mongo[("MongoDB collections<br/>[mongodb.py]")]
end

node_user(("User"))
node_google["Google identity service"]
node_gemini["Google Gemini"]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_authview
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_pageview
node_app -->|"routes to"| node_analyticsview
node_authview -->|"authenticates through"| node_session
node_session -->|"calls"| node_authapi
node_authapi -->|"uses"| node_http
node_dashboard -->|"loads pages"| node_pageapi
node_pageview -->|"calls"| node_http
node_analyticsview -.->|"requests summary"| node_http
node_http -->|"HTTP requests"| node_server
node_server -->|"registers"| node_authroutes
node_server -->|"registers"| node_pagesroutes
node_server -->|"registers"| node_todoroutes
node_server -->|"registers"| node_airoutes
node_server -->|"registers"| node_analyticsroutes
node_authroutes -->|"calls"| node_authservice
node_authroutes -->|"creates tokens"| node_security
node_authservice -->|"hashes and verifies"| node_security
node_authservice -->|"reads and writes users"| node_mongo
node_authservice -.->|"verifies ID token"| node_google
node_pagesroutes -->|"calls"| node_pageservice
node_pageservice -->|"reads and writes pages"| node_mongo
node_authdep -->|"validates JWT"| node_security
node_authdep -->|"loads user and page"| node_mongo
node_todoroutes -.->|"requires access"| node_authdep
node_todoroutes -.->|"task operations"| node_todoservice
node_todoservice -->|"reads and writes tasks"| node_mongo
node_airoutes -->|"calls"| node_ai
node_airoutes -->|"gets task data"| node_todoservice
node_ai -.->|"optional AI requests"| node_gemini
node_ai -->|"reads task data"| node_mongo
node_analyticsroutes -.->|"requests summary"| node_analytics
node_analytics -.->|"reads task data"| node_mongo

click node_app "https://github.com/reshma1038/todo_app/blob/main/frontend/src/App.jsx"
click node_session "https://github.com/reshma1038/todo_app/blob/main/frontend/src/context/AuthContext.jsx"
click node_authview "https://github.com/reshma1038/todo_app/blob/main/frontend/src/pages/Login.jsx"
click node_dashboard "https://github.com/reshma1038/todo_app/blob/main/frontend/src/pages/Dashboard.jsx"
click node_pageview "https://github.com/reshma1038/todo_app/blob/main/frontend/src/pages/TodoPage.jsx"
click node_analyticsview "https://github.com/reshma1038/todo_app/blob/main/frontend/src/pages/Analytics.jsx"
click node_http "https://github.com/reshma1038/todo_app/blob/main/frontend/src/api/axios.js"
click node_authapi "https://github.com/reshma1038/todo_app/blob/main/frontend/src/api/authApi.js"
click node_pageapi "https://github.com/reshma1038/todo_app/blob/main/frontend/src/api/pageApi.js"
click node_authroutes "https://github.com/reshma1038/todo_app/blob/main/backend/app/api/auth.py"
click node_authservice "https://github.com/reshma1038/todo_app/blob/main/backend/app/services/auth_service.py"
click node_pagesroutes "https://github.com/reshma1038/todo_app/blob/main/backend/app/api/pages.py"
click node_pageservice "https://github.com/reshma1038/todo_app/blob/main/backend/app/services/page_service.py"
click node_todoroutes "https://github.com/reshma1038/todo_app/blob/main/backend/app/api/todos.py"
click node_todoservice "https://github.com/reshma1038/todo_app/blob/main/backend/app/services/todo_service.py"
click node_ai "https://github.com/reshma1038/todo_app/blob/main/backend/app/services/ai_service.py"
click node_airoutes "https://github.com/reshma1038/todo_app/blob/main/backend/app/api/ai.py"
click node_analytics "https://github.com/reshma1038/todo_app/blob/main/backend/app/services/analytics_service.py"
click node_analyticsroutes "https://github.com/reshma1038/todo_app/blob/main/backend/app/api/analytics.py"
click node_server "https://github.com/reshma1038/todo_app/blob/main/backend/app/main.py"
click node_authdep "https://github.com/reshma1038/todo_app/blob/main/backend/app/dependencies/auth.py"
click node_security "https://github.com/reshma1038/todo_app/blob/main/backend/app/core/security.py"
click node_mongo "https://github.com/reshma1038/todo_app/blob/main/backend/app/db/mongodb.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_app,node_session,node_authview,node_dashboard,node_pageview,node_analyticsview,node_http,node_user toneBlue
class node_authapi,node_pageapi,node_authroutes,node_authservice,node_pagesroutes,node_pageservice toneAmber
class node_todoroutes,node_todoservice,node_ai,node_airoutes,node_analytics,node_analyticsroutes toneMint
class node_server,node_authdep,node_security,node_mongo toneRose
class node_google,node_gemini toneIndigo
```

## Components

### Web application

- [Route application](https://github.com/reshma1038/todo_app/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Session context](https://github.com/reshma1038/todo_app/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Login and registration](https://github.com/reshma1038/todo_app/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Page dashboard](https://github.com/reshma1038/todo_app/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Shared task page](https://github.com/reshma1038/todo_app/blob/main/frontend/src/pages/TodoPage.jsx): `frontend/src/pages/TodoPage.jsx`
- [Analytics view](https://github.com/reshma1038/todo_app/blob/main/frontend/src/pages/Analytics.jsx): `frontend/src/pages/Analytics.jsx`
- [Authenticated API client](https://github.com/reshma1038/todo_app/blob/main/frontend/src/api/axios.js): `frontend/src/api/axios.js`

### Identity and pages

- [Authentication API](https://github.com/reshma1038/todo_app/blob/main/frontend/src/api/authApi.js): `frontend/src/api/authApi.js`
- [Page API](https://github.com/reshma1038/todo_app/blob/main/frontend/src/api/pageApi.js): `frontend/src/api/pageApi.js`
- [Authentication routes](https://github.com/reshma1038/todo_app/blob/main/backend/app/api/auth.py): `backend/app/api/auth.py`
- [Account service](https://github.com/reshma1038/todo_app/blob/main/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`
- [Page and membership routes](https://github.com/reshma1038/todo_app/blob/main/backend/app/api/pages.py): `backend/app/api/pages.py`
- [Page service](https://github.com/reshma1038/todo_app/blob/main/backend/app/services/page_service.py): `backend/app/services/page_service.py`

### Tasks and insights

- [Task routes](https://github.com/reshma1038/todo_app/blob/main/backend/app/api/todos.py): `backend/app/api/todos.py`
- [Task service](https://github.com/reshma1038/todo_app/blob/main/backend/app/services/todo_service.py): `backend/app/services/todo_service.py`
- [AI task intelligence](https://github.com/reshma1038/todo_app/blob/main/backend/app/services/ai_service.py): `backend/app/services/ai_service.py`
- [AI routes](https://github.com/reshma1038/todo_app/blob/main/backend/app/api/ai.py): `backend/app/api/ai.py`
- [Analytics service](https://github.com/reshma1038/todo_app/blob/main/backend/app/services/analytics_service.py): `backend/app/services/analytics_service.py`
- [Analytics routes](https://github.com/reshma1038/todo_app/blob/main/backend/app/api/analytics.py): `backend/app/api/analytics.py`

### Persistence and security

- [API application](https://github.com/reshma1038/todo_app/blob/main/backend/app/main.py): `backend/app/main.py`
- [JWT and page authorization](https://github.com/reshma1038/todo_app/blob/main/backend/app/dependencies/auth.py): `backend/app/dependencies/auth.py`
- [Token and password security](https://github.com/reshma1038/todo_app/blob/main/backend/app/core/security.py): `backend/app/core/security.py`
- [MongoDB collections](https://github.com/reshma1038/todo_app/blob/main/backend/app/db/mongodb.py): `backend/app/db/mongodb.py`

### Other components

- **User**
- **Google identity service**
- **Google Gemini**

## Connections

- User → Route application: uses (evidence: `frontend/src/App.jsx`)
- Route application → Login and registration: routes to (evidence: `frontend/src/App.jsx`)
- Route application → Page dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Route application → Shared task page: routes to (evidence: `frontend/src/App.jsx`)
- Route application → Analytics view: routes to (evidence: `frontend/src/App.jsx`)
- Login and registration → Session context: authenticates through
- Session context → Authentication API: calls (evidence: `frontend/src/context/AuthContext.jsx`)
- Authentication API → Authenticated API client: uses (evidence: `frontend/src/api/authApi.js`)
- Page dashboard → Page API: loads pages (evidence: `frontend/src/pages/Dashboard.jsx`)
- Shared task page → Authenticated API client: calls (evidence: `frontend/src/pages/TodoPage.jsx`)
- Analytics view → Authenticated API client: requests summary (evidence: `README.md`)
- Authenticated API client → API application: HTTP requests (evidence: `frontend/src/api/axios.js`)
- API application → Authentication routes: registers (evidence: `backend/app/main.py`)
- API application → Page and membership routes: registers (evidence: `backend/app/main.py`)
- API application → Task routes: registers (evidence: `backend/app/main.py`)
- API application → AI routes: registers (evidence: `backend/app/main.py`)
- API application → Analytics routes: registers (evidence: `backend/app/main.py`)
- Authentication routes → Account service: calls (evidence: `backend/app/api/auth.py`)
- Authentication routes → Token and password security: creates tokens (evidence: `backend/app/api/auth.py`)
- Account service → Token and password security: hashes and verifies (evidence: `backend/app/services/auth_service.py`)
- Account service → MongoDB collections: reads and writes users (evidence: `backend/app/services/auth_service.py`)
- Account service → Google identity service: verifies ID token (evidence: `backend/app/services/auth_service.py`)
- Page and membership routes → Page service: calls (evidence: `backend/app/api/pages.py`)
- Page service → MongoDB collections: reads and writes pages (evidence: `backend/app/services/page_service.py`)
- JWT and page authorization → Token and password security: validates JWT (evidence: `backend/app/dependencies/auth.py`)
- JWT and page authorization → MongoDB collections: loads user and page (evidence: `backend/app/dependencies/auth.py`)
- Task routes → JWT and page authorization: requires access (evidence: `README.md`)
- Task routes → Task service: task operations (evidence: `README.md`)
- Task service → MongoDB collections: reads and writes tasks (evidence: `backend/app/services/todo_service.py`)
- AI routes → AI task intelligence: calls (evidence: `backend/app/api/ai.py`)
- AI routes → Task service: gets task data (evidence: `backend/app/api/ai.py`)
- AI task intelligence → Google Gemini: optional AI requests (evidence: `README.md`)
- AI task intelligence → MongoDB collections: reads task data (evidence: `backend/app/services/ai_service.py`)
- Analytics routes → Analytics service: requests summary (evidence: `README.md`)
- Analytics service → MongoDB collections: reads task data (evidence: `README.md`)
