# dustywoods/reminder architecture

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

- Interactive diagram: https://gitdiagram.com/dustywoods/reminder
- Repository: https://github.com/dustywoods/reminder

## Overview

拾序（Reminder） is a Flutter task-management app backed by FastAPI. Users authenticate, enter a natural-language task request, and receive task changes or a planning summary: the documented ReAct workflow plans, acts, observes/retries, then summarizes. The app also exposes task-list/calendar views and local reminders. The README documents the major frontend/backend capabilities; sampled backend files confirm routing, persistence, and agent behavior. Frontend implementation excerpts were not provided, so its internal links follow documented architecture rather than inspected calls; voice input is described as not yet integrated.

Main entry points: [`backend/main.py`](https://github.com/dustywoods/reminder/blob/master/backend/main.py) (FastAPI app), [`backend/agent/graph.py`](https://github.com/dustywoods/reminder/blob/master/backend/agent/graph.py) (Workflow routing), [`backend/utils/database.py`](https://github.com/dustywoods/reminder/blob/master/backend/utils/database.py) (SQLite data), [`frontend/lib/Page`](https://github.com/dustywoods/reminder/tree/master/frontend/lib/Page) (Task and account pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Flutter app"]
  node_frontend["App entry and routes<br/>[main.dart]"]
  node_pages["Task and account pages"]
  node_taskstate["Task state<br/>[TaskManager.dart]"]
  node_loginstate["Login state<br/>[LoginManager.dart]"]
  node_apis["API clients"]
  node_notifications["Local reminders"]
end

subgraph group_api["Backend API"]
  node_main["FastAPI app<br/>[main.py]"]
  node_authroute["Auth routes<br/>[auth.py]"]
  node_taskroute["Task routes<br/>[task.py]"]
  node_textroute["Text interaction<br/>[text.py]"]
  node_voiceroute["Voice routes<br/>[voice.py]"]
  node_schemas["Request schemas<br/>[schemas.py]"]
end

subgraph group_agent["ReAct agent"]
  node_plan["Plan<br/>[nodes.py]"]
  node_act["Act<br/>[nodes.py]"]
  node_observe["Observe and retry<br/>[nodes.py]"]
  node_summarize["Summarize<br/>[nodes.py]"]
  node_workflow["Workflow routing<br/>[graph.py]"]
  node_actions["Task operations<br/>[actions.py]"]
  node_prompts["Agent prompts<br/>[prompts.py]"]
  node_agentstate["Agent state<br/>[state.py]"]
end

subgraph group_services["Backend services"]
  node_llmhelper["LLM helper<br/>[llm_helpers.py]"]
  node_authservice["Authentication service<br/>[auth.py]"]
  node_asr["Speech recognition<br/>[asr.py]"]
end

subgraph group_state["Persistence and state"]
  node_sqlite[("SQLite data<br/>[database.py]")]
  node_settings["Backend settings<br/>[settings.py]"]
end

node_user(("User"))
node_llm["DeepSeek LLM"]

node_user -->|"uses"| node_frontend
node_frontend -->|"routes to"| node_pages
node_pages -->|"requests"| node_apis
node_pages -->|"updates"| node_taskstate
node_pages -->|"uses"| node_loginstate
node_pages -->|"schedules reminders"| node_notifications
node_apis -->|"HTTP requests"| node_main
node_main -->|"registers"| node_authroute
node_main -->|"registers"| node_taskroute
node_main -->|"registers"| node_textroute
node_main -->|"registers"| node_voiceroute
node_authroute -->|"calls"| node_authservice
node_authroute -->|"loads tasks"| node_sqlite
node_authservice -->|"accesses"| node_sqlite
node_taskroute -->|"reads and writes"| node_sqlite
node_textroute -->|"runs agent"| node_workflow
node_voiceroute -->|"recognizes audio"| node_asr
node_voiceroute -->|"processes transcript"| node_workflow
node_workflow -->|"runs"| node_plan
node_workflow -->|"dispatches"| node_act
node_workflow -->|"routes"| node_observe
node_workflow -->|"routes"| node_summarize
node_plan -->|"builds prompt"| node_prompts
node_plan -->|"creates LLM"| node_llmhelper
node_plan -->|"loads task context"| node_sqlite
node_act -->|"executes steps"| node_actions
node_act -->|"loads task context"| node_sqlite
node_summarize -->|"builds prompt"| node_prompts
node_summarize -->|"creates LLM"| node_llmhelper
node_actions -->|"manages tasks"| node_sqlite
node_llmhelper -.->|"invokes"| node_llm
node_asr -->|"reads configuration"| node_settings
node_main -->|"reads configuration"| node_settings
node_taskstate -.->|"synchronizes tasks"| node_apis
node_loginstate -.->|"authenticates"| node_apis

click node_frontend "https://github.com/dustywoods/reminder/blob/master/frontend/lib/main.dart"
click node_pages "https://github.com/dustywoods/reminder/tree/master/frontend/lib/Page"
click node_taskstate "https://github.com/dustywoods/reminder/blob/master/frontend/lib/stores/TaskManager.dart"
click node_loginstate "https://github.com/dustywoods/reminder/blob/master/frontend/lib/stores/LoginManager.dart"
click node_apis "https://github.com/dustywoods/reminder/tree/master/frontend/lib/api"
click node_notifications "https://github.com/dustywoods/reminder/blob/master/frontend/lib/Services/NotificationService.dart"
click node_main "https://github.com/dustywoods/reminder/blob/master/backend/main.py"
click node_authroute "https://github.com/dustywoods/reminder/blob/master/backend/routers/auth.py"
click node_taskroute "https://github.com/dustywoods/reminder/blob/master/backend/routers/task.py"
click node_textroute "https://github.com/dustywoods/reminder/blob/master/backend/routers/text.py"
click node_voiceroute "https://github.com/dustywoods/reminder/blob/master/backend/routers/voice.py"
click node_schemas "https://github.com/dustywoods/reminder/blob/master/backend/models/schemas.py"
click node_plan "https://github.com/dustywoods/reminder/blob/master/backend/agent/nodes.py"
click node_act "https://github.com/dustywoods/reminder/blob/master/backend/agent/nodes.py"
click node_observe "https://github.com/dustywoods/reminder/blob/master/backend/agent/nodes.py"
click node_summarize "https://github.com/dustywoods/reminder/blob/master/backend/agent/nodes.py"
click node_workflow "https://github.com/dustywoods/reminder/blob/master/backend/agent/graph.py"
click node_actions "https://github.com/dustywoods/reminder/blob/master/backend/agent/actions.py"
click node_prompts "https://github.com/dustywoods/reminder/blob/master/backend/agent/prompts.py"
click node_agentstate "https://github.com/dustywoods/reminder/blob/master/backend/agent/state.py"
click node_llmhelper "https://github.com/dustywoods/reminder/blob/master/backend/utils/llm_helpers.py"
click node_authservice "https://github.com/dustywoods/reminder/blob/master/backend/services/auth.py"
click node_asr "https://github.com/dustywoods/reminder/blob/master/backend/services/asr.py"
click node_sqlite "https://github.com/dustywoods/reminder/blob/master/backend/utils/database.py"
click node_settings "https://github.com/dustywoods/reminder/blob/master/backend/config/settings.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_frontend,node_pages,node_taskstate,node_loginstate,node_apis,node_notifications,node_user toneBlue
class node_main,node_authroute,node_taskroute,node_textroute,node_voiceroute,node_schemas toneAmber
class node_plan,node_act,node_observe,node_summarize,node_workflow,node_actions,node_prompts,node_agentstate toneMint
class node_llmhelper,node_authservice,node_asr toneRose
class node_sqlite,node_settings,node_llm toneIndigo
```

## Components

### Flutter app

- [App entry and routes](https://github.com/dustywoods/reminder/blob/master/frontend/lib/main.dart): `frontend/lib/main.dart`
- [Task and account pages](https://github.com/dustywoods/reminder/tree/master/frontend/lib/Page): `frontend/lib/Page`
- [Task state](https://github.com/dustywoods/reminder/blob/master/frontend/lib/stores/TaskManager.dart): `frontend/lib/stores/TaskManager.dart`
- [Login state](https://github.com/dustywoods/reminder/blob/master/frontend/lib/stores/LoginManager.dart): `frontend/lib/stores/LoginManager.dart`
- [API clients](https://github.com/dustywoods/reminder/tree/master/frontend/lib/api): `frontend/lib/api`
- [Local reminders](https://github.com/dustywoods/reminder/blob/master/frontend/lib/Services/NotificationService.dart): `frontend/lib/Services/NotificationService.dart`

### Backend API

- [FastAPI app](https://github.com/dustywoods/reminder/blob/master/backend/main.py): `backend/main.py`
- [Auth routes](https://github.com/dustywoods/reminder/blob/master/backend/routers/auth.py): `backend/routers/auth.py`
- [Task routes](https://github.com/dustywoods/reminder/blob/master/backend/routers/task.py): `backend/routers/task.py`
- [Text interaction](https://github.com/dustywoods/reminder/blob/master/backend/routers/text.py): `backend/routers/text.py`
- [Voice routes](https://github.com/dustywoods/reminder/blob/master/backend/routers/voice.py): `backend/routers/voice.py`
- [Request schemas](https://github.com/dustywoods/reminder/blob/master/backend/models/schemas.py): `backend/models/schemas.py`

### ReAct agent

- [Plan](https://github.com/dustywoods/reminder/blob/master/backend/agent/nodes.py): `backend/agent/nodes.py`
- [Act](https://github.com/dustywoods/reminder/blob/master/backend/agent/nodes.py): `backend/agent/nodes.py`
- [Observe and retry](https://github.com/dustywoods/reminder/blob/master/backend/agent/nodes.py): `backend/agent/nodes.py`
- [Summarize](https://github.com/dustywoods/reminder/blob/master/backend/agent/nodes.py): `backend/agent/nodes.py`
- [Workflow routing](https://github.com/dustywoods/reminder/blob/master/backend/agent/graph.py): `backend/agent/graph.py`
- [Task operations](https://github.com/dustywoods/reminder/blob/master/backend/agent/actions.py): `backend/agent/actions.py`
- [Agent prompts](https://github.com/dustywoods/reminder/blob/master/backend/agent/prompts.py): `backend/agent/prompts.py`
- [Agent state](https://github.com/dustywoods/reminder/blob/master/backend/agent/state.py): `backend/agent/state.py`

### Backend services

- [LLM helper](https://github.com/dustywoods/reminder/blob/master/backend/utils/llm_helpers.py): `backend/utils/llm_helpers.py`
- [Authentication service](https://github.com/dustywoods/reminder/blob/master/backend/services/auth.py): `backend/services/auth.py`
- [Speech recognition](https://github.com/dustywoods/reminder/blob/master/backend/services/asr.py): `backend/services/asr.py`

### Persistence and state

- [SQLite data](https://github.com/dustywoods/reminder/blob/master/backend/utils/database.py): `backend/utils/database.py`
- [Backend settings](https://github.com/dustywoods/reminder/blob/master/backend/config/settings.py): `backend/config/settings.py`

### Other components

- **User**
- **DeepSeek LLM**

## Connections

- User → App entry and routes: uses (evidence: `README.md`)
- App entry and routes → Task and account pages: routes to (evidence: `README.md`)
- Task and account pages → API clients: requests (evidence: `README.md`)
- Task and account pages → Task state: updates (evidence: `README.md`)
- Task and account pages → Login state: uses (evidence: `README.md`)
- Task and account pages → Local reminders: schedules reminders (evidence: `README.md`)
- API clients → FastAPI app: HTTP requests (evidence: `README.md`)
- FastAPI app → Auth routes: registers (evidence: `backend/main.py`)
- FastAPI app → Task routes: registers (evidence: `backend/main.py`)
- FastAPI app → Text interaction: registers (evidence: `backend/main.py`)
- FastAPI app → Voice routes: registers (evidence: `backend/main.py`)
- Auth routes → Authentication service: calls (evidence: `backend/routers/auth.py`)
- Auth routes → SQLite data: loads tasks (evidence: `backend/routers/auth.py`)
- Authentication service → SQLite data: accesses (evidence: `backend/services/auth.py`)
- Task routes → SQLite data: reads and writes (evidence: `backend/routers/task.py`)
- Text interaction → Workflow routing: runs agent (evidence: `backend/routers/text.py`)
- Voice routes → Speech recognition: recognizes audio (evidence: `backend/routers/voice.py`)
- Voice routes → Workflow routing: processes transcript (evidence: `backend/routers/voice.py`)
- Workflow routing → Plan: runs (evidence: `backend/agent/graph.py`)
- Workflow routing → Act: dispatches (evidence: `backend/agent/graph.py`)
- Workflow routing → Observe and retry: routes (evidence: `backend/agent/graph.py`)
- Workflow routing → Summarize: routes (evidence: `backend/agent/graph.py`)
- Plan → Agent prompts: builds prompt (evidence: `backend/agent/nodes.py`)
- Plan → LLM helper: creates LLM (evidence: `backend/agent/nodes.py`)
- Plan → SQLite data: loads task context (evidence: `backend/agent/nodes.py`)
- Act → Task operations: executes steps (evidence: `backend/agent/nodes.py`)
- Act → SQLite data: loads task context (evidence: `backend/agent/nodes.py`)
- Summarize → Agent prompts: builds prompt (evidence: `backend/agent/nodes.py`)
- Summarize → LLM helper: creates LLM (evidence: `backend/agent/nodes.py`)
- Task operations → SQLite data: manages tasks (evidence: `backend/agent/actions.py`)
- LLM helper → DeepSeek LLM: invokes
- Speech recognition → Backend settings: reads configuration (evidence: `backend/services/asr.py`)
- FastAPI app → Backend settings: reads configuration (evidence: `backend/main.py`)
- Task state → API clients: synchronizes tasks
- Login state → API clients: authenticates
