# yosaiy/renotch architecture

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

- Interactive diagram: https://gitdiagram.com/yosaiy/renotch
- Repository: https://github.com/yosaiy/renotch

## Overview

Re:notch is a native macOS command center hosted in the screen notch. The user-facing flow starts with the app creating its shared model and notch window, then the model coordinates notch modes and feature services; SwiftUI surfaces those features through compact, expanded, and settings views. Major capability branches include local developer-activity monitoring, media control, Pomodoro and website blocking, browser activity, calendar, and personal shelf/todo tools. Edges follow sampled calls or source-index references; browser-extension integration is documented in the README, while its exact runtime wiring is not shown.

Main entry points: [`Sources/Renotch/State/AppModel.swift`](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/State/AppModel.swift) (App model), [`Sources/Renotch/App/RenotchApp.swift`](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/App/RenotchApp.swift) (App bootstrap), [`Sources/Renotch/Window/NotchWindowController.swift`](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Window/NotchWindowController.swift) (Notch window), [`Sources/Renotch/UI/NotchView.swift`](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/UI/NotchView.swift) (Notch view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App and Window Shell"]
  node_app["App bootstrap<br/>[RenotchApp.swift]"]
  node_model["App model<br/>[AppModel.swift]"]
  node_window["Notch window"]
  node_screen["Screen manager"]
end

subgraph group_interface["Notch Interface"]
  node_notch["Notch view<br/>[NotchView.swift]"]
  node_expanded["Expanded notch"]
  node_settings["Settings<br/>[SettingsView.swift]"]
end

subgraph group_developer["Developer and Media"]
  node_devservice["Developer activity"]
  node_devglance["Activity glance"]
  node_music["Music control<br/>[MusicService.swift]"]
end

subgraph group_focus["Focus and Planning"]
  node_calendar["Apple Calendar"]
  node_timer["Pomodoro timer<br/>[TimerService.swift]"]
  node_blocker["Website blocker"]
  node_overlay["Blocker overlay"]
  node_notifications["Notifications"]
  node_shelf[("File shelf<br/>[ShelfStore.swift]")]
  node_todo[("Todo store<br/>[TodoStore.swift]")]
end

subgraph group_integrations["Local Integrations"]
  node_browser["Browser activity"]
  node_installer["Extension installer"]
  node_extension["Browser extension<br/>[background.js]"]
  node_youtube["YouTube content script<br/>[youtube.js]"]
  node_bridge["Browser bridge<br/>[main.swift]"]
end

node_user(("Mac user"))

node_user -->|"launches"| node_app
node_app -->|"creates"| node_model
node_app -->|"creates"| node_screen
node_app -->|"creates"| node_window
node_window -->|"reads state"| node_model
node_window -->|"selects display"| node_screen
node_window -->|"hosts"| node_notch
node_notch -->|"drives modes"| node_model
node_notch -->|"shows"| node_expanded
node_app -->|"opens"| node_settings
node_model -->|"refreshes"| node_devservice
node_devservice -->|"builds activity"| node_devglance
node_model -->|"coordinates"| node_music
node_model -->|"coordinates"| node_calendar
node_model -->|"coordinates"| node_timer
node_model -->|"starts"| node_blocker
node_blocker -->|"triggers takeover"| node_model
node_blocker -.->|"presents overlay"| node_overlay
node_timer -->|"schedules alerts"| node_notifications
node_model -->|"adds files"| node_shelf
node_model -->|"coordinates"| node_todo
node_model -->|"coordinates"| node_browser
node_app -->|"installs integration"| node_installer
node_extension -.->|"enables tracking"| node_browser
node_youtube -.->|"reports playback"| node_extension
node_bridge -.->|"relays activity"| node_browser

click node_app "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/App/RenotchApp.swift"
click node_model "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/State/AppModel.swift"
click node_window "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Window/NotchWindowController.swift"
click node_screen "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Window/ScreenManager.swift"
click node_notch "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/UI/NotchView.swift"
click node_expanded "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/UI/ExpandedNotchView.swift"
click node_settings "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/UI/SettingsView.swift"
click node_devservice "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/DeveloperActivityService.swift"
click node_devglance "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Models/DeveloperActivityGlance.swift"
click node_music "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/MusicService.swift"
click node_calendar "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/AppleCalendarService.swift"
click node_timer "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/TimerService.swift"
click node_blocker "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/FocusBlockerService.swift"
click node_overlay "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Window/FocusBlockerOverlayController.swift"
click node_notifications "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/NotificationService.swift"
click node_shelf "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/ShelfStore.swift"
click node_todo "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/TodoStore.swift"
click node_browser "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/BrowserActivityService.swift"
click node_installer "https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/BrowserIntegrationInstaller.swift"
click node_extension "https://github.com/yosaiy/renotch/blob/main/BrowserExtension/background.js"
click node_youtube "https://github.com/yosaiy/renotch/blob/main/BrowserExtension/youtube.js"
click node_bridge "https://github.com/yosaiy/renotch/blob/main/BrowserBridge/main.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_model,node_window,node_screen,node_user toneBlue
class node_notch,node_expanded,node_settings toneAmber
class node_devservice,node_devglance,node_music toneMint
class node_calendar,node_timer,node_blocker,node_overlay,node_notifications,node_shelf,node_todo toneRose
class node_browser,node_installer,node_extension,node_youtube,node_bridge toneIndigo
```

## Components

### App and Window Shell

- [App bootstrap](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/App/RenotchApp.swift): `Sources/Renotch/App/RenotchApp.swift`
- [App model](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/State/AppModel.swift): `Sources/Renotch/State/AppModel.swift`
- [Notch window](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Window/NotchWindowController.swift): `Sources/Renotch/Window/NotchWindowController.swift`
- [Screen manager](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Window/ScreenManager.swift): `Sources/Renotch/Window/ScreenManager.swift`

### Notch Interface

- [Notch view](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/UI/NotchView.swift): `Sources/Renotch/UI/NotchView.swift`
- [Expanded notch](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/UI/ExpandedNotchView.swift): `Sources/Renotch/UI/ExpandedNotchView.swift`
- [Settings](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/UI/SettingsView.swift): `Sources/Renotch/UI/SettingsView.swift`

### Developer and Media

- [Developer activity](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/DeveloperActivityService.swift): `Sources/Renotch/Services/DeveloperActivityService.swift`
- [Activity glance](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Models/DeveloperActivityGlance.swift): `Sources/Renotch/Models/DeveloperActivityGlance.swift`
- [Music control](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/MusicService.swift): `Sources/Renotch/Services/MusicService.swift`

### Focus and Planning

- [Apple Calendar](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/AppleCalendarService.swift): `Sources/Renotch/Services/AppleCalendarService.swift`
- [Pomodoro timer](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/TimerService.swift): `Sources/Renotch/Services/TimerService.swift`
- [Website blocker](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/FocusBlockerService.swift): `Sources/Renotch/Services/FocusBlockerService.swift`
- [Blocker overlay](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Window/FocusBlockerOverlayController.swift): `Sources/Renotch/Window/FocusBlockerOverlayController.swift`
- [Notifications](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/NotificationService.swift): `Sources/Renotch/Services/NotificationService.swift`
- [File shelf](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/ShelfStore.swift): `Sources/Renotch/Services/ShelfStore.swift`
- [Todo store](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/TodoStore.swift): `Sources/Renotch/Services/TodoStore.swift`

### Local Integrations

- [Browser activity](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/BrowserActivityService.swift): `Sources/Renotch/Services/BrowserActivityService.swift`
- [Extension installer](https://github.com/yosaiy/renotch/blob/main/Sources/Renotch/Services/BrowserIntegrationInstaller.swift): `Sources/Renotch/Services/BrowserIntegrationInstaller.swift`
- [Browser extension](https://github.com/yosaiy/renotch/blob/main/BrowserExtension/background.js): `BrowserExtension/background.js`
- [YouTube content script](https://github.com/yosaiy/renotch/blob/main/BrowserExtension/youtube.js): `BrowserExtension/youtube.js`
- [Browser bridge](https://github.com/yosaiy/renotch/blob/main/BrowserBridge/main.swift): `BrowserBridge/main.swift`

### Other components

- **Mac user**

## Connections

- Mac user → App bootstrap: launches (evidence: `Sources/Renotch/App/RenotchApp.swift`)
- App bootstrap → App model: creates (evidence: `Sources/Renotch/App/RenotchApp.swift`)
- App bootstrap → Screen manager: creates (evidence: `Sources/Renotch/App/RenotchApp.swift`)
- App bootstrap → Notch window: creates (evidence: `Sources/Renotch/App/RenotchApp.swift`)
- Notch window → App model: reads state (evidence: `Sources/Renotch/Window/NotchWindowController.swift`)
- Notch window → Screen manager: selects display (evidence: `Sources/Renotch/Window/NotchWindowController.swift`)
- Notch window → Notch view: hosts (evidence: `Sources/Renotch/Window/NotchWindowController.swift`)
- Notch view → App model: drives modes (evidence: `Sources/Renotch/UI/NotchView.swift`)
- Notch view → Expanded notch: shows (evidence: `Sources/Renotch/UI/NotchView.swift`)
- App bootstrap → Settings: opens
- App model → Developer activity: refreshes (evidence: `Sources/Renotch/State/AppModel.swift`)
- Developer activity → Activity glance: builds activity (evidence: `Sources/Renotch/Services/DeveloperActivityService.swift`)
- App model → Music control: coordinates (evidence: `Sources/Renotch/State/AppModel.swift`)
- App model → Apple Calendar: coordinates (evidence: `Sources/Renotch/State/AppModel.swift`)
- App model → Pomodoro timer: coordinates (evidence: `Sources/Renotch/State/AppModel.swift`)
- App model → Website blocker: starts (evidence: `Sources/Renotch/State/AppModel.swift`)
- Website blocker → App model: triggers takeover (evidence: `Sources/Renotch/Services/FocusBlockerService.swift`)
- Website blocker → Blocker overlay: presents overlay (evidence: `Sources/Renotch/Window/FocusBlockerOverlayController.swift`)
- Pomodoro timer → Notifications: schedules alerts (evidence: `Sources/Renotch/Services/TimerService.swift`)
- App model → File shelf: adds files (evidence: `Sources/Renotch/State/AppModel.swift`)
- App model → Todo store: coordinates (evidence: `Sources/Renotch/State/AppModel.swift`)
- App model → Browser activity: coordinates (evidence: `Sources/Renotch/State/AppModel.swift`)
- App bootstrap → Extension installer: installs integration (evidence: `Sources/Renotch/App/RenotchApp.swift`)
- Browser extension → Browser activity: enables tracking
- YouTube content script → Browser extension: reports playback
- Browser bridge → Browser activity: relays activity
