# momochisoundpost/vremind-win architecture

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

- Interactive diagram: https://gitdiagram.com/momochisoundpost/vremind-win
- Repository: https://github.com/momochisoundpost/vremind-win

## Overview

VRemind is a Windows system-tray stream reminder whose native WinUI frontend uses a Swift core engine through a CLI bridge. The principal workflow starts with tray/app activation, polls watched channels, fetches YouTube or Twitch stream state, projects live/upcoming/offline sections, and delivers toast alerts. Other documented branches include watchlist management, onboarding/settings, portable backups, release checks, celebration detection, and native tray presentation. Edges are limited to relationships shown in excerpts, indexed references, or README statements; unsampled subsystem wiring is omitted where it cannot be established.

Main entry points: [`VRemindCore/Sources/VRemindCore/Services/StreamMonitorEngine.swift`](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Services/StreamMonitorEngine.swift) (Monitor engine), [`VRemindWin/src/VRemindWin.Core/Services/StreamMonitorCoordinator.cs`](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/Services/StreamMonitorCoordinator.cs) (Monitor coordinator), [`VRemindWin/src/VRemindWin/App.xaml.cs`](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin/App.xaml.cs) (App lifecycle), [`VRemindWin/src/VRemindWin.Core/ViewModels/SettingsViewModel.cs`](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/ViewModels/SettingsViewModel.cs) (Settings workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_windows["Windows frontend"]
  node_tray["Tray icon<br/>[TrayIconService.cs]"]
  node_app["App lifecycle<br/>[App.xaml.cs]"]
  node_popover["Watchlist popover"]
  node_popovervm["Popover state"]
  node_settingsvm["Settings workflow"]
  node_onboarding["Onboarding"]
  node_coordinator["Monitor coordinator"]
  node_toast["Toast delivery"]
  node_single["Single instance"]
  node_order["Channel ordering"]
end

subgraph group_interop["CLI interface"]
  node_bridge["Core CLI bridge<br/>[CoreCliBridge.cs]"]
  node_cli["CLI commands<br/>[CliRunner.swift]"]
  node_clientry["CLI entrypoint<br/>[main.swift]"]
end

subgraph group_engine["Stream engine"]
  node_channel["Watched channels"]
  node_settings["App settings<br/>[AppSettings.swift]"]
  node_status["Stream states<br/>[StreamStatus.swift]"]
  node_enginecore["Monitor engine"]
  node_youtube["YouTube provider"]
  node_twitch["Twitch provider"]
end

subgraph group_capabilities["Settings and extensions"]
  node_celebration["Celebration detection"]
  node_backup["Portable backups"]
  node_release["Release checks"]
end

node_user(("Windows user"))
node_youtubeweb{{"YouTube public pages"}}
node_twitchweb{{"Twitch public endpoint"}}
node_github{{"GitHub releases"}}

node_user -->|"activates"| node_tray
node_tray -->|"requests actions"| node_app
node_app -->|"starts polling"| node_coordinator
node_app -->|"creates"| node_popovervm
node_app -->|"creates"| node_settingsvm
node_popover -->|"uses state"| node_popovervm
node_popovervm -->|"reads state"| node_coordinator
node_settingsvm -->|"changes settings"| node_coordinator
node_onboarding -->|"completes setup"| node_coordinator
node_coordinator -->|"calls commands"| node_bridge
node_bridge -.->|"invokes CLI"| node_clientry
node_clientry -->|"dispatches commands"| node_cli
node_cli -->|"refreshes streams"| node_enginecore
node_enginecore -->|"fetches channels"| node_youtube
node_enginecore -->|"fetches channels"| node_twitch
node_youtube -->|"reads public pages"| node_youtubeweb
node_twitch -->|"queries endpoint"| node_twitchweb
node_enginecore -->|"detects events"| node_celebration
node_coordinator -->|"dispatches alerts"| node_toast
node_user -->|"exports or restores"| node_backup
node_settingsvm -->|"checks updates"| node_release
node_release -.->|"checks releases"| node_github
node_app -->|"enforces instance"| node_single
node_popover -->|"reorders channels"| node_order
node_enginecore -->|"uses channel data"| node_channel
node_enginecore -->|"reads preferences"| node_settings
node_enginecore -->|"updates statuses"| node_status

click node_tray "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin/Services/TrayIconService.cs"
click node_app "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin/App.xaml.cs"
click node_popover "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin/Views/PopoverView.xaml.cs"
click node_popovervm "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/ViewModels/PopoverViewModel.cs"
click node_settingsvm "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/ViewModels/SettingsViewModel.cs"
click node_onboarding "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/ViewModels/OnboardingViewModel.cs"
click node_coordinator "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/Services/StreamMonitorCoordinator.cs"
click node_toast "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/Services/WindowsToastService.cs"
click node_bridge "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/Services/CoreCliBridge.cs"
click node_cli "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCoreCLI/Sources/VRemindCoreCLIKit/CliRunner.swift"
click node_clientry "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCoreCLI/Sources/VRemindCoreCLI/main.swift"
click node_channel "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Models/WatchedChannel.swift"
click node_settings "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Models/AppSettings.swift"
click node_status "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Models/StreamStatus.swift"
click node_enginecore "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Services/StreamMonitorEngine.swift"
click node_youtube "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Providers/YouTubeStreamProvider.swift"
click node_twitch "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Providers/TwitchStreamProvider.swift"
click node_celebration "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Services/CelebrationDetector.swift"
click node_backup "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCoreCLI/Sources/VRemindCoreCLIKit/BackupPayload.swift"
click node_release "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Models/GitHubRelease.swift"
click node_single "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/Services/SingleInstanceService.cs"
click node_order "https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/Services/ChannelOrderPolicy.cs"

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_tray,node_app,node_popover,node_popovervm,node_settingsvm,node_onboarding,node_coordinator,node_toast,node_single,node_order,node_user toneBlue
class node_bridge,node_cli,node_clientry toneAmber
class node_channel,node_settings,node_status,node_enginecore,node_youtube,node_twitch toneMint
class node_celebration,node_backup,node_release toneRose
class node_youtubeweb,node_twitchweb,node_github toneIndigo
```

## Components

### Windows frontend

- [Tray icon](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin/Services/TrayIconService.cs): `VRemindWin/src/VRemindWin/Services/TrayIconService.cs`
- [App lifecycle](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin/App.xaml.cs): `VRemindWin/src/VRemindWin/App.xaml.cs`
- [Watchlist popover](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin/Views/PopoverView.xaml.cs): `VRemindWin/src/VRemindWin/Views/PopoverView.xaml.cs`
- [Popover state](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/ViewModels/PopoverViewModel.cs): `VRemindWin/src/VRemindWin.Core/ViewModels/PopoverViewModel.cs`
- [Settings workflow](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/ViewModels/SettingsViewModel.cs): `VRemindWin/src/VRemindWin.Core/ViewModels/SettingsViewModel.cs`
- [Onboarding](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/ViewModels/OnboardingViewModel.cs): `VRemindWin/src/VRemindWin.Core/ViewModels/OnboardingViewModel.cs`
- [Monitor coordinator](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/Services/StreamMonitorCoordinator.cs): `VRemindWin/src/VRemindWin.Core/Services/StreamMonitorCoordinator.cs`
- [Toast delivery](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/Services/WindowsToastService.cs): `VRemindWin/src/VRemindWin.Core/Services/WindowsToastService.cs`
- [Single instance](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/Services/SingleInstanceService.cs): `VRemindWin/src/VRemindWin.Core/Services/SingleInstanceService.cs`
- [Channel ordering](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/Services/ChannelOrderPolicy.cs): `VRemindWin/src/VRemindWin.Core/Services/ChannelOrderPolicy.cs`

### CLI interface

- [Core CLI bridge](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindWin/src/VRemindWin.Core/Services/CoreCliBridge.cs): `VRemindWin/src/VRemindWin.Core/Services/CoreCliBridge.cs`
- [CLI commands](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCoreCLI/Sources/VRemindCoreCLIKit/CliRunner.swift): `VRemindCoreCLI/Sources/VRemindCoreCLIKit/CliRunner.swift`
- [CLI entrypoint](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCoreCLI/Sources/VRemindCoreCLI/main.swift): `VRemindCoreCLI/Sources/VRemindCoreCLI/main.swift`

### Stream engine

- [Watched channels](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Models/WatchedChannel.swift): `VRemindCore/Sources/VRemindCore/Models/WatchedChannel.swift`
- [App settings](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Models/AppSettings.swift): `VRemindCore/Sources/VRemindCore/Models/AppSettings.swift`
- [Stream states](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Models/StreamStatus.swift): `VRemindCore/Sources/VRemindCore/Models/StreamStatus.swift`
- [Monitor engine](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Services/StreamMonitorEngine.swift): `VRemindCore/Sources/VRemindCore/Services/StreamMonitorEngine.swift`
- [YouTube provider](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Providers/YouTubeStreamProvider.swift): `VRemindCore/Sources/VRemindCore/Providers/YouTubeStreamProvider.swift`
- [Twitch provider](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Providers/TwitchStreamProvider.swift): `VRemindCore/Sources/VRemindCore/Providers/TwitchStreamProvider.swift`

### Settings and extensions

- [Celebration detection](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Services/CelebrationDetector.swift): `VRemindCore/Sources/VRemindCore/Services/CelebrationDetector.swift`
- [Portable backups](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCoreCLI/Sources/VRemindCoreCLIKit/BackupPayload.swift): `VRemindCoreCLI/Sources/VRemindCoreCLIKit/BackupPayload.swift`
- [Release checks](https://github.com/momochisoundpost/vremind-win/blob/main/VRemindCore/Sources/VRemindCore/Models/GitHubRelease.swift): `VRemindCore/Sources/VRemindCore/Models/GitHubRelease.swift`

### Other components

- **Windows user**
- **YouTube public pages**
- **Twitch public endpoint**
- **GitHub releases**

## Connections

- Windows user → Tray icon: activates
- Tray icon → App lifecycle: requests actions (evidence: `VRemindWin/src/VRemindWin/Services/TrayIconService.cs`)
- App lifecycle → Monitor coordinator: starts polling (evidence: `VRemindWin/src/VRemindWin/App.xaml.cs`)
- App lifecycle → Popover state: creates (evidence: `VRemindWin/src/VRemindWin/App.xaml.cs`)
- App lifecycle → Settings workflow: creates (evidence: `VRemindWin/src/VRemindWin/App.xaml.cs`)
- Watchlist popover → Popover state: uses state (evidence: `VRemindWin/src/VRemindWin/Views/PopoverView.xaml.cs`)
- Popover state → Monitor coordinator: reads state (evidence: `VRemindWin/src/VRemindWin.Core/ViewModels/PopoverViewModel.cs`)
- Settings workflow → Monitor coordinator: changes settings (evidence: `VRemindWin/src/VRemindWin.Core/ViewModels/SettingsViewModel.cs`)
- Onboarding → Monitor coordinator: completes setup (evidence: `VRemindWin/src/VRemindWin.Core/ViewModels/OnboardingViewModel.cs`)
- Monitor coordinator → Core CLI bridge: calls commands (evidence: `VRemindWin/src/VRemindWin.Core/Services/StreamMonitorCoordinator.cs`)
- Core CLI bridge → CLI entrypoint: invokes CLI
- CLI entrypoint → CLI commands: dispatches commands (evidence: `VRemindCoreCLI/Sources/VRemindCoreCLI/main.swift`)
- CLI commands → Monitor engine: refreshes streams (evidence: `VRemindCoreCLI/Sources/VRemindCoreCLIKit/CliRunner.swift`)
- Monitor engine → YouTube provider: fetches channels
- Monitor engine → Twitch provider: fetches channels
- YouTube provider → YouTube public pages: reads public pages
- Twitch provider → Twitch public endpoint: queries endpoint
- Monitor engine → Celebration detection: detects events (evidence: `VRemindCore/Sources/VRemindCore/Services/StreamMonitorEngine.swift`)
- Monitor coordinator → Toast delivery: dispatches alerts (evidence: `VRemindWin/src/VRemindWin.Core/Services/StreamMonitorCoordinator.cs`)
- Windows user → Portable backups: exports or restores
- Settings workflow → Release checks: checks updates (evidence: `VRemindWin/src/VRemindWin.Core/ViewModels/SettingsViewModel.cs`)
- Release checks → GitHub releases: checks releases
- App lifecycle → Single instance: enforces instance (evidence: `VRemindWin/src/VRemindWin/App.xaml.cs`)
- Watchlist popover → Channel ordering: reorders channels (evidence: `VRemindWin/src/VRemindWin/Views/PopoverView.xaml.cs`)
- Monitor engine → Watched channels: uses channel data (evidence: `VRemindCore/Sources/VRemindCore/Services/StreamMonitorEngine.swift`)
- Monitor engine → App settings: reads preferences (evidence: `VRemindCore/Sources/VRemindCore/Services/StreamMonitorEngine.swift`)
- Monitor engine → Stream states: updates statuses (evidence: `VRemindCore/Sources/VRemindCore/Services/StreamMonitorEngine.swift`)
