# alztrk/opentaskbar architecture

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

- Interactive diagram: https://gitdiagram.com/alztrk/opentaskbar
- Repository: https://github.com/alztrk/opentaskbar

## Overview

OpenTaskbar replaces the Windows taskbar with a configurable floating dock, while also hosting widgets, window previews, and shell integrations. The main workflow starts at application launch, loads preferences and theme resources, then presents the dock and coordinates its interactions with Windows. Settings, widgets, window management, and taskbar recovery are distinct product areas. Some feature branches are documented in the README but their implementation files were not sampled, so those links cite the README; unsampled internal call paths are not inferred.

Main entry points: [`Views/Windows/MainWindow.xaml.cs`](https://github.com/alztrk/opentaskbar/blob/master/Views/Windows/MainWindow.xaml.cs) (Main dock window), [`App.xaml.cs`](https://github.com/alztrk/opentaskbar/blob/master/App.xaml.cs) (Application startup), [`Services/Settings/ApplicationPreferences.cs`](https://github.com/alztrk/opentaskbar/blob/master/Services/Settings/ApplicationPreferences.cs) (Preferences), [`Services/Interop/TaskbarReplacementSession.cs`](https://github.com/alztrk/opentaskbar/blob/master/Services/Interop/TaskbarReplacementSession.cs) (Taskbar replacement)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dock["Dock experience"]
  node_app["Application startup<br/>[App.xaml.cs]"]
  node_main["Main dock window<br/>[MainWindow.xaml.cs]"]
  node_secondary["Secondary docks"]
end

subgraph group_widgets["Widget system"]
  node_widget_coordinator["Widget coordinator"]
  node_widget_service["Widget catalog and data"]
  node_widget_views["Widget implementations"]
  node_widget_panels["Widget panels<br/>[WidgetPanelHost.cs]"]
end

subgraph group_windows["Window and shell integration"]
  node_window_tracker["Window tracking"]
  node_previews["Window previews"]
  node_auto_hide["Auto-hide controller"]
  node_shell["Windows shell integration<br/>[ShellShortcuts.cs]"]
  node_search_widget["Search widget<br/>[SearchWidget.cs]"]
end

subgraph group_config["Settings and appearance"]
  node_settings["Settings window"]
  node_preferences["Preferences"]
  node_store[("Settings store")]
  node_themes["Theme packs<br/>[ThemePacks.cs]"]
  node_theme_manager["Theme rendering<br/>[ThemeManager.cs]"]
  node_localization["Localization<br/>[UiText.cs]"]
end

subgraph group_recovery["Taskbar recovery"]
  node_taskbar_session["Taskbar replacement"]
  node_watchdog["Crash watchdog"]
end

node_user(("User"))
node_windows_os["Windows"]

node_user -->|"starts"| node_app
node_app -->|"opens"| node_main
node_app -->|"loads"| node_preferences
node_app -->|"heals recovery"| node_taskbar_session
node_main -.->|"opens"| node_settings
node_preferences -->|"persists"| node_store
node_main -->|"coordinates"| node_widget_coordinator
node_main -->|"uses"| node_widget_service
node_main -->|"hosts"| node_widget_panels
node_widget_coordinator -->|"coordinates"| node_widget_views
node_widget_service -->|"reads system data"| node_windows_os
node_main -->|"tracks windows"| node_window_tracker
node_main -->|"shows previews"| node_previews
node_main -->|"controls visibility"| node_auto_hide
node_main -->|"replaces taskbar"| node_taskbar_session
node_main -->|"loads themes"| node_themes
node_themes -->|"applies theme"| node_theme_manager
node_search_widget -->|"opens search"| node_shell
node_main -.->|"supports multi-monitor"| node_secondary
node_main -->|"integrates shell features"| node_windows_os
node_taskbar_session -->|"registers recovery"| node_watchdog
node_watchdog -->|"restores taskbar"| node_windows_os
node_settings -.->|"edits preferences"| node_preferences
node_main -->|"localizes interface"| node_localization

click node_app "https://github.com/alztrk/opentaskbar/blob/master/App.xaml.cs"
click node_main "https://github.com/alztrk/opentaskbar/blob/master/Views/Windows/MainWindow.xaml.cs"
click node_secondary "https://github.com/alztrk/opentaskbar/blob/master/Views/Windows/SecondaryDockWindow.cs"
click node_settings "https://github.com/alztrk/opentaskbar/blob/master/Views/Windows/SettingsWindow.xaml.cs"
click node_preferences "https://github.com/alztrk/opentaskbar/blob/master/Services/Settings/ApplicationPreferences.cs"
click node_store "https://github.com/alztrk/opentaskbar/blob/master/Services/Settings/DockSettingsStore.cs"
click node_themes "https://github.com/alztrk/opentaskbar/blob/master/Services/App/ThemePacks.cs"
click node_theme_manager "https://github.com/alztrk/opentaskbar/blob/master/Services/Settings/ThemeManager.cs"
click node_localization "https://github.com/alztrk/opentaskbar/blob/master/Services/Localization/UiText.cs"
click node_widget_coordinator "https://github.com/alztrk/opentaskbar/blob/master/Widgets/WidgetCoordinator.cs"
click node_widget_service "https://github.com/alztrk/opentaskbar/blob/master/Widgets/DockWidgetService.cs"
click node_widget_views "https://github.com/alztrk/opentaskbar/tree/master/Widgets"
click node_widget_panels "https://github.com/alztrk/opentaskbar/blob/master/Views/Widgets/WidgetPanelHost.cs"
click node_window_tracker "https://github.com/alztrk/opentaskbar/blob/master/Services/Interop/NativeWindowTracker.cs"
click node_previews "https://github.com/alztrk/opentaskbar/blob/master/Services/Interop/WindowThumbnailPreview.cs"
click node_auto_hide "https://github.com/alztrk/opentaskbar/blob/master/Services/App/DockAutoHideController.cs"
click node_shell "https://github.com/alztrk/opentaskbar/blob/master/Services/Interop/ShellShortcuts.cs"
click node_search_widget "https://github.com/alztrk/opentaskbar/blob/master/Widgets/SearchWidget.cs"
click node_taskbar_session "https://github.com/alztrk/opentaskbar/blob/master/Services/Interop/TaskbarReplacementSession.cs"
click node_watchdog "https://github.com/alztrk/opentaskbar/blob/master/Services/App/TaskbarRecoveryWatchdog.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_app,node_main,node_secondary,node_user toneBlue
class node_widget_coordinator,node_widget_service,node_widget_views,node_widget_panels toneAmber
class node_window_tracker,node_previews,node_auto_hide,node_shell,node_search_widget toneMint
class node_settings,node_preferences,node_store,node_themes,node_theme_manager,node_localization toneRose
class node_taskbar_session,node_watchdog,node_windows_os toneIndigo
```

## Components

### Dock experience

- [Application startup](https://github.com/alztrk/opentaskbar/blob/master/App.xaml.cs): `App.xaml.cs`
- [Main dock window](https://github.com/alztrk/opentaskbar/blob/master/Views/Windows/MainWindow.xaml.cs): `Views/Windows/MainWindow.xaml.cs`
- [Secondary docks](https://github.com/alztrk/opentaskbar/blob/master/Views/Windows/SecondaryDockWindow.cs): `Views/Windows/SecondaryDockWindow.cs`

### Widget system

- [Widget coordinator](https://github.com/alztrk/opentaskbar/blob/master/Widgets/WidgetCoordinator.cs): `Widgets/WidgetCoordinator.cs`
- [Widget catalog and data](https://github.com/alztrk/opentaskbar/blob/master/Widgets/DockWidgetService.cs): `Widgets/DockWidgetService.cs`
- [Widget implementations](https://github.com/alztrk/opentaskbar/tree/master/Widgets): `Widgets`
- [Widget panels](https://github.com/alztrk/opentaskbar/blob/master/Views/Widgets/WidgetPanelHost.cs): `Views/Widgets/WidgetPanelHost.cs`

### Window and shell integration

- [Window tracking](https://github.com/alztrk/opentaskbar/blob/master/Services/Interop/NativeWindowTracker.cs): `Services/Interop/NativeWindowTracker.cs`
- [Window previews](https://github.com/alztrk/opentaskbar/blob/master/Services/Interop/WindowThumbnailPreview.cs): `Services/Interop/WindowThumbnailPreview.cs`
- [Auto-hide controller](https://github.com/alztrk/opentaskbar/blob/master/Services/App/DockAutoHideController.cs): `Services/App/DockAutoHideController.cs`
- [Windows shell integration](https://github.com/alztrk/opentaskbar/blob/master/Services/Interop/ShellShortcuts.cs): `Services/Interop/ShellShortcuts.cs`
- [Search widget](https://github.com/alztrk/opentaskbar/blob/master/Widgets/SearchWidget.cs): `Widgets/SearchWidget.cs`

### Settings and appearance

- [Settings window](https://github.com/alztrk/opentaskbar/blob/master/Views/Windows/SettingsWindow.xaml.cs): `Views/Windows/SettingsWindow.xaml.cs`
- [Preferences](https://github.com/alztrk/opentaskbar/blob/master/Services/Settings/ApplicationPreferences.cs): `Services/Settings/ApplicationPreferences.cs`
- [Settings store](https://github.com/alztrk/opentaskbar/blob/master/Services/Settings/DockSettingsStore.cs): `Services/Settings/DockSettingsStore.cs`
- [Theme packs](https://github.com/alztrk/opentaskbar/blob/master/Services/App/ThemePacks.cs): `Services/App/ThemePacks.cs`
- [Theme rendering](https://github.com/alztrk/opentaskbar/blob/master/Services/Settings/ThemeManager.cs): `Services/Settings/ThemeManager.cs`
- [Localization](https://github.com/alztrk/opentaskbar/blob/master/Services/Localization/UiText.cs): `Services/Localization/UiText.cs`

### Taskbar recovery

- [Taskbar replacement](https://github.com/alztrk/opentaskbar/blob/master/Services/Interop/TaskbarReplacementSession.cs): `Services/Interop/TaskbarReplacementSession.cs`
- [Crash watchdog](https://github.com/alztrk/opentaskbar/blob/master/Services/App/TaskbarRecoveryWatchdog.cs): `Services/App/TaskbarRecoveryWatchdog.cs`

### Other components

- **User**
- **Windows**

## Connections

- User → Application startup: starts (evidence: `README.md`)
- Application startup → Main dock window: opens (evidence: `App.xaml.cs`)
- Application startup → Preferences: loads (evidence: `App.xaml.cs`)
- Application startup → Taskbar replacement: heals recovery (evidence: `App.xaml.cs`)
- Main dock window → Settings window: opens
- Preferences → Settings store: persists (evidence: `Services/Settings/ApplicationPreferences.cs`)
- Main dock window → Widget coordinator: coordinates (evidence: `Views/Windows/MainWindow.xaml.cs`)
- Main dock window → Widget catalog and data: uses (evidence: `Views/Windows/MainWindow.xaml.cs`)
- Main dock window → Widget panels: hosts (evidence: `Views/Windows/MainWindow.xaml.cs`)
- Widget coordinator → Widget implementations: coordinates (evidence: `Widgets/WidgetCoordinator.cs`)
- Widget catalog and data → Windows: reads system data (evidence: `Widgets/DockWidgetService.cs`)
- Main dock window → Window tracking: tracks windows (evidence: `Views/Windows/MainWindow.xaml.cs`)
- Main dock window → Window previews: shows previews (evidence: `Views/Windows/MainWindow.xaml.cs`)
- Main dock window → Auto-hide controller: controls visibility (evidence: `Views/Windows/MainWindow.xaml.cs`)
- Main dock window → Taskbar replacement: replaces taskbar (evidence: `Views/Windows/MainWindow.xaml.cs`)
- Main dock window → Theme packs: loads themes (evidence: `Views/Windows/MainWindow.xaml.cs`)
- Theme packs → Theme rendering: applies theme (evidence: `Services/App/ThemePacks.cs`)
- Search widget → Windows shell integration: opens search (evidence: `Widgets/SearchWidget.cs`)
- Main dock window → Secondary docks: supports multi-monitor (evidence: `README.md`)
- Main dock window → Windows: integrates shell features (evidence: `README.md`)
- Taskbar replacement → Crash watchdog: registers recovery (evidence: `Services/Interop/TaskbarReplacementSession.cs`)
- Crash watchdog → Windows: restores taskbar (evidence: `README.md`)
- Settings window → Preferences: edits preferences
- Main dock window → Localization: localizes interface (evidence: `Views/Windows/MainWindow.xaml.cs`)
