# godrezjr2/macdock architecture

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

- Interactive diagram: https://gitdiagram.com/godrezjr2/macdock
- Repository: https://github.com/godrezjr2/macdock

## Overview

MacDock is a Windows 11 desktop shell that recreates macOS-style dock, menu bar, search, app launching, and desktop widgets. The user workflow runs from desktop interaction through a dock, menu-bar item, or keyboard shortcut into a focused feature—such as launching an app, switching windows, searching, or opening a system flyout. Supporting layers provide shell integration, rendering, configuration, and usage data. The README documents the main capabilities; some feature links below rely on that documentation because their implementation excerpts were not provided.

Main entry points: [`src/menubar.rs`](https://github.com/godrezjr2/macdock/blob/master/src/menubar.rs) (Menu bar), [`src/dock.rs`](https://github.com/godrezjr2/macdock/blob/master/src/dock.rs) (Dock), [`src/shell.rs`](https://github.com/godrezjr2/macdock/blob/master/src/shell.rs) (Windows shell), [`src/flyout.rs`](https://github.com/godrezjr2/macdock/blob/master/src/flyout.rs) (Flyout framework)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop shell"]
  node_dock["Dock<br/>[dock.rs]"]
  node_menubar["Menu bar<br/>[menubar.rs]"]
  node_taskbar["AppBar integration<br/>[taskbar.rs]"]
  node_widgets["Desktop widgets<br/>[widgets.rs]"]
end

subgraph group_launch["App access"]
  node_apps["Apps window<br/>[apps.rs]"]
  node_launchpad["Launchpad<br/>[launchpad.rs]"]
  node_spotlight["Spotlight search<br/>[spotlight.rs]"]
  node_switcher["App switcher<br/>[switcher.rs]"]
  node_shell["Windows shell<br/>[shell.rs]"]
end

subgraph group_panels["System panels"]
  node_flyout["Flyout framework<br/>[flyout.rs]"]
  node_settings["Settings window<br/>[fly_settings.rs]"]
  node_control["Control Center<br/>[fly_cc.rs]"]
  node_wifi["Wi-Fi menu<br/>[fly_wifi.rs]"]
  node_battery["Battery panel<br/>[fly_battery.rs]"]
  node_calendar["Calendar panel<br/>[fly_cal.rs]"]
  node_tray["Tray icons<br/>[fly_tray.rs]"]
  node_ai_panel["AI usage panel<br/>[fly_ai.rs]"]
  node_menu["App menus<br/>[menu.rs]"]
end

subgraph group_data["Data and settings"]
  node_ai_usage["AI usage reader<br/>[ai_usage.rs]"]
  node_oauth["Claude usage API<br/>[claude_oauth.rs]"]
  node_config[("Configuration<br/>[config.rs]")]
  node_widget_cfg["Widget configuration<br/>[widget_cfg.rs]"]
  node_widget_data["Widget data<br/>[widget_data.rs]"]
  node_i18n["Localization<br/>[i18n.rs]"]
  node_update["Update manager<br/>[update.rs]"]
end

subgraph group_render["Rendering and effects"]
  node_genie["Genie animation<br/>[genie.rs]"]
  node_gfx["Graphics helpers<br/>[gfx.rs]"]
end

node_user(("Desktop user"))
node_github(("GitHub releases"))
node_anthropic(("Anthropic API"))

node_user -->|"interacts"| node_dock
node_user -->|"interacts"| node_menubar
node_user -->|"opens"| node_apps
node_user -->|"searches"| node_spotlight
node_user -->|"switches apps"| node_switcher
node_user -->|"views"| node_widgets
node_dock -->|"launches apps"| node_shell
node_dock -->|"animates windows"| node_genie
node_dock -->|"opens menus"| node_menu
node_dock -->|"reads settings"| node_config
node_dock -->|"draws through"| node_gfx
node_menubar -->|"opens menus"| node_menu
node_menubar -->|"reads summary"| node_ai_usage
node_menubar -->|"checks updates"| node_update
node_menubar -->|"opens panels"| node_flyout
node_menubar -.->|"reserves screen"| node_taskbar
node_apps -.->|"launches apps"| node_shell
node_spotlight -.->|"launches apps"| node_shell
node_switcher -->|"activates windows"| node_shell
node_switcher -->|"requests animation"| node_genie
node_settings -->|"saves settings"| node_config
node_settings -->|"uses framework"| node_flyout
node_control -->|"uses framework"| node_flyout
node_control -->|"opens Wi-Fi"| node_wifi
node_wifi -->|"uses framework"| node_flyout
node_ai_panel -->|"shows usage"| node_ai_usage
node_ai_usage -.->|"requests limits"| node_oauth
node_oauth -->|"fetches limits"| node_anthropic
node_widgets -->|"reads layout"| node_widget_cfg
node_widgets -->|"renders data"| node_widget_data
node_widget_data -.->|"uses usage data"| node_oauth
node_genie -->|"uses graphics"| node_gfx
node_update -->|"checks releases"| node_github
node_menubar -.->|"localizes labels"| node_i18n
node_settings -->|"localizes options"| node_i18n

click node_dock "https://github.com/godrezjr2/macdock/blob/master/src/dock.rs"
click node_menubar "https://github.com/godrezjr2/macdock/blob/master/src/menubar.rs"
click node_taskbar "https://github.com/godrezjr2/macdock/blob/master/src/taskbar.rs"
click node_apps "https://github.com/godrezjr2/macdock/blob/master/src/apps.rs"
click node_launchpad "https://github.com/godrezjr2/macdock/blob/master/src/launchpad.rs"
click node_spotlight "https://github.com/godrezjr2/macdock/blob/master/src/spotlight.rs"
click node_switcher "https://github.com/godrezjr2/macdock/blob/master/src/switcher.rs"
click node_shell "https://github.com/godrezjr2/macdock/blob/master/src/shell.rs"
click node_flyout "https://github.com/godrezjr2/macdock/blob/master/src/flyout.rs"
click node_settings "https://github.com/godrezjr2/macdock/blob/master/src/fly_settings.rs"
click node_control "https://github.com/godrezjr2/macdock/blob/master/src/fly_cc.rs"
click node_wifi "https://github.com/godrezjr2/macdock/blob/master/src/fly_wifi.rs"
click node_battery "https://github.com/godrezjr2/macdock/blob/master/src/fly_battery.rs"
click node_calendar "https://github.com/godrezjr2/macdock/blob/master/src/fly_cal.rs"
click node_tray "https://github.com/godrezjr2/macdock/blob/master/src/fly_tray.rs"
click node_ai_panel "https://github.com/godrezjr2/macdock/blob/master/src/fly_ai.rs"
click node_ai_usage "https://github.com/godrezjr2/macdock/blob/master/src/ai_usage.rs"
click node_oauth "https://github.com/godrezjr2/macdock/blob/master/src/claude_oauth.rs"
click node_config "https://github.com/godrezjr2/macdock/blob/master/src/config.rs"
click node_widget_cfg "https://github.com/godrezjr2/macdock/blob/master/src/widget_cfg.rs"
click node_widget_data "https://github.com/godrezjr2/macdock/blob/master/src/widget_data.rs"
click node_widgets "https://github.com/godrezjr2/macdock/blob/master/src/widgets.rs"
click node_genie "https://github.com/godrezjr2/macdock/blob/master/src/genie.rs"
click node_gfx "https://github.com/godrezjr2/macdock/blob/master/src/gfx.rs"
click node_menu "https://github.com/godrezjr2/macdock/blob/master/src/menu.rs"
click node_i18n "https://github.com/godrezjr2/macdock/blob/master/src/i18n.rs"
click node_update "https://github.com/godrezjr2/macdock/blob/master/src/update.rs"

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_menubar,node_taskbar,node_widgets,node_user toneBlue
class node_apps,node_launchpad,node_spotlight,node_switcher,node_shell toneAmber
class node_flyout,node_settings,node_control,node_wifi,node_battery,node_calendar,node_tray,node_ai_panel,node_menu,node_anthropic toneMint
class node_ai_usage,node_oauth,node_config,node_widget_cfg,node_widget_data,node_i18n,node_update toneRose
class node_genie,node_gfx,node_github toneIndigo
```

## Components

### Desktop shell

- [Dock](https://github.com/godrezjr2/macdock/blob/master/src/dock.rs): `src/dock.rs`
- [Menu bar](https://github.com/godrezjr2/macdock/blob/master/src/menubar.rs): `src/menubar.rs`
- [AppBar integration](https://github.com/godrezjr2/macdock/blob/master/src/taskbar.rs): `src/taskbar.rs`
- [Desktop widgets](https://github.com/godrezjr2/macdock/blob/master/src/widgets.rs): `src/widgets.rs`

### App access

- [Apps window](https://github.com/godrezjr2/macdock/blob/master/src/apps.rs): `src/apps.rs`
- [Launchpad](https://github.com/godrezjr2/macdock/blob/master/src/launchpad.rs): `src/launchpad.rs`
- [Spotlight search](https://github.com/godrezjr2/macdock/blob/master/src/spotlight.rs): `src/spotlight.rs`
- [App switcher](https://github.com/godrezjr2/macdock/blob/master/src/switcher.rs): `src/switcher.rs`
- [Windows shell](https://github.com/godrezjr2/macdock/blob/master/src/shell.rs): `src/shell.rs`

### System panels

- [Flyout framework](https://github.com/godrezjr2/macdock/blob/master/src/flyout.rs): `src/flyout.rs`
- [Settings window](https://github.com/godrezjr2/macdock/blob/master/src/fly_settings.rs): `src/fly_settings.rs`
- [Control Center](https://github.com/godrezjr2/macdock/blob/master/src/fly_cc.rs): `src/fly_cc.rs`
- [Wi-Fi menu](https://github.com/godrezjr2/macdock/blob/master/src/fly_wifi.rs): `src/fly_wifi.rs`
- [Battery panel](https://github.com/godrezjr2/macdock/blob/master/src/fly_battery.rs): `src/fly_battery.rs`
- [Calendar panel](https://github.com/godrezjr2/macdock/blob/master/src/fly_cal.rs): `src/fly_cal.rs`
- [Tray icons](https://github.com/godrezjr2/macdock/blob/master/src/fly_tray.rs): `src/fly_tray.rs`
- [AI usage panel](https://github.com/godrezjr2/macdock/blob/master/src/fly_ai.rs): `src/fly_ai.rs`
- [App menus](https://github.com/godrezjr2/macdock/blob/master/src/menu.rs): `src/menu.rs`

### Data and settings

- [AI usage reader](https://github.com/godrezjr2/macdock/blob/master/src/ai_usage.rs): `src/ai_usage.rs`
- [Claude usage API](https://github.com/godrezjr2/macdock/blob/master/src/claude_oauth.rs): `src/claude_oauth.rs`
- [Configuration](https://github.com/godrezjr2/macdock/blob/master/src/config.rs): `src/config.rs`
- [Widget configuration](https://github.com/godrezjr2/macdock/blob/master/src/widget_cfg.rs): `src/widget_cfg.rs`
- [Widget data](https://github.com/godrezjr2/macdock/blob/master/src/widget_data.rs): `src/widget_data.rs`
- [Localization](https://github.com/godrezjr2/macdock/blob/master/src/i18n.rs): `src/i18n.rs`
- [Update manager](https://github.com/godrezjr2/macdock/blob/master/src/update.rs): `src/update.rs`

### Rendering and effects

- [Genie animation](https://github.com/godrezjr2/macdock/blob/master/src/genie.rs): `src/genie.rs`
- [Graphics helpers](https://github.com/godrezjr2/macdock/blob/master/src/gfx.rs): `src/gfx.rs`

### Other components

- **Desktop user**
- **GitHub releases**
- **Anthropic API**

## Connections

- Desktop user → Dock: interacts
- Desktop user → Menu bar: interacts
- Desktop user → Apps window: opens
- Desktop user → Spotlight search: searches
- Desktop user → App switcher: switches apps
- Desktop user → Desktop widgets: views
- Dock → Windows shell: launches apps (evidence: `src/dock.rs`)
- Dock → Genie animation: animates windows (evidence: `src/dock.rs`)
- Dock → App menus: opens menus (evidence: `src/dock.rs`)
- Dock → Configuration: reads settings (evidence: `src/dock.rs`)
- Dock → Graphics helpers: draws through (evidence: `src/dock.rs`)
- Menu bar → App menus: opens menus (evidence: `src/menubar.rs`)
- Menu bar → AI usage reader: reads summary (evidence: `src/menubar.rs`)
- Menu bar → Update manager: checks updates (evidence: `src/menubar.rs`)
- Menu bar → Flyout framework: opens panels (evidence: `src/menubar.rs`)
- Menu bar → AppBar integration: reserves screen (evidence: `src/menubar.rs`)
- Apps window → Windows shell: launches apps
- Spotlight search → Windows shell: launches apps (evidence: `src/spotlight.rs`)
- App switcher → Windows shell: activates windows (evidence: `src/switcher.rs`)
- App switcher → Genie animation: requests animation (evidence: `src/switcher.rs`)
- Settings window → Configuration: saves settings (evidence: `src/fly_settings.rs`)
- Settings window → Flyout framework: uses framework (evidence: `src/fly_settings.rs`)
- Control Center → Flyout framework: uses framework (evidence: `src/fly_cc.rs`)
- Control Center → Wi-Fi menu: opens Wi-Fi (evidence: `src/fly_cc.rs`)
- Wi-Fi menu → Flyout framework: uses framework (evidence: `src/fly_wifi.rs`)
- AI usage panel → AI usage reader: shows usage (evidence: `src/fly_ai.rs`)
- AI usage reader → Claude usage API: requests limits (evidence: `src/ai_usage.rs`)
- Claude usage API → Anthropic API: fetches limits (evidence: `src/claude_oauth.rs`)
- Desktop widgets → Widget configuration: reads layout (evidence: `src/widgets.rs`)
- Desktop widgets → Widget data: renders data (evidence: `src/widgets.rs`)
- Widget data → Claude usage API: uses usage data (evidence: `src/widget_data.rs`)
- Genie animation → Graphics helpers: uses graphics (evidence: `src/genie.rs`)
- Update manager → GitHub releases: checks releases
- Menu bar → Localization: localizes labels (evidence: `src/menubar.rs`)
- Settings window → Localization: localizes options (evidence: `src/fly_settings.rs`)
