# fluidd-core/fluidd architecture

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

- Interactive diagram: https://gitdiagram.com/fluidd-core/fluidd
- Repository: https://github.com/fluidd-core/fluidd

## Overview

Fluidd is a browser-based control panel for Klipper printers. Users enter through the app shell and routed views, inspect printer status and tools, and issue commands or manage files; requests travel through the Moonraker WebSocket client and update Vuex state for display. The graph also preserves file/G-code preview, printer configuration, camera, history, timelapse, MMU/AFC, and layout capabilities visible in the tree or README. Some feature implementations were not sampled, so only documented or indexed relationships are drawn.

Main entry points: [`src/mixins/state.ts`](https://github.com/fluidd-core/fluidd/blob/develop/src/mixins/state.ts) (Shared printer state), [`src/App.vue`](https://github.com/fluidd-core/fluidd/blob/develop/src/App.vue) (Fluidd app), [`src/api/socketActions.ts`](https://github.com/fluidd-core/fluidd/blob/develop/src/api/socketActions.ts) (Moonraker actions), [`src/store/index.ts`](https://github.com/fluidd-core/fluidd/blob/develop/src/store/index.ts) (Application state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_app["Fluidd app<br/>[App.vue]"]
  node_router["Page router<br/>[index.ts]"]
  node_dashboard["Dashboard<br/>[Dashboard.vue]"]
  node_layout["Custom layouts"]
  node_themes["Color themes<br/>[colorSet.ts]"]
end

subgraph group_connect["Connection and state"]
  node_socket["WebSocket client<br/>[socketClient.ts]"]
  node_actions["Moonraker actions<br/>[socketActions.ts]"]
  node_store["Application state<br/>[index.ts]"]
  node_state["Shared printer state<br/>[state.ts]"]
  node_globals["Printer globals<br/>[globals.ts]"]
end

subgraph group_printer["Printer operation"]
  node_status["Printer status"]
  node_toolhead["Toolhead controls<br/>[ToolheadCard.vue]"]
  node_console["Command console<br/>[ConsoleCard.vue]"]
  node_mmu["MMU mapping"]
  node_afc["AFC print start"]
end

subgraph group_files["Files and preview"]
  node_filesmix["File operations<br/>[files.ts]"]
  node_filebrowser["File browser<br/>[FileSystem.vue]"]
  node_previewcard["G-code preview card"]
  node_preview["G-code preview<br/>[GcodePreview.vue]"]
end

subgraph group_features["Feature areas"]
  node_spool["Spool selection"]
  node_cameras["Camera views<br/>[CameraCard.vue]"]
  node_timelapse["Timelapse tools"]
  node_history["Print history"]
  node_monaco["Editor worker helpers"]
  node_browsermix["Browser helpers<br/>[browser.ts]"]
  node_eventhelpers["Event helpers<br/>[event-helpers.ts]"]
end

node_user(("Printer user"))
node_moonraker{{"Moonraker service"}}

node_user -->|"uses"| node_app
node_app -->|"hosts routes"| node_router
node_router -->|"routes to"| node_dashboard
node_dashboard -->|"renders"| node_status
node_dashboard -->|"renders"| node_toolhead
node_dashboard -->|"uses layout state"| node_layout
node_user -->|"customizes panels"| node_layout
node_app -->|"mixes in"| node_browsermix
node_app -->|"mixes in"| node_filesmix
node_app -->|"checks keyboard events"| node_eventhelpers
node_socket -->|"dispatches updates"| node_store
node_actions -.->|"emits requests"| node_socket
node_actions -->|"requests data"| node_moonraker
node_moonraker -.->|"returns responses"| node_socket
node_actions -->|"dispatches results"| node_store
node_state -->|"issues commands"| node_actions
node_state -->|"reads printer state"| node_store
node_status -.->|"reads shared state"| node_state
node_toolhead -.->|"uses shared state"| node_state
node_console -.->|"sends commands"| node_state
node_mmu -->|"uses shared state"| node_state
node_mmu -->|"issues requests"| node_actions
node_afc -->|"requests print start"| node_actions
node_filebrowser -.->|"uses file operations"| node_filesmix
node_app -->|"uploads dropped files"| node_filesmix
node_previewcard -->|"renders preview"| node_preview
node_previewcard -->|"uses shared state"| node_state
node_previewcard -->|"uses file helpers"| node_filesmix
node_spool -.->|"uses shared state"| node_state
node_cameras -.->|"uses webcam state"| node_store
node_timelapse -.->|"uses timelapse state"| node_store
node_history -.->|"uses history state"| node_store
node_monaco -.->|"worker support"| node_browsermix
node_app -->|"uses color theme"| node_themes
node_globals -->|"supplies API globals"| node_actions

click node_app "https://github.com/fluidd-core/fluidd/blob/develop/src/App.vue"
click node_router "https://github.com/fluidd-core/fluidd/blob/develop/src/router/index.ts"
click node_dashboard "https://github.com/fluidd-core/fluidd/blob/develop/src/views/Dashboard.vue"
click node_layout "https://github.com/fluidd-core/fluidd/tree/develop/src/store/layout"
click node_themes "https://github.com/fluidd-core/fluidd/blob/develop/src/plugins/colorSet.ts"
click node_socket "https://github.com/fluidd-core/fluidd/blob/develop/src/plugins/socketClient.ts"
click node_actions "https://github.com/fluidd-core/fluidd/blob/develop/src/api/socketActions.ts"
click node_store "https://github.com/fluidd-core/fluidd/blob/develop/src/store/index.ts"
click node_state "https://github.com/fluidd-core/fluidd/blob/develop/src/mixins/state.ts"
click node_globals "https://github.com/fluidd-core/fluidd/blob/develop/src/globals.ts"
click node_status "https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/status/PrinterStatusCard.vue"
click node_toolhead "https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/toolhead/ToolheadCard.vue"
click node_console "https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/console/ConsoleCard.vue"
click node_mmu "https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/mmu/MmuEditTtgMapDialog.vue"
click node_afc "https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/afc/dialogs/AfcPrintStartDialogTool.vue"
click node_filesmix "https://github.com/fluidd-core/fluidd/blob/develop/src/mixins/files.ts"
click node_filebrowser "https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/filesystem/FileSystem.vue"
click node_previewcard "https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/gcode-preview/GcodePreviewCard.vue"
click node_preview "https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/gcode-preview/GcodePreview.vue"
click node_spool "https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/spoolman/SpoolSelectionDialog.vue"
click node_cameras "https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/camera/CameraCard.vue"
click node_timelapse "https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/timelapse/TimelapseSettingsCard.vue"
click node_history "https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/history/PrintHistoryCard.vue"
click node_monaco "https://github.com/fluidd-core/fluidd/blob/develop/src/workers/monacoWorkerHelpers.ts"
click node_browsermix "https://github.com/fluidd-core/fluidd/blob/develop/src/mixins/browser.ts"
click node_eventhelpers "https://github.com/fluidd-core/fluidd/blob/develop/src/util/event-helpers.ts"

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_router,node_dashboard,node_layout,node_themes,node_user toneBlue
class node_socket,node_actions,node_store,node_state,node_globals toneAmber
class node_status,node_toolhead,node_console,node_mmu,node_afc toneMint
class node_filesmix,node_filebrowser,node_previewcard,node_preview toneRose
class node_spool,node_cameras,node_timelapse,node_history,node_monaco,node_browsermix,node_eventhelpers,node_moonraker toneIndigo
```

## Components

### App shell

- [Fluidd app](https://github.com/fluidd-core/fluidd/blob/develop/src/App.vue): `src/App.vue`
- [Page router](https://github.com/fluidd-core/fluidd/blob/develop/src/router/index.ts): `src/router/index.ts`
- [Dashboard](https://github.com/fluidd-core/fluidd/blob/develop/src/views/Dashboard.vue): `src/views/Dashboard.vue`
- [Custom layouts](https://github.com/fluidd-core/fluidd/tree/develop/src/store/layout): `src/store/layout`
- [Color themes](https://github.com/fluidd-core/fluidd/blob/develop/src/plugins/colorSet.ts): `src/plugins/colorSet.ts`

### Connection and state

- [WebSocket client](https://github.com/fluidd-core/fluidd/blob/develop/src/plugins/socketClient.ts): `src/plugins/socketClient.ts`
- [Moonraker actions](https://github.com/fluidd-core/fluidd/blob/develop/src/api/socketActions.ts): `src/api/socketActions.ts`
- [Application state](https://github.com/fluidd-core/fluidd/blob/develop/src/store/index.ts): `src/store/index.ts`
- [Shared printer state](https://github.com/fluidd-core/fluidd/blob/develop/src/mixins/state.ts): `src/mixins/state.ts`
- [Printer globals](https://github.com/fluidd-core/fluidd/blob/develop/src/globals.ts): `src/globals.ts`

### Printer operation

- [Printer status](https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/status/PrinterStatusCard.vue): `src/components/widgets/status/PrinterStatusCard.vue`
- [Toolhead controls](https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/toolhead/ToolheadCard.vue): `src/components/widgets/toolhead/ToolheadCard.vue`
- [Command console](https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/console/ConsoleCard.vue): `src/components/widgets/console/ConsoleCard.vue`
- [MMU mapping](https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/mmu/MmuEditTtgMapDialog.vue): `src/components/widgets/mmu/MmuEditTtgMapDialog.vue`
- [AFC print start](https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/afc/dialogs/AfcPrintStartDialogTool.vue): `src/components/widgets/afc/dialogs/AfcPrintStartDialogTool.vue`

### Files and preview

- [File operations](https://github.com/fluidd-core/fluidd/blob/develop/src/mixins/files.ts): `src/mixins/files.ts`
- [File browser](https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/filesystem/FileSystem.vue): `src/components/widgets/filesystem/FileSystem.vue`
- [G-code preview card](https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/gcode-preview/GcodePreviewCard.vue): `src/components/widgets/gcode-preview/GcodePreviewCard.vue`
- [G-code preview](https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/gcode-preview/GcodePreview.vue): `src/components/widgets/gcode-preview/GcodePreview.vue`

### Feature areas

- [Spool selection](https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/spoolman/SpoolSelectionDialog.vue): `src/components/widgets/spoolman/SpoolSelectionDialog.vue`
- [Camera views](https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/camera/CameraCard.vue): `src/components/widgets/camera/CameraCard.vue`
- [Timelapse tools](https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/timelapse/TimelapseSettingsCard.vue): `src/components/widgets/timelapse/TimelapseSettingsCard.vue`
- [Print history](https://github.com/fluidd-core/fluidd/blob/develop/src/components/widgets/history/PrintHistoryCard.vue): `src/components/widgets/history/PrintHistoryCard.vue`
- [Editor worker helpers](https://github.com/fluidd-core/fluidd/blob/develop/src/workers/monacoWorkerHelpers.ts): `src/workers/monacoWorkerHelpers.ts`
- [Browser helpers](https://github.com/fluidd-core/fluidd/blob/develop/src/mixins/browser.ts): `src/mixins/browser.ts`
- [Event helpers](https://github.com/fluidd-core/fluidd/blob/develop/src/util/event-helpers.ts): `src/util/event-helpers.ts`

### Other components

- **Printer user**
- **Moonraker service**

## Connections

- Printer user → Fluidd app: uses (evidence: `README.md`)
- Fluidd app → Page router: hosts routes (evidence: `src/main.ts`)
- Page router → Dashboard: routes to (evidence: `src/router/index.ts`)
- Dashboard → Printer status: renders (evidence: `src/views/Dashboard.vue`)
- Dashboard → Toolhead controls: renders (evidence: `src/views/Dashboard.vue`)
- Dashboard → Custom layouts: uses layout state (evidence: `src/views/Dashboard.vue`)
- Printer user → Custom layouts: customizes panels (evidence: `README.md`)
- Fluidd app → Browser helpers: mixes in (evidence: `src/App.vue`)
- Fluidd app → File operations: mixes in (evidence: `src/App.vue`)
- Fluidd app → Event helpers: checks keyboard events (evidence: `src/App.vue`)
- WebSocket client → Application state: dispatches updates (evidence: `src/plugins/socketClient.ts`)
- Moonraker actions → WebSocket client: emits requests (evidence: `src/api/socketActions.ts`)
- Moonraker actions → Moonraker service: requests data (evidence: `src/api/socketActions.ts`)
- Moonraker service → WebSocket client: returns responses
- Moonraker actions → Application state: dispatches results (evidence: `src/api/socketActions.ts`)
- Shared printer state → Moonraker actions: issues commands (evidence: `src/mixins/state.ts`)
- Shared printer state → Application state: reads printer state (evidence: `src/mixins/state.ts`)
- Printer status → Shared printer state: reads shared state
- Toolhead controls → Shared printer state: uses shared state
- Command console → Shared printer state: sends commands
- MMU mapping → Shared printer state: uses shared state (evidence: `src/components/widgets/mmu/MmuEditTtgMapDialog.vue`)
- MMU mapping → Moonraker actions: issues requests (evidence: `src/components/widgets/mmu/MmuEditTtgMapDialog.vue`)
- AFC print start → Moonraker actions: requests print start (evidence: `src/components/widgets/afc/dialogs/AfcPrintStartDialog.vue`)
- File browser → File operations: uses file operations
- Fluidd app → File operations: uploads dropped files (evidence: `src/App.vue`)
- G-code preview card → G-code preview: renders preview (evidence: `src/components/widgets/gcode-preview/GcodePreviewCard.vue`)
- G-code preview card → Shared printer state: uses shared state (evidence: `src/components/widgets/gcode-preview/GcodePreviewCard.vue`)
- G-code preview card → File operations: uses file helpers (evidence: `src/components/widgets/gcode-preview/GcodePreviewCard.vue`)
- Spool selection → Shared printer state: uses shared state
- Camera views → Application state: uses webcam state
- Timelapse tools → Application state: uses timelapse state
- Print history → Application state: uses history state
- Editor worker helpers → Browser helpers: worker support
- Fluidd app → Color themes: uses color theme (evidence: `README.md`)
- Printer globals → Moonraker actions: supplies API globals (evidence: `src/api/socketActions.ts`)
