# yyzmiao/akasha architecture

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

- Interactive diagram: https://gitdiagram.com/yyzmiao/akasha
- Repository: https://github.com/yyzmiao/akasha

## Overview

Akasha is a local-first personal planning app: people organize areas and projects, then manage nested tasks, habits, and recurring schedules; calendar and journal views support daily planning and reflection. App.vue coordinates the feature views and persists domain data in IndexedDB. Optional branches provide global search, configurable AI-generated planning drafts, and PocketBase multi-device sync. The graph reflects documented capabilities and sampled call sites; unsampled view wiring is kept conservative.

Main entry points: [`src/App.vue`](https://github.com/yyzmiao/akasha/blob/main/src/App.vue) (App Coordinator), [`src/sync/syncEngine.ts`](https://github.com/yyzmiao/akasha/blob/main/src/sync/syncEngine.ts) (Sync Engine), [`src/components/copilot/CopilotModal.vue`](https://github.com/yyzmiao/akasha/blob/main/src/components/copilot/CopilotModal.vue) (AI Copilot), [`src/services/aiService.ts`](https://github.com/yyzmiao/akasha/blob/main/src/services/aiService.ts) (AI Planning Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_planning["Planning Workspace"]
  node_app["App Coordinator<br/>[App.vue]"]
  node_projects["Areas &amp; Projects<br/>[ProjectView.vue]"]
  node_todos["Nested Todos<br/>[TodoView.vue]"]
  node_habits["Habit Tracker<br/>[HabitsView.vue]"]
  node_schedules["Recurring Schedules<br/>[ScheduleView.vue]"]
  node_calendar["Calendar Dashboard<br/>[CalendarView.vue]"]
  node_journal["Daily Journal<br/>[JournalView.vue]"]
end

subgraph group_local["Local Data"]
  node_db[("IndexedDB<br/>[index.ts]")]
  node_types["Domain Types<br/>[index.ts]"]
end

subgraph group_integrations["Optional Integrations"]
  node_copilot["AI Copilot<br/>[CopilotModal.vue]"]
  node_ai["AI Planning Service<br/>[aiService.ts]"]
  node_sync["Sync Engine<br/>[syncEngine.ts]"]
  node_pocketbase_client["PocketBase Client<br/>[pocketbase.ts]"]
end

subgraph group_tools["Global Tools"]
  node_search["Global Search<br/>[GlobalSearch.vue]"]
  node_settings["Preferences &amp; Backup<br/>[SettingsDrawer.vue]"]
  node_navbar["Navigation<br/>[Navbar.vue]"]
  node_weather["Weather Widget<br/>[WeatherWidget.vue]"]
  node_weather_service["Weather &amp; Location<br/>[weather.ts]"]
end

node_person(("Planner"))
node_ai_provider(("AI Provider"))
node_pocketbase[("PocketBase Server")]
node_weather_apis(("Weather APIs"))

node_person -->|"uses"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_projects
node_app -->|"renders"| node_todos
node_app -->|"renders"| node_habits
node_app -->|"renders"| node_schedules
node_app -->|"renders"| node_calendar
node_app -->|"renders"| node_journal
node_app -->|"loads and saves"| node_db
node_app -->|"queues changes"| node_sync
node_app -->|"opens"| node_search
node_app -->|"opens"| node_settings
node_app -->|"opens"| node_copilot
node_app -->|"uses domain types"| node_types
node_copilot -->|"requests plans"| node_ai
node_ai -.->|"sends prompts"| node_ai_provider
node_sync -->|"reads and applies"| node_db
node_sync -->|"pushes and pulls"| node_pocketbase_client
node_pocketbase_client -->|"syncs records"| node_pocketbase
node_weather -->|"requests weather"| node_weather_service
node_weather_service -.->|"fetches forecasts"| node_weather_apis

click node_app "https://github.com/yyzmiao/akasha/blob/main/src/App.vue"
click node_projects "https://github.com/yyzmiao/akasha/blob/main/src/components/ProjectView.vue"
click node_todos "https://github.com/yyzmiao/akasha/blob/main/src/components/TodoView.vue"
click node_habits "https://github.com/yyzmiao/akasha/blob/main/src/components/HabitsView.vue"
click node_schedules "https://github.com/yyzmiao/akasha/blob/main/src/components/ScheduleView.vue"
click node_calendar "https://github.com/yyzmiao/akasha/blob/main/src/components/CalendarView.vue"
click node_journal "https://github.com/yyzmiao/akasha/blob/main/src/components/JournalView.vue"
click node_db "https://github.com/yyzmiao/akasha/blob/main/src/db/index.ts"
click node_types "https://github.com/yyzmiao/akasha/blob/main/src/types/index.ts"
click node_search "https://github.com/yyzmiao/akasha/blob/main/src/components/GlobalSearch.vue"
click node_settings "https://github.com/yyzmiao/akasha/blob/main/src/components/SettingsDrawer.vue"
click node_navbar "https://github.com/yyzmiao/akasha/blob/main/src/components/Navbar.vue"
click node_copilot "https://github.com/yyzmiao/akasha/blob/main/src/components/copilot/CopilotModal.vue"
click node_ai "https://github.com/yyzmiao/akasha/blob/main/src/services/aiService.ts"
click node_sync "https://github.com/yyzmiao/akasha/blob/main/src/sync/syncEngine.ts"
click node_pocketbase_client "https://github.com/yyzmiao/akasha/blob/main/src/sync/pocketbase.ts"
click node_weather "https://github.com/yyzmiao/akasha/blob/main/src/components/WeatherWidget.vue"
click node_weather_service "https://github.com/yyzmiao/akasha/blob/main/src/utils/weather.ts"

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_projects,node_todos,node_habits,node_schedules,node_calendar,node_journal toneBlue
class node_db,node_types,node_pocketbase toneAmber
class node_copilot,node_ai,node_sync,node_pocketbase_client,node_weather_apis toneMint
class node_search,node_settings,node_navbar,node_weather,node_weather_service toneRose
class node_person,node_ai_provider toneIndigo
```

## Components

### Planning Workspace

- [App Coordinator](https://github.com/yyzmiao/akasha/blob/main/src/App.vue): `src/App.vue`
- [Areas & Projects](https://github.com/yyzmiao/akasha/blob/main/src/components/ProjectView.vue): `src/components/ProjectView.vue`
- [Nested Todos](https://github.com/yyzmiao/akasha/blob/main/src/components/TodoView.vue): `src/components/TodoView.vue`
- [Habit Tracker](https://github.com/yyzmiao/akasha/blob/main/src/components/HabitsView.vue): `src/components/HabitsView.vue`
- [Recurring Schedules](https://github.com/yyzmiao/akasha/blob/main/src/components/ScheduleView.vue): `src/components/ScheduleView.vue`
- [Calendar Dashboard](https://github.com/yyzmiao/akasha/blob/main/src/components/CalendarView.vue): `src/components/CalendarView.vue`
- [Daily Journal](https://github.com/yyzmiao/akasha/blob/main/src/components/JournalView.vue): `src/components/JournalView.vue`

### Local Data

- [IndexedDB](https://github.com/yyzmiao/akasha/blob/main/src/db/index.ts): `src/db/index.ts`
- [Domain Types](https://github.com/yyzmiao/akasha/blob/main/src/types/index.ts): `src/types/index.ts`

### Optional Integrations

- [AI Copilot](https://github.com/yyzmiao/akasha/blob/main/src/components/copilot/CopilotModal.vue): `src/components/copilot/CopilotModal.vue`
- [AI Planning Service](https://github.com/yyzmiao/akasha/blob/main/src/services/aiService.ts): `src/services/aiService.ts`
- [Sync Engine](https://github.com/yyzmiao/akasha/blob/main/src/sync/syncEngine.ts): `src/sync/syncEngine.ts`
- [PocketBase Client](https://github.com/yyzmiao/akasha/blob/main/src/sync/pocketbase.ts): `src/sync/pocketbase.ts`

### Global Tools

- [Global Search](https://github.com/yyzmiao/akasha/blob/main/src/components/GlobalSearch.vue): `src/components/GlobalSearch.vue`
- [Preferences & Backup](https://github.com/yyzmiao/akasha/blob/main/src/components/SettingsDrawer.vue): `src/components/SettingsDrawer.vue`
- [Navigation](https://github.com/yyzmiao/akasha/blob/main/src/components/Navbar.vue): `src/components/Navbar.vue`
- [Weather Widget](https://github.com/yyzmiao/akasha/blob/main/src/components/WeatherWidget.vue): `src/components/WeatherWidget.vue`
- [Weather & Location](https://github.com/yyzmiao/akasha/blob/main/src/utils/weather.ts): `src/utils/weather.ts`

### Other components

- **Planner**
- **AI Provider**
- **PocketBase Server**
- **Weather APIs**

## Connections

- Planner → App Coordinator: uses
- App Coordinator → Navigation: renders
- App Coordinator → Areas & Projects: renders
- App Coordinator → Nested Todos: renders
- App Coordinator → Habit Tracker: renders
- App Coordinator → Recurring Schedules: renders
- App Coordinator → Calendar Dashboard: renders
- App Coordinator → Daily Journal: renders
- App Coordinator → IndexedDB: loads and saves
- App Coordinator → Sync Engine: queues changes
- App Coordinator → Global Search: opens
- App Coordinator → Preferences & Backup: opens
- App Coordinator → AI Copilot: opens
- App Coordinator → Domain Types: uses domain types
- AI Copilot → AI Planning Service: requests plans
- AI Planning Service → AI Provider: sends prompts
- Sync Engine → IndexedDB: reads and applies
- Sync Engine → PocketBase Client: pushes and pulls
- PocketBase Client → PocketBase Server: syncs records
- Weather Widget → Weather & Location: requests weather
- Weather & Location → Weather APIs: fetches forecasts
