# ejbills/dockdoor architecture

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

- Interactive diagram: https://gitdiagram.com/ejbills/dockdoor
- Repository: https://github.com/ejbills/dockdoor

## Overview

DockDoor adds window previews and switching to macOS, with settings and specialized hover content. The README documents the major capabilities; sampled source directly supports the cache-to-preview state updates, preview presentation components, and media service behavior, so other wiring is shown only where documented or evident from module responsibilities.

Main entry points: [`DockDoor/Views/Hover Window/Shared Components/SharedPreviewWindowCoordinator.swift`](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/Shared%20Components/SharedPreviewWindowCoordinator.swift) (Preview window), [`DockDoor/Views/Hover Window/WindowPreview Supporting/PreviewStateCoordinator.swift`](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/WindowPreview%20Supporting/PreviewStateCoordinator.swift) (Preview state), [`DockDoor/Views/Hover Window/WindowPreviewHoverContainer.swift`](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/WindowPreviewHoverContainer.swift) (Dock hover), [`DockDoor/Utilities/Window Management/WindowUtil.swift`](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/Window%20Management/WindowUtil.swift) (Window discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Window Interaction"]
  node_dock["Dock hover"]
  node_switcher["Window switcher"]
  node_previewstate["Preview state"]
  node_previewwindow["Preview window"]
  node_actions["Window actions"]
  node_cmdtab["Cmd-Tab enhancements"]
end

subgraph group_hover["Hover Content"]
  node_calendar["Calendar hover<br/>[CalendarView.swift]"]
  node_media["Media controls"]
  node_folder["Folder widget"]
end

subgraph group_system["System Integration"]
  node_windowinfo["Window discovery<br/>[WindowUtil.swift]"]
  node_windowcache["Window cache"]
  node_locking["Dock locking<br/>[DockLocker.swift]"]
  node_indicator["Active-app indicator"]
  node_mediaremote["Media service"]
end

subgraph group_configuration["Setup and Settings"]
  node_settings["Preferences<br/>[SettingsView.swift]"]
  node_search["Settings search"]
  node_onboarding["Onboarding"]
  node_permissions["Permissions"]
end

node_user(("Mac user"))

node_user -->|"hovers Dock icon"| node_dock
node_user -->|"switches windows"| node_switcher
node_dock -->|"updates preview state"| node_previewstate
node_previewstate -->|"applies cache changes"| node_windowcache
node_windowcache -->|"publishes window changes"| node_previewstate
node_previewstate -->|"provides preview state"| node_previewwindow
node_previewwindow -->|"presents hover content"| node_dock
node_windowinfo -->|"supplies window data"| node_windowcache
node_actions -->|"gets all windows"| node_windowinfo
node_user -->|"chooses window action"| node_actions
node_switcher -->|"tracks selection"| node_previewstate
node_previewwindow -.->|"embeds calendar"| node_calendar
node_previewwindow -.->|"embeds media controls"| node_media
node_media -->|"controls playback"| node_mediaremote
node_previewwindow -.->|"embeds folder content"| node_folder
node_user -->|"sets Dock display"| node_locking
node_indicator -.->|"tracks active app"| node_windowinfo
node_user -->|"changes preferences"| node_settings
node_settings -->|"searches settings"| node_search
node_user -->|"starts setup"| node_onboarding
node_onboarding -->|"checks permissions"| node_permissions

click node_dock "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/WindowPreviewHoverContainer.swift"
click node_switcher "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/CmdTabFocus%20Overlay/CmdTabFocusFullOverlayView.swift"
click node_previewstate "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/WindowPreview%20Supporting/PreviewStateCoordinator.swift"
click node_previewwindow "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/Shared%20Components/SharedPreviewWindowCoordinator.swift"
click node_windowinfo "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/Window%20Management/WindowUtil.swift"
click node_windowcache "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/Window%20Management/SpaceWindowCacheManager.swift"
click node_actions "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/WindowActionsMenuController.swift"
click node_cmdtab "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/DockObserver%2BCmdTab.swift"
click node_locking "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/DockLocker.swift"
click node_indicator "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/ActiveAppIndicator/ActiveAppIndicatorCoordinator.swift"
click node_calendar "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/Special%20Hover%20Windows/Calendar/CalendarView.swift"
click node_media "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/Special%20Hover%20Windows/Media/MediaControlsView.swift"
click node_mediaremote "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/Media/MediaRemoteService.swift"
click node_folder "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/Special%20Hover%20Windows/Folder/FolderWidgetView.swift"
click node_settings "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Settings/SettingsView.swift"
click node_search "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Settings/Search/SettingsSearchEngine.swift"
click node_onboarding "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Intro/OnboardingWindow.swift"
click node_permissions "https://github.com/ejbills/dockdoor/blob/main/DockDoor/Components/PermissionsView/PermissionsChecker.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_dock,node_switcher,node_previewstate,node_previewwindow,node_actions,node_cmdtab,node_user toneBlue
class node_calendar,node_media,node_folder toneAmber
class node_windowinfo,node_windowcache,node_locking,node_indicator,node_mediaremote toneMint
class node_settings,node_search,node_onboarding,node_permissions toneRose
```

## Components

### Window Interaction

- [Dock hover](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/WindowPreviewHoverContainer.swift): `DockDoor/Views/Hover Window/WindowPreviewHoverContainer.swift`
- [Window switcher](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/CmdTabFocus%20Overlay/CmdTabFocusFullOverlayView.swift): `DockDoor/Views/Hover Window/CmdTabFocus Overlay/CmdTabFocusFullOverlayView.swift`
- [Preview state](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/WindowPreview%20Supporting/PreviewStateCoordinator.swift): `DockDoor/Views/Hover Window/WindowPreview Supporting/PreviewStateCoordinator.swift`
- [Preview window](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/Shared%20Components/SharedPreviewWindowCoordinator.swift): `DockDoor/Views/Hover Window/Shared Components/SharedPreviewWindowCoordinator.swift`
- [Window actions](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/WindowActionsMenuController.swift): `DockDoor/Utilities/WindowActionsMenuController.swift`
- [Cmd-Tab enhancements](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/DockObserver%2BCmdTab.swift): `DockDoor/Utilities/DockObserver+CmdTab.swift`

### Hover Content

- [Calendar hover](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/Special%20Hover%20Windows/Calendar/CalendarView.swift): `DockDoor/Views/Hover Window/Special Hover Windows/Calendar/CalendarView.swift`
- [Media controls](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/Special%20Hover%20Windows/Media/MediaControlsView.swift): `DockDoor/Views/Hover Window/Special Hover Windows/Media/MediaControlsView.swift`
- [Folder widget](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Hover%20Window/Special%20Hover%20Windows/Folder/FolderWidgetView.swift): `DockDoor/Views/Hover Window/Special Hover Windows/Folder/FolderWidgetView.swift`

### System Integration

- [Window discovery](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/Window%20Management/WindowUtil.swift): `DockDoor/Utilities/Window Management/WindowUtil.swift`
- [Window cache](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/Window%20Management/SpaceWindowCacheManager.swift): `DockDoor/Utilities/Window Management/SpaceWindowCacheManager.swift`
- [Dock locking](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/DockLocker.swift): `DockDoor/Utilities/DockLocker.swift`
- [Active-app indicator](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/ActiveAppIndicator/ActiveAppIndicatorCoordinator.swift): `DockDoor/Utilities/ActiveAppIndicator/ActiveAppIndicatorCoordinator.swift`
- [Media service](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Utilities/Media/MediaRemoteService.swift): `DockDoor/Utilities/Media/MediaRemoteService.swift`

### Setup and Settings

- [Preferences](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Settings/SettingsView.swift): `DockDoor/Views/Settings/SettingsView.swift`
- [Settings search](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Settings/Search/SettingsSearchEngine.swift): `DockDoor/Views/Settings/Search/SettingsSearchEngine.swift`
- [Onboarding](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Views/Intro/OnboardingWindow.swift): `DockDoor/Views/Intro/OnboardingWindow.swift`
- [Permissions](https://github.com/ejbills/dockdoor/blob/main/DockDoor/Components/PermissionsView/PermissionsChecker.swift): `DockDoor/Components/PermissionsView/PermissionsChecker.swift`

### Other components

- **Mac user**

## Connections

- Mac user → Dock hover: hovers Dock icon
- Mac user → Window switcher: switches windows
- Dock hover → Preview state: updates preview state
- Preview state → Window cache: applies cache changes
- Window cache → Preview state: publishes window changes
- Preview state → Preview window: provides preview state
- Preview window → Dock hover: presents hover content
- Window discovery → Window cache: supplies window data
- Window actions → Window discovery: gets all windows
- Mac user → Window actions: chooses window action
- Window switcher → Preview state: tracks selection
- Preview window → Calendar hover: embeds calendar
- Preview window → Media controls: embeds media controls
- Media controls → Media service: controls playback
- Preview window → Folder widget: embeds folder content
- Mac user → Dock locking: sets Dock display
- Active-app indicator → Window discovery: tracks active app
- Mac user → Preferences: changes preferences
- Preferences → Settings search: searches settings
- Mac user → Onboarding: starts setup
- Onboarding → Permissions: checks permissions
