# t1mothys/smart-schedule-agent architecture

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

- Interactive diagram: https://gitdiagram.com/t1mothys/smart-schedule-agent
- Repository: https://github.com/t1mothys/smart-schedule-agent

## Overview

Orbit is a chat-first personal task workspace, delivered as a web app and Electron desktop app. Users authenticate, then converse with Orbit or navigate to dedicated views to plan and manage schedules, reminders, notes, knowledge, research, and reports; changes are served through authenticated APIs and persisted locally. The README documents optional CalDAV, local/cloud reports, media, and backup capabilities. The graph reflects documented product areas and only the source-level relationships visible in excerpts or the SOURCE INDEX; unsampled subsystem internals and their connections are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/t1mothys/smart-schedule-agent/blob/main/src/App.tsx) (App navigation), [`server/application.ts`](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/application.ts) (Server assembly), [`server/activity-store.ts`](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/activity-store.ts) (Activity and reports), [`server/search-service.ts`](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/search-service.ts) (Search service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User experience"]
  node_app["App navigation<br/>[App.tsx]"]
  node_authui["Authentication UI<br/>[useAuth.ts]"]
  node_scheduleui["Schedule workspace<br/>[CalendarView.tsx]"]
  node_assistantui["Orbit chat<br/>[useOrbitChat.ts]"]
  node_reminderui["Reminder workspace<br/>[ReminderPage.tsx]"]
  node_libraryui["Knowledge workspace<br/>[LibraryPage.tsx]"]
  node_researchui["Research workspace<br/>[ResearchPage.tsx]"]
  node_reportsui["Daily reports"]
  node_searchui["Global search<br/>[GlobalSearch.tsx]"]
end

subgraph group_api["API and orchestration"]
  node_server["Server assembly<br/>[application.ts]"]
  node_airoutes["AI endpoints<br/>[ai.ts]"]
  node_scheduleroutes["Schedule endpoints<br/>[schedules.ts]"]
  node_reminderroutes["Reminder endpoints<br/>[reminders.ts]"]
  node_libroutes["Library endpoints<br/>[library.ts]"]
  node_researchroutes["Research endpoints<br/>[research.ts]"]
  node_reportroutes["Report endpoints<br/>[reports-read.ts]"]
  node_searchroutes["Search endpoint<br/>[search.ts]"]
end

subgraph group_planning["Planning and conversation"]
  node_scheduledata[("Schedule state<br/>[schedule-store.ts]")]
  node_reminderlogic["Reminder service"]
  node_orbitqueue["Conversation queue<br/>[orbit-queue.ts]"]
  node_proactive["Proactive chat<br/>[orbit-proactive.ts]"]
end

subgraph group_knowledge["Knowledge and reports"]
  node_activity[("Activity and reports<br/>[activity-store.ts]")]
  node_researchdata[("Research state")]
  node_digestv3[("Digest V3 state<br/>[digest-v3-store.ts]")]
  node_media["Report media"]
  node_librarylogic["Library service<br/>[library-service.ts]"]
  node_searchlogic["Search service<br/>[search-service.ts]"]
end

subgraph group_platform["Persistence and integrations"]
  node_db[("Chat database<br/>[connection.ts]")]
  node_facade["Database facade<br/>[db.ts]"]
  node_persistence["Persistence recovery<br/>[persistence.ts]"]
  node_caldav["CalDAV bridge<br/>[caldav-service.ts]"]
  node_backup["Backup and restore<br/>[backup-service.ts]"]
  node_electron["Electron host<br/>[main.ts]"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"checks auth"| node_authui
node_app -->|"routes to"| node_scheduleui
node_app -->|"routes to"| node_assistantui
node_app -->|"routes to"| node_reminderui
node_app -->|"routes to"| node_libraryui
node_app -->|"routes to"| node_researchui
node_app -->|"routes to"| node_reportsui
node_user -->|"authenticates"| node_authui
node_authui -.->|"requests auth"| node_server
node_scheduleui -.->|"requests schedule"| node_scheduleroutes
node_assistantui -.->|"sends chat"| node_airoutes
node_reminderui -.->|"requests reminders"| node_reminderroutes
node_libraryui -.->|"requests library"| node_libroutes
node_researchui -.->|"requests research"| node_researchroutes
node_reportsui -.->|"requests reports"| node_reportroutes
node_searchui -.->|"queries"| node_searchroutes
node_server -->|"registers"| node_airoutes
node_server -->|"registers"| node_researchroutes
node_server -->|"initializes"| node_db
node_airoutes -->|"uses"| node_searchlogic
node_scheduleroutes -.->|"uses"| node_scheduledata
node_reminderroutes -.->|"uses"| node_reminderlogic
node_researchroutes -->|"reads and writes"| node_researchdata
node_researchroutes -->|"accesses"| node_activity
node_reportroutes -.->|"uses"| node_activity
node_libroutes -.->|"uses"| node_librarylogic
node_searchroutes -->|"delegates"| node_searchlogic
node_searchlogic -->|"searches reports"| node_activity
node_searchlogic -->|"searches schedules"| node_scheduledata
node_searchlogic -->|"searches notes"| node_facade
node_facade -->|"uses queries"| node_db
node_db -->|"recovers and saves"| node_persistence
node_activity -->|"persists"| node_persistence
node_researchdata -->|"persists"| node_persistence
node_backup -->|"uses transactions"| node_persistence
node_backup -->|"backs up data"| node_activity
node_backup -->|"backs up data"| node_scheduledata
node_backup -->|"backs up media"| node_media
node_activity -->|"stores digest data"| node_digestv3
node_server -->|"recovers queue"| node_orbitqueue
node_server -->|"creates jobs"| node_proactive
node_user -.->|"optionally syncs"| node_caldav
node_user -->|"uses desktop"| node_electron

click node_app "https://github.com/t1mothys/smart-schedule-agent/blob/main/src/App.tsx"
click node_authui "https://github.com/t1mothys/smart-schedule-agent/blob/main/src/hooks/useAuth.ts"
click node_scheduleui "https://github.com/t1mothys/smart-schedule-agent/blob/main/src/components/CalendarView.tsx"
click node_assistantui "https://github.com/t1mothys/smart-schedule-agent/blob/main/src/hooks/useOrbitChat.ts"
click node_reminderui "https://github.com/t1mothys/smart-schedule-agent/blob/main/src/components/ReminderPage.tsx"
click node_libraryui "https://github.com/t1mothys/smart-schedule-agent/blob/main/src/components/LibraryPage.tsx"
click node_researchui "https://github.com/t1mothys/smart-schedule-agent/blob/main/src/components/ResearchPage.tsx"
click node_reportsui "https://github.com/t1mothys/smart-schedule-agent/blob/main/src/components/DailyReportsPage.tsx"
click node_searchui "https://github.com/t1mothys/smart-schedule-agent/blob/main/src/components/GlobalSearch.tsx"
click node_server "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/application.ts"
click node_airoutes "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/ai.ts"
click node_scheduleroutes "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/schedules.ts"
click node_reminderroutes "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/reminders.ts"
click node_libroutes "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/library.ts"
click node_researchroutes "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/research.ts"
click node_reportroutes "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/reports-read.ts"
click node_searchroutes "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/search.ts"
click node_scheduledata "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/schedule-store.ts"
click node_reminderlogic "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/reminder-service.ts"
click node_orbitqueue "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/orbit-queue.ts"
click node_proactive "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/orbit-proactive.ts"
click node_activity "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/activity-store.ts"
click node_researchdata "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/digest-research-store.ts"
click node_digestv3 "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/digest-v3-store.ts"
click node_media "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/daily-report-media-service.ts"
click node_librarylogic "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/library-service.ts"
click node_searchlogic "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/search-service.ts"
click node_db "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/database/connection.ts"
click node_facade "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/db.ts"
click node_persistence "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/persistence.ts"
click node_caldav "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/caldav-service.ts"
click node_backup "https://github.com/t1mothys/smart-schedule-agent/blob/main/server/backup-service.ts"
click node_electron "https://github.com/t1mothys/smart-schedule-agent/blob/main/electron/main.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_authui,node_scheduleui,node_assistantui,node_reminderui,node_libraryui,node_researchui,node_reportsui,node_searchui,node_user toneBlue
class node_server,node_airoutes,node_scheduleroutes,node_reminderroutes,node_libroutes,node_researchroutes,node_reportroutes,node_searchroutes toneAmber
class node_scheduledata,node_reminderlogic,node_orbitqueue,node_proactive toneMint
class node_activity,node_researchdata,node_digestv3,node_media,node_librarylogic,node_searchlogic toneRose
class node_db,node_facade,node_persistence,node_caldav,node_backup,node_electron toneIndigo
```

## Components

### User experience

- [App navigation](https://github.com/t1mothys/smart-schedule-agent/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication UI](https://github.com/t1mothys/smart-schedule-agent/blob/main/src/hooks/useAuth.ts): `src/hooks/useAuth.ts`
- [Schedule workspace](https://github.com/t1mothys/smart-schedule-agent/blob/main/src/components/CalendarView.tsx): `src/components/CalendarView.tsx`
- [Orbit chat](https://github.com/t1mothys/smart-schedule-agent/blob/main/src/hooks/useOrbitChat.ts): `src/hooks/useOrbitChat.ts`
- [Reminder workspace](https://github.com/t1mothys/smart-schedule-agent/blob/main/src/components/ReminderPage.tsx): `src/components/ReminderPage.tsx`
- [Knowledge workspace](https://github.com/t1mothys/smart-schedule-agent/blob/main/src/components/LibraryPage.tsx): `src/components/LibraryPage.tsx`
- [Research workspace](https://github.com/t1mothys/smart-schedule-agent/blob/main/src/components/ResearchPage.tsx): `src/components/ResearchPage.tsx`
- [Daily reports](https://github.com/t1mothys/smart-schedule-agent/blob/main/src/components/DailyReportsPage.tsx): `src/components/DailyReportsPage.tsx`
- [Global search](https://github.com/t1mothys/smart-schedule-agent/blob/main/src/components/GlobalSearch.tsx): `src/components/GlobalSearch.tsx`

### API and orchestration

- [Server assembly](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/application.ts): `server/application.ts`
- [AI endpoints](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/ai.ts): `server/routes/ai.ts`
- [Schedule endpoints](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/schedules.ts): `server/routes/schedules.ts`
- [Reminder endpoints](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/reminders.ts): `server/routes/reminders.ts`
- [Library endpoints](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/library.ts): `server/routes/library.ts`
- [Research endpoints](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/research.ts): `server/routes/research.ts`
- [Report endpoints](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/reports-read.ts): `server/routes/reports-read.ts`
- [Search endpoint](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/routes/search.ts): `server/routes/search.ts`

### Planning and conversation

- [Schedule state](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/schedule-store.ts): `server/schedule-store.ts`
- [Reminder service](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/reminder-service.ts): `server/reminder-service.ts`
- [Conversation queue](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/orbit-queue.ts): `server/orbit-queue.ts`
- [Proactive chat](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/orbit-proactive.ts): `server/orbit-proactive.ts`

### Knowledge and reports

- [Activity and reports](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/activity-store.ts): `server/activity-store.ts`
- [Research state](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/digest-research-store.ts): `server/digest-research-store.ts`
- [Digest V3 state](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/digest-v3-store.ts): `server/digest-v3-store.ts`
- [Report media](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/daily-report-media-service.ts): `server/daily-report-media-service.ts`
- [Library service](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/library-service.ts): `server/library-service.ts`
- [Search service](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/search-service.ts): `server/search-service.ts`

### Persistence and integrations

- [Chat database](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/database/connection.ts): `server/database/connection.ts`
- [Database facade](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/db.ts): `server/db.ts`
- [Persistence recovery](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/persistence.ts): `server/persistence.ts`
- [CalDAV bridge](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/caldav-service.ts): `server/caldav-service.ts`
- [Backup and restore](https://github.com/t1mothys/smart-schedule-agent/blob/main/server/backup-service.ts): `server/backup-service.ts`
- [Electron host](https://github.com/t1mothys/smart-schedule-agent/blob/main/electron/main.ts): `electron/main.ts`

### Other components

- **User**

## Connections

- User → App navigation: uses (evidence: `README.md`)
- App navigation → Authentication UI: checks auth (evidence: `src/App.tsx`)
- App navigation → Schedule workspace: routes to (evidence: `src/App.tsx`)
- App navigation → Orbit chat: routes to (evidence: `src/App.tsx`)
- App navigation → Reminder workspace: routes to (evidence: `src/App.tsx`)
- App navigation → Knowledge workspace: routes to (evidence: `src/App.tsx`)
- App navigation → Research workspace: routes to (evidence: `src/App.tsx`)
- App navigation → Daily reports: routes to (evidence: `src/App.tsx`)
- User → Authentication UI: authenticates (evidence: `src/hooks/useAuth.ts`)
- Authentication UI → Server assembly: requests auth
- Schedule workspace → Schedule endpoints: requests schedule
- Orbit chat → AI endpoints: sends chat
- Reminder workspace → Reminder endpoints: requests reminders
- Knowledge workspace → Library endpoints: requests library
- Research workspace → Research endpoints: requests research
- Daily reports → Report endpoints: requests reports
- Global search → Search endpoint: queries
- Server assembly → AI endpoints: registers (evidence: `server/application.ts`)
- Server assembly → Research endpoints: registers (evidence: `server/application.ts`)
- Server assembly → Chat database: initializes (evidence: `server/application.ts`)
- AI endpoints → Search service: uses (evidence: `server/routes/ai.ts`)
- Schedule endpoints → Schedule state: uses
- Reminder endpoints → Reminder service: uses
- Research endpoints → Research state: reads and writes (evidence: `server/routes/research.ts`)
- Research endpoints → Activity and reports: accesses (evidence: `server/routes/research.ts`)
- Report endpoints → Activity and reports: uses
- Library endpoints → Library service: uses
- Search endpoint → Search service: delegates (evidence: `server/routes/search.ts`)
- Search service → Activity and reports: searches reports (evidence: `server/search-service.ts`)
- Search service → Schedule state: searches schedules (evidence: `server/search-service.ts`)
- Search service → Database facade: searches notes (evidence: `server/search-service.ts`)
- Database facade → Chat database: uses queries (evidence: `server/db.ts`)
- Chat database → Persistence recovery: recovers and saves (evidence: `server/database/connection.ts`)
- Activity and reports → Persistence recovery: persists (evidence: `server/activity-store.ts`)
- Research state → Persistence recovery: persists (evidence: `server/digest-research-store.ts`)
- Backup and restore → Persistence recovery: uses transactions (evidence: `server/backup-service.ts`)
- Backup and restore → Activity and reports: backs up data (evidence: `server/backup-service.ts`)
- Backup and restore → Schedule state: backs up data (evidence: `server/backup-service.ts`)
- Backup and restore → Report media: backs up media (evidence: `server/backup-service.ts`)
- Activity and reports → Digest V3 state: stores digest data (evidence: `server/activity-store.ts`)
- Server assembly → Conversation queue: recovers queue (evidence: `server/application.ts`)
- Server assembly → Proactive chat: creates jobs (evidence: `server/application.ts`)
- User → CalDAV bridge: optionally syncs (evidence: `README.md`)
- User → Electron host: uses desktop (evidence: `README.md`)
