# eben-builds/tessdeck-for-windows architecture

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

- Interactive diagram: https://gitdiagram.com/eben-builds/tessdeck-for-windows
- Repository: https://github.com/eben-builds/tessdeck-for-windows

## Overview

Tessdeck is a Windows notification-area utility for globally hotkey-driven window arrangement, with settings, Quick Layout save/restore, command-line controls, startup registration, and release checks. The principal flow is tray or shortcut input → action dispatch → window geometry changes through Win32; Quick Layout separately captures and restores matching open windows. The graph also includes configuration, settings preview, onboarding, and update status. Relationships are limited to README statements and shown source/index references; some implementation details, especially command dispatch and update networking, were not excerpted.

Main entry points: [`src/TrayApp.cs`](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/TrayApp.cs) (Tray app), [`src/WindowManager.cs`](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/WindowManager.cs) (Window manager), [`src/HotkeyManager.cs`](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/HotkeyManager.cs) (Hotkey manager), [`src/SettingsForm.cs`](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/SettingsForm.cs) (Settings UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime controls"]
  node_tray["Tray app<br/>[TrayApp.cs]"]
  node_entry["App entry<br/>[Program.cs]"]
  node_hotkeys["Hotkey manager<br/>[HotkeyManager.cs]"]
  node_hotkey["Hotkey model<br/>[Hotkey.cs]"]
end

subgraph group_arrangement["Window arrangement"]
  node_actions["Snap actions<br/>[SnapAction.cs]"]
  node_windows["Window manager<br/>[WindowManager.cs]"]
  node_winapi["Windows APIs<br/>[Native.cs]"]
  node_snapshot["Quick Layout<br/>[LayoutSnapshot.cs]"]
end

subgraph group_preferences["Settings and state"]
  node_config["Configuration<br/>[Config.cs]"]
  node_settings["Settings UI<br/>[SettingsForm.cs]"]
  node_preview["Layout preview<br/>[PreviewPanel.cs]"]
  node_startup["Startup registration<br/>[Startup.cs]"]
end

subgraph group_guidance["Onboarding and updates"]
  node_welcome["Welcome guide<br/>[WelcomeForm.cs]"]
  node_updatecheck["Release checker<br/>[UpdateChecker.cs]"]
  node_updateui["Update settings"]
  node_badge["Update badge state"]
end

node_user(("User"))
node_cli(("CLI caller"))
node_github["GitHub releases"]

node_user -->|"uses menu"| node_tray
node_user -->|"presses shortcut"| node_hotkeys
node_cli -->|"invokes commands"| node_entry
node_entry -->|"starts"| node_tray
node_tray -->|"registers"| node_hotkeys
node_hotkeys -->|"reads bindings"| node_config
node_hotkeys -->|"uses bindings"| node_hotkey
node_hotkeys -->|"dispatches action"| node_actions
node_tray -->|"applies actions"| node_windows
node_entry -->|"applies CLI action"| node_windows
node_windows -->|"interprets layout"| node_actions
node_windows -->|"reads options"| node_config
node_windows -->|"calls Win32"| node_winapi
node_tray -->|"saves or restores"| node_snapshot
node_snapshot -->|"uses window data"| node_windows
node_snapshot -->|"uses local paths"| node_config
node_user -->|"configures shortcuts"| node_settings
node_settings -->|"edits settings"| node_config
node_settings -->|"shows preview"| node_preview
node_settings -->|"captures bindings"| node_hotkey
node_tray -->|"toggles startup"| node_startup
node_tray -->|"shows guide"| node_welcome
node_tray -->|"checks releases"| node_updatecheck
node_updatecheck -->|"queries metadata"| node_github
node_tray -->|"updates badge"| node_badge
node_updateui -->|"checks on demand"| node_updatecheck
node_updateui -->|"sets status"| node_badge
node_tray -->|"opens settings"| node_settings

click node_tray "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/TrayApp.cs"
click node_entry "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/Program.cs"
click node_hotkeys "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/HotkeyManager.cs"
click node_hotkey "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/Hotkey.cs"
click node_actions "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/SnapAction.cs"
click node_windows "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/WindowManager.cs"
click node_winapi "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/Native.cs"
click node_snapshot "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/LayoutSnapshot.cs"
click node_config "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/Config.cs"
click node_settings "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/SettingsForm.cs"
click node_preview "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/PreviewPanel.cs"
click node_startup "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/Startup.cs"
click node_welcome "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/WelcomeForm.cs"
click node_updatecheck "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/UpdateChecker.cs"
click node_updateui "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/SettingsUpdateSection.cs"
click node_badge "https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/UpdateBadgeState.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_entry,node_hotkeys,node_hotkey,node_user toneBlue
class node_actions,node_windows,node_winapi,node_snapshot toneAmber
class node_config,node_settings,node_preview,node_startup toneMint
class node_welcome,node_updatecheck,node_updateui,node_badge toneRose
class node_cli,node_github toneIndigo
```

## Components

### Runtime controls

- [Tray app](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/TrayApp.cs): `src/TrayApp.cs`
- [App entry](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/Program.cs): `src/Program.cs`
- [Hotkey manager](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/HotkeyManager.cs): `src/HotkeyManager.cs`
- [Hotkey model](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/Hotkey.cs): `src/Hotkey.cs`

### Window arrangement

- [Snap actions](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/SnapAction.cs): `src/SnapAction.cs`
- [Window manager](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/WindowManager.cs): `src/WindowManager.cs`
- [Windows APIs](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/Native.cs): `src/Native.cs`
- [Quick Layout](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/LayoutSnapshot.cs): `src/LayoutSnapshot.cs`

### Settings and state

- [Configuration](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/Config.cs): `src/Config.cs`
- [Settings UI](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/SettingsForm.cs): `src/SettingsForm.cs`
- [Layout preview](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/PreviewPanel.cs): `src/PreviewPanel.cs`
- [Startup registration](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/Startup.cs): `src/Startup.cs`

### Onboarding and updates

- [Welcome guide](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/WelcomeForm.cs): `src/WelcomeForm.cs`
- [Release checker](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/UpdateChecker.cs): `src/UpdateChecker.cs`
- [Update settings](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/SettingsUpdateSection.cs): `src/SettingsUpdateSection.cs`
- [Update badge state](https://github.com/eben-builds/tessdeck-for-windows/blob/main/src/UpdateBadgeState.cs): `src/UpdateBadgeState.cs`

### Other components

- **User**
- **CLI caller**
- **GitHub releases**

## Connections

- User → Tray app: uses menu (evidence: `README.md`)
- User → Hotkey manager: presses shortcut (evidence: `README.md`)
- CLI caller → App entry: invokes commands (evidence: `README.md`)
- App entry → Tray app: starts (evidence: `src/Program.cs`)
- Tray app → Hotkey manager: registers (evidence: `src/TrayApp.cs`)
- Hotkey manager → Configuration: reads bindings (evidence: `src/HotkeyManager.cs`)
- Hotkey manager → Hotkey model: uses bindings (evidence: `src/HotkeyManager.cs`)
- Hotkey manager → Snap actions: dispatches action (evidence: `src/HotkeyManager.cs`)
- Tray app → Window manager: applies actions (evidence: `src/TrayApp.cs`)
- App entry → Window manager: applies CLI action (evidence: `src/Program.cs`)
- Window manager → Snap actions: interprets layout (evidence: `src/WindowManager.cs`)
- Window manager → Configuration: reads options (evidence: `src/WindowManager.cs`)
- Window manager → Windows APIs: calls Win32 (evidence: `src/WindowManager.cs`)
- Tray app → Quick Layout: saves or restores (evidence: `src/TrayApp.cs`)
- Quick Layout → Window manager: uses window data (evidence: `src/LayoutSnapshot.cs`)
- Quick Layout → Configuration: uses local paths (evidence: `src/LayoutSnapshot.cs`)
- User → Settings UI: configures shortcuts (evidence: `README.md`)
- Settings UI → Configuration: edits settings (evidence: `src/SettingsForm.cs`)
- Settings UI → Layout preview: shows preview (evidence: `src/SettingsForm.cs`)
- Settings UI → Hotkey model: captures bindings (evidence: `src/SettingsForm.cs`)
- Tray app → Startup registration: toggles startup (evidence: `src/TrayApp.cs`)
- Tray app → Welcome guide: shows guide (evidence: `src/TrayApp.cs`)
- Tray app → Release checker: checks releases (evidence: `src/TrayApp.cs`)
- Release checker → GitHub releases: queries metadata (evidence: `README.md`)
- Tray app → Update badge state: updates badge (evidence: `src/TrayApp.cs`)
- Update settings → Release checker: checks on demand (evidence: `src/SettingsUpdateSection.cs`)
- Update settings → Update badge state: sets status (evidence: `src/SettingsUpdateSection.cs`)
- Tray app → Settings UI: opens settings (evidence: `src/TrayApp.cs`)
