# crafter-station/muelle architecture

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

- Interactive diagram: https://gitdiagram.com/crafter-station/muelle
- Repository: https://github.com/crafter-station/muelle

## Overview

Muelle is a Windows taskbar-replacement dock with an optional menu bar and a separate Settings app. The main workflow is Windows shell/window state → dock presentation and interaction → launch, pin, minimize/restore, or file-drop actions. Supporting stages cover shared configuration, animation/layout, status and AI-usage display, and taskbar recovery. Paths and relationships are grounded in the README and shown source/index references; some feature internals are unsampled, so their edges are documented or omitted rather than inferred.

Main entry points: [`apps/dock/src/app.rs`](https://github.com/crafter-station/muelle/blob/main/apps/dock/src/app.rs) (Dock lifecycle), [`apps/settings/src/App.tsx`](https://github.com/crafter-station/muelle/blob/main/apps/settings/src/App.tsx) (Settings interface), [`apps/dock/src/main.rs`](https://github.com/crafter-station/muelle/blob/main/apps/dock/src/main.rs) (Dock startup), [`apps/dock/src/scene.rs`](https://github.com/crafter-station/muelle/blob/main/apps/dock/src/scene.rs) (Dock rendering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dock["Dock experience"]
  node_dock_app["Dock lifecycle<br/>[app.rs]"]
  node_dock_entry["Dock startup<br/>[main.rs]"]
  node_dock_render["Dock rendering<br/>[scene.rs]"]
  node_graphics["Graphics surfaces<br/>[gfx.rs]"]
  node_dragdrop["File drop<br/>[drop.rs]"]
  node_previews["Window previews<br/>[thumbnails.rs]"]
  node_flight["Minimize animation<br/>[flight.rs]"]
end

subgraph group_shell["Windows shell"]
  node_tracker["Window tracking<br/>[tracker.rs]"]
  node_launcher["App launching<br/>[launcher.rs]"]
  node_pins["Pinned apps<br/>[pins.rs]"]
  node_shell_system["Windows system queries<br/>[system.rs]"]
  node_watchdog["Taskbar watchdog<br/>[watch.rs]"]
end

subgraph group_logic["Layout and animation"]
  node_layout["Dock layout<br/>[layout.rs]"]
  node_magnify["Icon magnification<br/>[magnify.rs]"]
  node_genie["Genie animation<br/>[genie.rs]"]
  node_roster["Window roster<br/>[roster.rs]"]
end

subgraph group_menubar["Menu bar and usage"]
  node_menubar_view["Menu bar<br/>[menubar.rs]"]
  node_usage["Provider usage<br/>[usage.rs]"]
end

subgraph group_settings["Settings and configuration"]
  node_settings_ui["Settings interface<br/>[App.tsx]"]
  node_settings_backend["Settings backend<br/>[main.rs]"]
  node_config[("Shared configuration<br/>[lib.rs]")]
end

node_user(("User"))
node_update_service{{"GitHub Releases"}}
node_ai_providers{{"AI providers"}}

node_user -->|"starts"| node_dock_entry
node_dock_entry -->|"runs"| node_dock_app
node_dock_app -->|"renders"| node_dock_render
node_dock_render -->|"draws with"| node_graphics
node_dock_app -->|"animates windows"| node_flight
node_dock_app -.->|"shows thumbnails"| node_previews
node_dock_app -.->|"accepts drops"| node_dragdrop
node_dock_app -.->|"positions icons"| node_layout
node_dock_app -.->|"magnifies icons"| node_magnify
node_dock_app -.->|"uses animation"| node_genie
node_dock_app -.->|"tracks windows"| node_tracker
node_dock_app -.->|"launches apps"| node_launcher
node_dock_app -.->|"manages pins"| node_pins
node_dock_entry -->|"starts guard"| node_watchdog
node_dock_entry -.->|"uses shell queries"| node_shell_system
node_user -->|"views status"| node_menubar_view
node_menubar_view -->|"shows quotas"| node_usage
node_usage -.->|"queries optionally"| node_ai_providers
node_user -->|"changes preferences"| node_settings_ui
node_settings_ui -.->|"uses Tauri backend"| node_settings_backend
node_settings_ui -->|"loads and saves"| node_config
node_settings_backend -.->|"shares settings"| node_config
node_settings_ui -->|"applies live changes"| node_dock_app
node_settings_ui -->|"checks optionally"| node_update_service

click node_dock_app "https://github.com/crafter-station/muelle/blob/main/apps/dock/src/app.rs"
click node_dock_entry "https://github.com/crafter-station/muelle/blob/main/apps/dock/src/main.rs"
click node_dock_render "https://github.com/crafter-station/muelle/blob/main/apps/dock/src/scene.rs"
click node_graphics "https://github.com/crafter-station/muelle/blob/main/apps/dock/src/gfx.rs"
click node_dragdrop "https://github.com/crafter-station/muelle/blob/main/apps/dock/src/drop.rs"
click node_previews "https://github.com/crafter-station/muelle/blob/main/apps/dock/src/thumbnails.rs"
click node_flight "https://github.com/crafter-station/muelle/blob/main/apps/dock/src/flight.rs"
click node_layout "https://github.com/crafter-station/muelle/blob/main/crates/muelle-core/src/layout.rs"
click node_magnify "https://github.com/crafter-station/muelle/blob/main/crates/muelle-core/src/magnify.rs"
click node_genie "https://github.com/crafter-station/muelle/blob/main/crates/muelle-core/src/genie.rs"
click node_roster "https://github.com/crafter-station/muelle/blob/main/crates/muelle-core/src/roster.rs"
click node_tracker "https://github.com/crafter-station/muelle/blob/main/crates/muelle-shell/src/tracker.rs"
click node_launcher "https://github.com/crafter-station/muelle/blob/main/crates/muelle-shell/src/launcher.rs"
click node_pins "https://github.com/crafter-station/muelle/blob/main/crates/muelle-shell/src/pins.rs"
click node_shell_system "https://github.com/crafter-station/muelle/blob/main/crates/muelle-shell/src/system.rs"
click node_watchdog "https://github.com/crafter-station/muelle/blob/main/crates/muelle-shell/src/watch.rs"
click node_menubar_view "https://github.com/crafter-station/muelle/blob/main/apps/dock/src/menubar.rs"
click node_usage "https://github.com/crafter-station/muelle/blob/main/apps/dock/src/usage.rs"
click node_settings_ui "https://github.com/crafter-station/muelle/blob/main/apps/settings/src/App.tsx"
click node_settings_backend "https://github.com/crafter-station/muelle/blob/main/apps/settings/src-tauri/src/main.rs"
click node_config "https://github.com/crafter-station/muelle/blob/main/crates/muelle-config/src/lib.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_app,node_dock_entry,node_dock_render,node_graphics,node_dragdrop,node_previews,node_flight,node_user toneBlue
class node_tracker,node_launcher,node_pins,node_shell_system,node_watchdog toneAmber
class node_layout,node_magnify,node_genie,node_roster toneMint
class node_menubar_view,node_usage toneRose
class node_settings_ui,node_settings_backend,node_config,node_update_service,node_ai_providers toneIndigo
```

## Components

### Dock experience

- [Dock lifecycle](https://github.com/crafter-station/muelle/blob/main/apps/dock/src/app.rs): `apps/dock/src/app.rs`
- [Dock startup](https://github.com/crafter-station/muelle/blob/main/apps/dock/src/main.rs): `apps/dock/src/main.rs`
- [Dock rendering](https://github.com/crafter-station/muelle/blob/main/apps/dock/src/scene.rs): `apps/dock/src/scene.rs`
- [Graphics surfaces](https://github.com/crafter-station/muelle/blob/main/apps/dock/src/gfx.rs): `apps/dock/src/gfx.rs`
- [File drop](https://github.com/crafter-station/muelle/blob/main/apps/dock/src/drop.rs): `apps/dock/src/drop.rs`
- [Window previews](https://github.com/crafter-station/muelle/blob/main/apps/dock/src/thumbnails.rs): `apps/dock/src/thumbnails.rs`
- [Minimize animation](https://github.com/crafter-station/muelle/blob/main/apps/dock/src/flight.rs): `apps/dock/src/flight.rs`

### Windows shell

- [Window tracking](https://github.com/crafter-station/muelle/blob/main/crates/muelle-shell/src/tracker.rs): `crates/muelle-shell/src/tracker.rs`
- [App launching](https://github.com/crafter-station/muelle/blob/main/crates/muelle-shell/src/launcher.rs): `crates/muelle-shell/src/launcher.rs`
- [Pinned apps](https://github.com/crafter-station/muelle/blob/main/crates/muelle-shell/src/pins.rs): `crates/muelle-shell/src/pins.rs`
- [Windows system queries](https://github.com/crafter-station/muelle/blob/main/crates/muelle-shell/src/system.rs): `crates/muelle-shell/src/system.rs`
- [Taskbar watchdog](https://github.com/crafter-station/muelle/blob/main/crates/muelle-shell/src/watch.rs): `crates/muelle-shell/src/watch.rs`

### Layout and animation

- [Dock layout](https://github.com/crafter-station/muelle/blob/main/crates/muelle-core/src/layout.rs): `crates/muelle-core/src/layout.rs`
- [Icon magnification](https://github.com/crafter-station/muelle/blob/main/crates/muelle-core/src/magnify.rs): `crates/muelle-core/src/magnify.rs`
- [Genie animation](https://github.com/crafter-station/muelle/blob/main/crates/muelle-core/src/genie.rs): `crates/muelle-core/src/genie.rs`
- [Window roster](https://github.com/crafter-station/muelle/blob/main/crates/muelle-core/src/roster.rs): `crates/muelle-core/src/roster.rs`

### Menu bar and usage

- [Menu bar](https://github.com/crafter-station/muelle/blob/main/apps/dock/src/menubar.rs): `apps/dock/src/menubar.rs`
- [Provider usage](https://github.com/crafter-station/muelle/blob/main/apps/dock/src/usage.rs): `apps/dock/src/usage.rs`

### Settings and configuration

- [Settings interface](https://github.com/crafter-station/muelle/blob/main/apps/settings/src/App.tsx): `apps/settings/src/App.tsx`
- [Settings backend](https://github.com/crafter-station/muelle/blob/main/apps/settings/src-tauri/src/main.rs): `apps/settings/src-tauri/src/main.rs`
- [Shared configuration](https://github.com/crafter-station/muelle/blob/main/crates/muelle-config/src/lib.rs): `crates/muelle-config/src/lib.rs`

### Other components

- **User**
- **GitHub Releases**
- **AI providers**

## Connections

- User → Dock startup: starts
- Dock startup → Dock lifecycle: runs (evidence: `apps/dock/src/main.rs`)
- Dock lifecycle → Dock rendering: renders (evidence: `apps/dock/src/app.rs`)
- Dock rendering → Graphics surfaces: draws with (evidence: `apps/dock/src/scene.rs`)
- Dock lifecycle → Minimize animation: animates windows (evidence: `apps/dock/src/app.rs`)
- Dock lifecycle → Window previews: shows thumbnails
- Dock lifecycle → File drop: accepts drops (evidence: `apps/dock/src/drop.rs`)
- Dock lifecycle → Dock layout: positions icons
- Dock lifecycle → Icon magnification: magnifies icons
- Dock lifecycle → Genie animation: uses animation
- Dock lifecycle → Window tracking: tracks windows
- Dock lifecycle → App launching: launches apps
- Dock lifecycle → Pinned apps: manages pins
- Dock startup → Taskbar watchdog: starts guard (evidence: `apps/dock/src/main.rs`)
- Dock startup → Windows system queries: uses shell queries
- User → Menu bar: views status
- Menu bar → Provider usage: shows quotas
- Provider usage → AI providers: queries optionally
- User → Settings interface: changes preferences
- Settings interface → Settings backend: uses Tauri backend
- Settings interface → Shared configuration: loads and saves (evidence: `apps/settings/src/App.tsx`)
- Settings backend → Shared configuration: shares settings
- Settings interface → Dock lifecycle: applies live changes
- Settings interface → GitHub Releases: checks optionally
