# masalaempire/ontimely architecture

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

- Interactive diagram: https://gitdiagram.com/masalaempire/ontimely
- Repository: https://github.com/masalaempire/ontimely

## Overview

OnTimely is a macOS task-planning and reminder app. Users capture quiet Inbox tasks, plan deadlines and start times, activate reminders, respond to start/snooze/done prompts, and review completed work. Separate flows cover calendar-feed import and refresh, task calendar views, and rich notes. AppRuntime coordinates task, note, calendar, and notification services; TaskStore owns task lifecycle and persistence operations. Edges are limited to relationships supported by the README or SOURCE INDEX references; some view and service internals were not excerpted.

Main entry points: [`OnTimely/Services/AppRuntime.swift`](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/AppRuntime.swift) (App runtime), [`OnTimely/Views/MainView.swift`](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/MainView.swift) (Main navigation), [`OnTimely/Services/CalendarImportService.swift`](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/CalendarImportService.swift) (Feed import service), [`OnTimely/Core/Models/TaskItem.swift`](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Models/TaskItem.swift) (Task model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App shell<br/>[OnTimelyApp.swift]"]
  node_navigation["Main navigation<br/>[MainView.swift]"]
  node_inbox["Inbox capture<br/>[InboxView.swift]"]
  node_active["Active tasks<br/>[ActiveView.swift]"]
  node_done["Done tasks<br/>[DoneView.swift]"]
  node_taskcalendar["Task calendar"]
  node_timeline["Day timeline"]
end

subgraph group_planning["Task planning"]
  node_planning["Task planning"]
  node_importplanning["Imported planning"]
  node_draft["Plan draft"]
  node_deadline["Deadline rules"]
  node_tasks["Task lifecycle<br/>[TaskStore.swift]"]
  node_taskmodel["Task model<br/>[TaskItem.swift]"]
  node_snapshot["Reminder snapshot<br/>[TaskSnapshot.swift]"]
end

subgraph group_calendar["Calendar import"]
  node_calendarview["Calendar import UI"]
  node_importservice["Feed import service"]
  node_parser["iCalendar parser"]
  node_subscription["Subscriptions"]
end

subgraph group_runtime["Runtime services"]
  node_runtime["App runtime<br/>[AppRuntime.swift]"]
  node_scheduler["Reminder scheduler"]
  node_notifications["Notification manager"]
  node_systemnotifications(("macOS notifications"))
  node_persistence[("Persistence setup")]
  node_updater["App updater<br/>[AppUpdater.swift]"]
  node_notesdatabase[("Local database")]
end

subgraph group_notes["Notes"]
  node_notesview["Notes<br/>[NotesView.swift]"]
  node_noteeditor["Rich note editor"]
  node_notestore["Note storage<br/>[NoteStore.swift]"]
  node_notemodel["Note model<br/>[NoteItem.swift]"]
  node_markdown["Markdown codec"]
end

node_person(("User"))

node_person -->|"launches"| node_app
node_app -->|"starts"| node_runtime
node_person -->|"uses"| node_navigation
node_navigation -->|"routes to"| node_inbox
node_navigation -->|"routes to"| node_active
node_navigation -->|"routes to"| node_done
node_navigation -->|"routes to"| node_taskcalendar
node_inbox -->|"updates tasks"| node_runtime
node_active -->|"updates tasks"| node_runtime
node_done -.->|"updates tasks"| node_runtime
node_planning -->|"edits"| node_draft
node_draft -->|"calculates"| node_deadline
node_planning -->|"activates plan"| node_runtime
node_importplanning -->|"edits plan"| node_runtime
node_runtime -->|"coordinates"| node_tasks
node_tasks -->|"mutates"| node_taskmodel
node_taskmodel -->|"computes safe start"| node_deadline
node_taskmodel -->|"creates snapshot"| node_snapshot
node_runtime -->|"refreshes reminders"| node_scheduler
node_scheduler -->|"evaluates"| node_snapshot
node_runtime -->|"synchronizes"| node_notifications
node_notifications -->|"schedules alerts"| node_systemnotifications
node_systemnotifications -->|"delivers actions"| node_runtime
node_calendarview -->|"requests import"| node_runtime
node_runtime -->|"refreshes feeds"| node_importservice
node_importservice -->|"parses feed"| node_parser
node_importservice -->|"reads subscriptions"| node_subscription
node_importservice -->|"imports tasks"| node_tasks
node_calendarview -.->|"opens planning"| node_importplanning
node_taskcalendar -->|"renders day"| node_timeline
node_taskcalendar -->|"reads tasks"| node_runtime
node_notesview -->|"opens editor"| node_noteeditor
node_noteeditor -->|"encodes content"| node_markdown
node_notesview -->|"uses notes"| node_runtime
node_runtime -->|"coordinates"| node_notestore
node_notestore -->|"manages"| node_notemodel
node_persistence -->|"configures"| node_notesdatabase
node_persistence -->|"persists"| node_taskmodel
node_persistence -->|"persists"| node_notemodel
node_app -->|"configures"| node_updater

click node_app "https://github.com/masalaempire/ontimely/blob/main/OnTimely/OnTimelyApp.swift"
click node_navigation "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/MainView.swift"
click node_inbox "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/InboxView.swift"
click node_active "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/ActiveView.swift"
click node_done "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/DoneView.swift"
click node_taskcalendar "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/TaskCalendarView.swift"
click node_timeline "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/CalendarDayTimeline.swift"
click node_planning "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/TaskPlanningView.swift"
click node_importplanning "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/ImportedTaskPlanningView.swift"
click node_draft "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/PlanningDraft.swift"
click node_deadline "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Utilities/DeadlineCalculator.swift"
click node_tasks "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Services/TaskStore.swift"
click node_taskmodel "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Models/TaskItem.swift"
click node_snapshot "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Models/TaskSnapshot.swift"
click node_calendarview "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/CalendarImportView.swift"
click node_importservice "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/CalendarImportService.swift"
click node_parser "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Utilities/ICalendarParser.swift"
click node_subscription "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Models/CalendarSubscription.swift"
click node_runtime "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/AppRuntime.swift"
click node_scheduler "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Services/ReminderScheduler.swift"
click node_notifications "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/NotificationManager.swift"
click node_persistence "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/AppPersistence.swift"
click node_updater "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/AppUpdater.swift"
click node_notesview "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/NotesView.swift"
click node_noteeditor "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/RichNoteEditor.swift"
click node_notestore "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/NoteStore.swift"
click node_notemodel "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Models/NoteItem.swift"
click node_markdown "https://github.com/masalaempire/ontimely/blob/main/OnTimely/Utilities/NoteMarkdownCodec.swift"

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_navigation,node_inbox,node_active,node_done,node_taskcalendar,node_timeline,node_person toneBlue
class node_planning,node_importplanning,node_draft,node_deadline,node_tasks,node_taskmodel,node_snapshot toneAmber
class node_calendarview,node_importservice,node_parser,node_subscription toneMint
class node_runtime,node_scheduler,node_notifications,node_systemnotifications,node_persistence,node_updater,node_notesdatabase toneRose
class node_notesview,node_noteeditor,node_notestore,node_notemodel,node_markdown toneIndigo
```

## Components

### App experience

- [App shell](https://github.com/masalaempire/ontimely/blob/main/OnTimely/OnTimelyApp.swift): `OnTimely/OnTimelyApp.swift`
- [Main navigation](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/MainView.swift): `OnTimely/Views/MainView.swift`
- [Inbox capture](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/InboxView.swift): `OnTimely/Views/InboxView.swift`
- [Active tasks](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/ActiveView.swift): `OnTimely/Views/ActiveView.swift`
- [Done tasks](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/DoneView.swift): `OnTimely/Views/DoneView.swift`
- [Task calendar](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/TaskCalendarView.swift): `OnTimely/Views/TaskCalendarView.swift`
- [Day timeline](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/CalendarDayTimeline.swift): `OnTimely/Views/CalendarDayTimeline.swift`

### Task planning

- [Task planning](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/TaskPlanningView.swift): `OnTimely/Views/TaskPlanningView.swift`
- [Imported planning](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/ImportedTaskPlanningView.swift): `OnTimely/Views/ImportedTaskPlanningView.swift`
- [Plan draft](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/PlanningDraft.swift): `OnTimely/Views/PlanningDraft.swift`
- [Deadline rules](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Utilities/DeadlineCalculator.swift): `OnTimely/Core/Utilities/DeadlineCalculator.swift`
- [Task lifecycle](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Services/TaskStore.swift): `OnTimely/Core/Services/TaskStore.swift`
- [Task model](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Models/TaskItem.swift): `OnTimely/Core/Models/TaskItem.swift`
- [Reminder snapshot](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Models/TaskSnapshot.swift): `OnTimely/Core/Models/TaskSnapshot.swift`

### Calendar import

- [Calendar import UI](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/CalendarImportView.swift): `OnTimely/Views/CalendarImportView.swift`
- [Feed import service](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/CalendarImportService.swift): `OnTimely/Services/CalendarImportService.swift`
- [iCalendar parser](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Utilities/ICalendarParser.swift): `OnTimely/Core/Utilities/ICalendarParser.swift`
- [Subscriptions](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Models/CalendarSubscription.swift): `OnTimely/Core/Models/CalendarSubscription.swift`

### Runtime services

- [App runtime](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/AppRuntime.swift): `OnTimely/Services/AppRuntime.swift`
- [Reminder scheduler](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Core/Services/ReminderScheduler.swift): `OnTimely/Core/Services/ReminderScheduler.swift`
- [Notification manager](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/NotificationManager.swift): `OnTimely/Services/NotificationManager.swift`
- **macOS notifications**
- [Persistence setup](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/AppPersistence.swift): `OnTimely/Services/AppPersistence.swift`
- [App updater](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/AppUpdater.swift): `OnTimely/Services/AppUpdater.swift`
- **Local database**

### Notes

- [Notes](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/NotesView.swift): `OnTimely/Views/NotesView.swift`
- [Rich note editor](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Views/RichNoteEditor.swift): `OnTimely/Views/RichNoteEditor.swift`
- [Note storage](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Services/NoteStore.swift): `OnTimely/Services/NoteStore.swift`
- [Note model](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Models/NoteItem.swift): `OnTimely/Models/NoteItem.swift`
- [Markdown codec](https://github.com/masalaempire/ontimely/blob/main/OnTimely/Utilities/NoteMarkdownCodec.swift): `OnTimely/Utilities/NoteMarkdownCodec.swift`

### Other components

- **User**

## Connections

- User → App shell: launches (evidence: `OnTimely/OnTimelyApp.swift`)
- App shell → App runtime: starts (evidence: `OnTimely/OnTimelyApp.swift`)
- User → Main navigation: uses (evidence: `README.md`)
- Main navigation → Inbox capture: routes to (evidence: `OnTimely/Views/MainView.swift`)
- Main navigation → Active tasks: routes to (evidence: `OnTimely/Views/MainView.swift`)
- Main navigation → Done tasks: routes to (evidence: `OnTimely/Views/MainView.swift`)
- Main navigation → Task calendar: routes to (evidence: `OnTimely/Views/MainView.swift`)
- Inbox capture → App runtime: updates tasks (evidence: `OnTimely/Views/MainView.swift`)
- Active tasks → App runtime: updates tasks (evidence: `OnTimely/Views/ActiveView.swift`)
- Done tasks → App runtime: updates tasks
- Task planning → Plan draft: edits (evidence: `OnTimely/Views/TaskPlanningView.swift`)
- Plan draft → Deadline rules: calculates (evidence: `OnTimely/Views/PlanningDraft.swift`)
- Task planning → App runtime: activates plan (evidence: `OnTimely/Views/TaskPlanningView.swift`)
- Imported planning → App runtime: edits plan (evidence: `OnTimely/Views/ImportedTaskPlanningView.swift`)
- App runtime → Task lifecycle: coordinates (evidence: `OnTimely/Services/AppRuntime.swift`)
- Task lifecycle → Task model: mutates (evidence: `OnTimely/Core/Services/TaskStore.swift`)
- Task model → Deadline rules: computes safe start (evidence: `OnTimely/Core/Models/TaskItem.swift`)
- Task model → Reminder snapshot: creates snapshot (evidence: `OnTimely/Core/Models/TaskItem.swift`)
- App runtime → Reminder scheduler: refreshes reminders (evidence: `OnTimely/Services/AppRuntime.swift`)
- Reminder scheduler → Reminder snapshot: evaluates (evidence: `OnTimely/Core/Services/ReminderScheduler.swift`)
- App runtime → Notification manager: synchronizes (evidence: `OnTimely/Services/AppRuntime.swift`)
- Notification manager → macOS notifications: schedules alerts (evidence: `OnTimely/Services/NotificationManager.swift`)
- macOS notifications → App runtime: delivers actions (evidence: `OnTimely/Services/AppRuntime.swift`)
- Calendar import UI → App runtime: requests import (evidence: `OnTimely/Views/CalendarImportView.swift`)
- App runtime → Feed import service: refreshes feeds (evidence: `OnTimely/Services/AppRuntime.swift`)
- Feed import service → iCalendar parser: parses feed (evidence: `OnTimely/Services/CalendarImportService.swift`)
- Feed import service → Subscriptions: reads subscriptions (evidence: `OnTimely/Services/CalendarImportService.swift`)
- Feed import service → Task lifecycle: imports tasks (evidence: `OnTimely/Services/CalendarImportService.swift`)
- Calendar import UI → Imported planning: opens planning
- Task calendar → Day timeline: renders day (evidence: `OnTimely/Views/TaskCalendarView.swift`)
- Task calendar → App runtime: reads tasks (evidence: `OnTimely/Views/TaskCalendarView.swift`)
- Notes → Rich note editor: opens editor (evidence: `OnTimely/Views/NotesView.swift`)
- Rich note editor → Markdown codec: encodes content (evidence: `OnTimely/Views/RichNoteEditor.swift`)
- Notes → App runtime: uses notes (evidence: `OnTimely/Views/NotesView.swift`)
- App runtime → Note storage: coordinates (evidence: `OnTimely/Services/AppRuntime.swift`)
- Note storage → Note model: manages (evidence: `OnTimely/Services/NoteStore.swift`)
- Persistence setup → Local database: configures (evidence: `OnTimely/Services/AppPersistence.swift`)
- Persistence setup → Task model: persists (evidence: `OnTimely/Services/AppPersistence.swift`)
- Persistence setup → Note model: persists (evidence: `OnTimely/Services/AppPersistence.swift`)
- App shell → App updater: configures (evidence: `OnTimely/OnTimelyApp.swift`)
