This document is a simplified view of the core flows. It favors readability over completeness.
Related docs:
docs/feature-map.mddocs/naming-conventions.md
Legend
- Solid edges: direct dependency (constructor injection).
- Dashed labeled edges: indirect communication via EventBus.
- Dashed unlabeled edges: error/cleanup or retry path.
- Dotted labeled edges: package data, contract, or static helper usage.
- IPC edges are labeled.
flowchart LR
AppBootstrap["app-bootstrap.ts"]
UIEventBridge[UIEventBridge]
AppOrchestrator[AppOrchestrator]
AppBootstrap --> UIEventBridge
AppBootstrap --> AppOrchestrator
flowchart LR
UISetupOrchestrator[UISetupOrchestrator]
StreamingOrchestrator[StreamingOrchestrator]
StreamingService[StreamingService]
RendererDeviceRuntime[RendererDeviceRuntime]
DeviceMediaAcquirer[DeviceMediaAcquirer]
DeviceCatalog[DeviceCatalog]
UIEventBridge[UIEventBridge]
UISetupOrchestrator -. "ui:stream-start/stop-requested" .-> StreamingOrchestrator
StreamingOrchestrator --> StreamingService
StreamingOrchestrator -. "ui:streaming-mode, ui:stream-info" .-> UIEventBridge
StreamingService --> RendererDeviceRuntime
StreamingService --> DeviceMediaAcquirer
StreamingService -. "matcher data" .-> DeviceCatalog
flowchart LR
CaptureOrchestrator[CaptureOrchestrator]
CaptureService[CaptureService]
CaptureSaveService[CaptureSaveService]
CaptureGpuRecordingService[CaptureGpuRecordingService]
CaptureOrchestrator --> CaptureService
CaptureOrchestrator --> CaptureSaveService
CaptureOrchestrator --> CaptureGpuRecordingService
Note: CaptureSaveService handles format selection (WebM direct download, or MP4/MOV via ffmpeg transcode in main process). See docs/architecture-diagrams.md for the full transcode flow.
flowchart LR
AppOrchestrator[AppOrchestrator]
PerformanceAnimationOrchestrator[PerformanceAnimationOrchestrator]
PerformanceStateOrchestrator[PerformanceStateOrchestrator]
PerformanceMetricsOrchestrator[PerformanceMetricsOrchestrator]
PerformanceAnimationService[PerformanceAnimationService]
PerformanceMetricsService[PerformanceMetricsService]
AppOrchestrator --> PerformanceAnimationOrchestrator
AppOrchestrator --> PerformanceStateOrchestrator
AppOrchestrator --> PerformanceMetricsOrchestrator
PerformanceAnimationOrchestrator --> PerformanceAnimationService
PerformanceMetricsOrchestrator --> PerformanceMetricsService
flowchart LR
AppOrchestrator["AppOrchestrator (Main)"]
IpcHandlerRegistry[IpcHandlerRegistry]
AppRouter["appRouter (tRPC)"]
IpcPushBridge[IpcPushBridge]
WindowService[WindowService]
TrayService[TrayService]
EventBus[EventBus]
DeviceIntegrationService[DeviceIntegrationService]
DeviceConnectionService[DeviceConnectionService]
UpdateBridge[UpdateBridge]
UpdateServiceMain[UpdateServiceMain]
TranscodeServiceMain[TranscodeServiceMain]
UsbMonitor[node-usb]
DeviceCatalog[DeviceCatalog]
AutoUpdater[electron-updater]
FFmpeg[ffmpeg-static]
AppOrchestrator --> IpcHandlerRegistry
AppOrchestrator --> DeviceConnectionService
AppOrchestrator --> DeviceIntegrationService
AppOrchestrator --> TrayService
AppOrchestrator --> UpdateBridge
IpcHandlerRegistry --> AppRouter
IpcHandlerRegistry --> IpcPushBridge
AppRouter --> DeviceConnectionService
IpcHandlerRegistry --> UpdateServiceMain
IpcHandlerRegistry --> TranscodeServiceMain
DeviceIntegrationService --> DeviceConnectionService
DeviceIntegrationService --> TrayService
DeviceIntegrationService --> WindowService
DeviceIntegrationService --> EventBus
DeviceIntegrationService -. "launch policy lookup" .-> DeviceCatalog
WindowService --> IpcPushBridge
DeviceConnectionService --> UsbMonitor
DeviceConnectionService -. "USB matcher data" .-> DeviceCatalog
UpdateServiceMain --> AutoUpdater
TranscodeServiceMain --> FFmpeg
flowchart LR
DeviceIntegrationService[DeviceIntegrationService]
WindowService[WindowService]
IpcPushBridge[IpcPushBridge]
AppRouter["appRouter (tRPC)"]
UpdateBridge[UpdateBridge]
TranscodeService[TranscodeService]
RendererDeviceRuntime[RendererDeviceRuntime]
TrpcClient[Renderer tRPC client]
UIService["UIService / UI Components"]
TranscodeServiceRenderer["TranscodeService (Renderer)"]
DeviceIntegrationService -- "device connected/disconnected" --> WindowService
WindowService -- IPC push --> IpcPushBridge
TrpcClient -- device queries/mutations/subscriptions --> AppRouter
AppRouter --> IpcPushBridge
IpcPushBridge -- subscription payloads --> AppRouter
TrpcClient --> RendererDeviceRuntime
RendererDeviceRuntime -. "device status events" .-> UIService
UpdateBridge -- update push --> WindowService
TranscodeService -- transcode push --> WindowService
TrpcClient -- update/transcode subscriptions --> AppRouter
AppRouter -- update/transcode data --> TrpcClient
TrpcClient --> UIService
TranscodeServiceRenderer -- transcode start/cancel/status --> TrpcClient
- Orchestrators should be thin: they wire flows and delegate to services.
- Services should be single-responsibility and own the actual work.
- Managers/handlers are main-process only and interface with OS or device APIs.
- Main-process device ownership is
DeviceConnectionServicefor USB status andDeviceIntegrationServicefor tray/window/EventBus side effects. - Renderer device ownership is
RendererDeviceRuntimeplus platform ports; streaming usesDeviceMediaAcquirerfor media capture. @platform/devicesis the shared catalog and contract package; only its@platform/devices/runtimeexport is main-process connection code.- Process-first layout: renderer code lives under
src/renderer, main process undersrc/main, preload undersrc/preload.