# xecipher/chronoa architecture

> Architecture diagram of the GitHub repository xecipher/chronoa, 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/xecipher/chronoa
- Repository: https://github.com/xecipher/chronoa

## Overview

Chronoa is a synced personal productivity workspace. Users sign in, then manage nested tasks and routines, track focus sessions, plan events, and journal; dashboard views also surface productivity analytics and a time-responsive environment. The map preserves README-documented capabilities, including Realtime sync and routine resets, while some subsystem wiring is based on README descriptions because its implementation was not sampled.

Main entry points: [`frontend/lib/supabase.ts`](https://github.com/xecipher/chronoa/blob/main/frontend/lib/supabase.ts) (Supabase services), [`frontend/components/tasks/TaskSection.tsx`](https://github.com/xecipher/chronoa/blob/main/frontend/components/tasks/TaskSection.tsx) (Task management), [`frontend/app/(dashboard)/layout.tsx`](https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/layout.tsx) (Dashboard shell), [`frontend/app/(dashboard)/home/page.tsx`](https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/home/page.tsx) (Home view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Access and Workspace"]
  node_login["Sign in<br/>[page.tsx]"]
  node_authcallback["Auth callback<br/>[route.ts]"]
  node_dashboard["Dashboard shell<br/>[layout.tsx]"]
  node_home["Home view<br/>[page.tsx]"]
  node_deleteaccount["Account deletion<br/>[route.ts]"]
end

subgraph group_planning["Tasks and Calendar"]
  node_tasks["Task management<br/>[TaskSection.tsx]"]
  node_taskitem["Nested task controls"]
  node_taskpage["Tasks page<br/>[page.tsx]"]
  node_calendar["Calendar views<br/>[page.tsx]"]
  node_icsapi["ICS fetch route<br/>[route.ts]"]
  node_ics["ICS processing<br/>[icsParser.ts]"]
end

subgraph group_reflection["Journaling and Insights"]
  node_notespage["Notes and journals<br/>[page.tsx]"]
  node_editor["Rich text editor"]
  node_analytics["Productivity analytics<br/>[page.tsx]"]
end

subgraph group_platform["Sync and Experience"]
  node_timer["Shared timer state<br/>[timerStore.ts]"]
  node_ui["Shared UI state<br/>[uiStore.ts]"]
  node_supabase[("Supabase services<br/>[supabase.ts]")]
  node_realtime["Realtime channels"]
  node_cron["Routine reset job"]
  node_environment["Living environment"]
  node_ai["AI assistant<br/>[AiChatWidget.tsx]"]
end

node_user(("Workspace user"))
node_feed(("Calendar provider"))

node_user -->|"signs in"| node_login
node_login -->|"completes auth"| node_authcallback
node_authcallback -->|"exchanges code"| node_supabase
node_user -->|"opens workspace"| node_dashboard
node_dashboard -->|"shows home"| node_home
node_taskpage -->|"renders tasks"| node_tasks
node_tasks -->|"renders controls"| node_taskitem
node_tasks -->|"reads and writes tasks"| node_supabase
node_calendar -->|"reads and writes events"| node_supabase
node_calendar -->|"syncs subscribed feeds"| node_ics
node_ics -->|"requests feed"| node_icsapi
node_icsapi -->|"fetches calendar"| node_feed
node_ics -->|"upserts events"| node_supabase
node_notespage -->|"edits entries"| node_editor
node_notespage -->|"loads and saves entries"| node_supabase
node_analytics -->|"reads activity"| node_supabase
node_home -->|"uses timer state"| node_timer
node_timer -->|"syncs timer state"| node_supabase
node_tasks -.->|"broadcasts task changes"| node_realtime
node_realtime -.->|"uses channels"| node_supabase
node_cron -.->|"resets routines"| node_supabase
node_home -->|"renders scenery"| node_environment
node_dashboard -->|"shares UI state"| node_ui
node_user -->|"requests assistance"| node_ai
node_ai -->|"changes workspace data"| node_supabase
node_user -->|"requests deletion"| node_deleteaccount
node_deleteaccount -->|"deletes user data"| node_supabase

click node_login "https://github.com/xecipher/chronoa/blob/main/frontend/app/(auth)/login/page.tsx"
click node_authcallback "https://github.com/xecipher/chronoa/blob/main/frontend/app/auth/callback/route.ts"
click node_dashboard "https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/layout.tsx"
click node_home "https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/home/page.tsx"
click node_tasks "https://github.com/xecipher/chronoa/blob/main/frontend/components/tasks/TaskSection.tsx"
click node_taskitem "https://github.com/xecipher/chronoa/blob/main/frontend/components/ui/RecursiveCheckbox.tsx"
click node_taskpage "https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/tasks/page.tsx"
click node_calendar "https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/calendar/page.tsx"
click node_icsapi "https://github.com/xecipher/chronoa/blob/main/frontend/app/api/calendar/fetch-ics/route.ts"
click node_ics "https://github.com/xecipher/chronoa/blob/main/frontend/lib/icsParser.ts"
click node_notespage "https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/notes/page.tsx"
click node_editor "https://github.com/xecipher/chronoa/blob/main/frontend/components/notes/DistractionFreeEditor.tsx"
click node_analytics "https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/analytics/page.tsx"
click node_timer "https://github.com/xecipher/chronoa/blob/main/frontend/store/timerStore.ts"
click node_ui "https://github.com/xecipher/chronoa/blob/main/frontend/store/uiStore.ts"
click node_supabase "https://github.com/xecipher/chronoa/blob/main/frontend/lib/supabase.ts"
click node_environment "https://github.com/xecipher/chronoa/blob/main/frontend/components/home/SceneryBackground.tsx"
click node_ai "https://github.com/xecipher/chronoa/blob/main/frontend/components/ai/AiChatWidget.tsx"
click node_deleteaccount "https://github.com/xecipher/chronoa/blob/main/frontend/app/api/auth/delete-account/route.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_login,node_authcallback,node_dashboard,node_home,node_deleteaccount,node_user toneBlue
class node_tasks,node_taskitem,node_taskpage,node_calendar,node_icsapi,node_ics toneAmber
class node_notespage,node_editor,node_analytics toneMint
class node_timer,node_ui,node_supabase,node_realtime,node_cron,node_environment,node_ai toneRose
class node_feed toneIndigo
```

## Components

### Access and Workspace

- [Sign in](https://github.com/xecipher/chronoa/blob/main/frontend/app/(auth)/login/page.tsx): `frontend/app/(auth)/login/page.tsx`
- [Auth callback](https://github.com/xecipher/chronoa/blob/main/frontend/app/auth/callback/route.ts): `frontend/app/auth/callback/route.ts`
- [Dashboard shell](https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/layout.tsx): `frontend/app/(dashboard)/layout.tsx`
- [Home view](https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/home/page.tsx): `frontend/app/(dashboard)/home/page.tsx`
- [Account deletion](https://github.com/xecipher/chronoa/blob/main/frontend/app/api/auth/delete-account/route.ts): `frontend/app/api/auth/delete-account/route.ts`

### Tasks and Calendar

- [Task management](https://github.com/xecipher/chronoa/blob/main/frontend/components/tasks/TaskSection.tsx): `frontend/components/tasks/TaskSection.tsx`
- [Nested task controls](https://github.com/xecipher/chronoa/blob/main/frontend/components/ui/RecursiveCheckbox.tsx): `frontend/components/ui/RecursiveCheckbox.tsx`
- [Tasks page](https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/tasks/page.tsx): `frontend/app/(dashboard)/tasks/page.tsx`
- [Calendar views](https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/calendar/page.tsx): `frontend/app/(dashboard)/calendar/page.tsx`
- [ICS fetch route](https://github.com/xecipher/chronoa/blob/main/frontend/app/api/calendar/fetch-ics/route.ts): `frontend/app/api/calendar/fetch-ics/route.ts`
- [ICS processing](https://github.com/xecipher/chronoa/blob/main/frontend/lib/icsParser.ts): `frontend/lib/icsParser.ts`

### Journaling and Insights

- [Notes and journals](https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/notes/page.tsx): `frontend/app/(dashboard)/notes/page.tsx`
- [Rich text editor](https://github.com/xecipher/chronoa/blob/main/frontend/components/notes/DistractionFreeEditor.tsx): `frontend/components/notes/DistractionFreeEditor.tsx`
- [Productivity analytics](https://github.com/xecipher/chronoa/blob/main/frontend/app/(dashboard)/analytics/page.tsx): `frontend/app/(dashboard)/analytics/page.tsx`

### Sync and Experience

- [Shared timer state](https://github.com/xecipher/chronoa/blob/main/frontend/store/timerStore.ts): `frontend/store/timerStore.ts`
- [Shared UI state](https://github.com/xecipher/chronoa/blob/main/frontend/store/uiStore.ts): `frontend/store/uiStore.ts`
- [Supabase services](https://github.com/xecipher/chronoa/blob/main/frontend/lib/supabase.ts): `frontend/lib/supabase.ts`
- **Realtime channels**
- **Routine reset job**
- [Living environment](https://github.com/xecipher/chronoa/blob/main/frontend/components/home/SceneryBackground.tsx): `frontend/components/home/SceneryBackground.tsx`
- [AI assistant](https://github.com/xecipher/chronoa/blob/main/frontend/components/ai/AiChatWidget.tsx): `frontend/components/ai/AiChatWidget.tsx`

### Other components

- **Workspace user**
- **Calendar provider**

## Connections

- Workspace user → Sign in: signs in
- Sign in → Auth callback: completes auth
- Auth callback → Supabase services: exchanges code
- Workspace user → Dashboard shell: opens workspace
- Dashboard shell → Home view: shows home
- Tasks page → Task management: renders tasks
- Task management → Nested task controls: renders controls
- Task management → Supabase services: reads and writes tasks
- Calendar views → Supabase services: reads and writes events
- Calendar views → ICS processing: syncs subscribed feeds
- ICS processing → ICS fetch route: requests feed
- ICS fetch route → Calendar provider: fetches calendar
- ICS processing → Supabase services: upserts events
- Notes and journals → Rich text editor: edits entries
- Notes and journals → Supabase services: loads and saves entries
- Productivity analytics → Supabase services: reads activity
- Home view → Shared timer state: uses timer state
- Shared timer state → Supabase services: syncs timer state
- Task management → Realtime channels: broadcasts task changes
- Realtime channels → Supabase services: uses channels
- Routine reset job → Supabase services: resets routines
- Home view → Living environment: renders scenery
- Dashboard shell → Shared UI state: shares UI state
- Workspace user → AI assistant: requests assistance
- AI assistant → Supabase services: changes workspace data
- Workspace user → Account deletion: requests deletion
- Account deletion → Supabase services: deletes user data
