# deonetwo/wadd-todo-app architecture

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

- Interactive diagram: https://gitdiagram.com/deonetwo/wadd-todo-app
- Repository: https://github.com/deonetwo/wadd-todo-app

## Overview

Wadd is a cross-platform, offline-first to-do application with task, goal, milestone, and journal workflows. Users work through Avalonia views and view models; service implementations persist local data in SQLite, while Google Drive sync replicates it and records conflicts for review. The README also documents AI goal coaching, calendar and recurrence, Excel export, and platform reminders. The graph preserves those product branches; unsampled feature wiring is shown only where the README establishes it, and source excerpts were partial.

Main entry points: [`src/Wadd.Services/GoogleDriveSyncService.cs`](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/GoogleDriveSyncService.cs) (Drive sync), [`src/Wadd.UI/ViewModels/MainViewModel.cs`](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.UI/ViewModels/MainViewModel.cs) (Main view model), [`src/Wadd.Services/Entities/TodoItemEntity.cs`](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/Entities/TodoItemEntity.cs) (Local SQLite), [`src/Wadd.UI/ViewModels/TaskReviewWizardViewModel.cs`](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.UI/ViewModels/TaskReviewWizardViewModel.cs) (Conflict review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User experience"]
  node_tasks_ui["Tasks and calendar<br/>[TasksView.axaml.cs]"]
  node_main_vm["Main view model<br/>[MainViewModel.cs]"]
  node_goals_ui["Goals and journal<br/>[GoalsViewModel.cs]"]
  node_conflict_ui["Conflict review"]
  node_app["App composition<br/>[App.axaml.cs]"]
end

subgraph group_domain["Application services"]
  node_todo_service["Task service"]
  node_goal_service["Goal service"]
  node_ai_goals["AI goal coaching<br/>[AiGoalService.cs]"]
  node_recurrence["Recurrence evaluator"]
  node_export["Data export<br/>[ExportService.cs]"]
end

subgraph group_data["Persistence and sync"]
  node_sync["Drive sync"]
  node_merge["Conflict merging"]
  node_conflict_repo["Conflict repository"]
  node_sync_log["Sync log repository"]
  node_sqlite[("Local SQLite<br/>[TodoItemEntity.cs]")]
end

subgraph group_platform["Platform integration"]
  node_android_widget["Today task widget"]
  node_notifications["Platform notifications"]
  node_oauth_worker["OAuth proxy<br/>[index.js]"]
end

subgraph group_cloud["External services"]
  node_drive[("Google Drive")]
  node_oauth["Google OAuth"]
  node_ai_provider["AI providers"]
end

node_user(("User"))

node_user -->|"uses"| node_tasks_ui
node_user -->|"uses"| node_goals_ui
node_tasks_ui -->|"invokes"| node_main_vm
node_main_vm -->|"loads and saves"| node_todo_service
node_main_vm -->|"requests sync"| node_sync
node_main_vm -->|"manages goals"| node_goal_service
node_main_vm -->|"exports data"| node_export
node_goals_ui -->|"manages goals"| node_goal_service
node_goals_ui -->|"requests coaching"| node_ai_goals
node_ai_goals -.->|"requests generation"| node_ai_provider
node_tasks_ui -->|"shows occurrences"| node_recurrence
node_todo_service -->|"reads and writes"| node_sqlite
node_goal_service -->|"reads and writes"| node_sqlite
node_sync -->|"merges local data"| node_sqlite
node_sync -->|"syncs records"| node_drive
node_sync -->|"tracks mutations"| node_sync_log
node_sync -->|"merges versions"| node_merge
node_merge -->|"records conflicts"| node_conflict_repo
node_conflict_ui -->|"resolves conflicts"| node_conflict_repo
node_conflict_ui -->|"saves resolution"| node_todo_service
node_conflict_ui -->|"refreshes status"| node_sync
node_sync -->|"exchanges tokens"| node_oauth_worker
node_oauth_worker -->|"exchanges credentials"| node_oauth
node_android_widget -->|"reads and updates tasks"| node_sqlite
node_app -->|"composes"| node_main_vm
node_app -->|"registers service"| node_notifications

click node_tasks_ui "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.UI/Views/TasksView.axaml.cs"
click node_main_vm "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.UI/ViewModels/MainViewModel.cs"
click node_goals_ui "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.UI/ViewModels/GoalsViewModel.cs"
click node_conflict_ui "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.UI/ViewModels/TaskReviewWizardViewModel.cs"
click node_app "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.UI/App.axaml.cs"
click node_todo_service "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/SQLiteTodoService.cs"
click node_goal_service "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/SQLiteGoalService.cs"
click node_ai_goals "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/AiGoalService.cs"
click node_recurrence "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/RecurrenceEvaluator.cs"
click node_export "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/ExportService.cs"
click node_sync "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/GoogleDriveSyncService.cs"
click node_merge "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/ConflictResolutionEngine.cs"
click node_conflict_repo "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/SQLiteConflictRepository.cs"
click node_sync_log "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/SQLiteSyncLogRepository.cs"
click node_sqlite "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/Entities/TodoItemEntity.cs"
click node_android_widget "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Android/TodayTasksWidgetProvider.cs"
click node_notifications "https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/WindowsNotificationService.cs"
click node_oauth_worker "https://github.com/deonetwo/wadd-todo-app/blob/main/serverless/cloudflare-worker/src/index.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_tasks_ui,node_main_vm,node_goals_ui,node_conflict_ui,node_app,node_user toneBlue
class node_todo_service,node_goal_service,node_ai_goals,node_recurrence,node_export toneAmber
class node_sync,node_merge,node_conflict_repo,node_sync_log,node_sqlite toneMint
class node_android_widget,node_notifications,node_oauth_worker toneRose
class node_drive,node_oauth,node_ai_provider toneIndigo
```

## Components

### User experience

- [Tasks and calendar](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.UI/Views/TasksView.axaml.cs): `src/Wadd.UI/Views/TasksView.axaml.cs`
- [Main view model](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.UI/ViewModels/MainViewModel.cs): `src/Wadd.UI/ViewModels/MainViewModel.cs`
- [Goals and journal](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.UI/ViewModels/GoalsViewModel.cs): `src/Wadd.UI/ViewModels/GoalsViewModel.cs`
- [Conflict review](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.UI/ViewModels/TaskReviewWizardViewModel.cs): `src/Wadd.UI/ViewModels/TaskReviewWizardViewModel.cs`
- [App composition](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.UI/App.axaml.cs): `src/Wadd.UI/App.axaml.cs`

### Application services

- [Task service](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/SQLiteTodoService.cs): `src/Wadd.Services/SQLiteTodoService.cs`
- [Goal service](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/SQLiteGoalService.cs): `src/Wadd.Services/SQLiteGoalService.cs`
- [AI goal coaching](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/AiGoalService.cs): `src/Wadd.Services/AiGoalService.cs`
- [Recurrence evaluator](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/RecurrenceEvaluator.cs): `src/Wadd.Services/RecurrenceEvaluator.cs`
- [Data export](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/ExportService.cs): `src/Wadd.Services/ExportService.cs`

### Persistence and sync

- [Drive sync](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/GoogleDriveSyncService.cs): `src/Wadd.Services/GoogleDriveSyncService.cs`
- [Conflict merging](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/ConflictResolutionEngine.cs): `src/Wadd.Services/ConflictResolutionEngine.cs`
- [Conflict repository](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/SQLiteConflictRepository.cs): `src/Wadd.Services/SQLiteConflictRepository.cs`
- [Sync log repository](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/SQLiteSyncLogRepository.cs): `src/Wadd.Services/SQLiteSyncLogRepository.cs`
- [Local SQLite](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/Entities/TodoItemEntity.cs): `src/Wadd.Services/Entities/TodoItemEntity.cs`

### Platform integration

- [Today task widget](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Android/TodayTasksWidgetProvider.cs): `src/Wadd.Android/TodayTasksWidgetProvider.cs`
- [Platform notifications](https://github.com/deonetwo/wadd-todo-app/blob/main/src/Wadd.Services/WindowsNotificationService.cs): `src/Wadd.Services/WindowsNotificationService.cs`
- [OAuth proxy](https://github.com/deonetwo/wadd-todo-app/blob/main/serverless/cloudflare-worker/src/index.js): `serverless/cloudflare-worker/src/index.js`

### External services

- **Google Drive**
- **Google OAuth**
- **AI providers**

### Other components

- **User**

## Connections

- User → Tasks and calendar: uses
- User → Goals and journal: uses
- Tasks and calendar → Main view model: invokes
- Main view model → Task service: loads and saves
- Main view model → Drive sync: requests sync
- Main view model → Goal service: manages goals
- Main view model → Data export: exports data
- Goals and journal → Goal service: manages goals
- Goals and journal → AI goal coaching: requests coaching
- AI goal coaching → AI providers: requests generation
- Tasks and calendar → Recurrence evaluator: shows occurrences
- Task service → Local SQLite: reads and writes
- Goal service → Local SQLite: reads and writes
- Drive sync → Local SQLite: merges local data
- Drive sync → Google Drive: syncs records
- Drive sync → Sync log repository: tracks mutations
- Drive sync → Conflict merging: merges versions
- Conflict merging → Conflict repository: records conflicts
- Conflict review → Conflict repository: resolves conflicts
- Conflict review → Task service: saves resolution
- Conflict review → Drive sync: refreshes status
- Drive sync → OAuth proxy: exchanges tokens
- OAuth proxy → Google OAuth: exchanges credentials
- Today task widget → Local SQLite: reads and updates tasks
- App composition → Main view model: composes
- App composition → Platform notifications: registers service
