# m-uvex/loaf-fm architecture

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

- Interactive diagram: https://gitdiagram.com/m-uvex/loaf-fm
- Repository: https://github.com/m-uvex/loaf-fm

## Overview

Loaf is a Linux file manager with a Qt Quick/QML interface and a Rust engine. The user-facing workflow starts in the main window, where users navigate directories and manage files; the engine also provides archive, undo/redo, trash, drive, and settings capabilities. The README documents these product areas, while the sampled Rust excerpt is partial and the QML sources were not sampled, so several UI-to-engine connections remain unverified.

Main entry points: [`qml/main.qml`](https://github.com/m-uvex/loaf-fm/blob/main/qml/main.qml) (Main window), [`src/main.rs`](https://github.com/m-uvex/loaf-fm/blob/main/src/main.rs) (Application entry), [`qml/SettingsView.qml`](https://github.com/m-uvex/loaf-fm/blob/main/qml/SettingsView.qml) (Settings view), [`qml/PCView.qml`](https://github.com/m-uvex/loaf-fm/blob/main/qml/PCView.qml) (Storage dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_entry["Application entry<br/>[main.rs]"]
  node_window["Main window<br/>[main.qml]"]
  node_pc["Storage dashboard<br/>[PCView.qml]"]
  node_settings["Settings view<br/>[SettingsView.qml]"]
end

subgraph group_files["File operations"]
  node_navigation["Directory navigation<br/>[bridge.rs]"]
  node_fileops["File operations<br/>[bridge.rs]"]
  node_history["Undo and redo<br/>[bridge.rs]"]
  node_archives["Archive handling<br/>[bridge.rs]"]
  node_trash["Trash integration<br/>[bridge.rs]"]
  node_search["File search<br/>[bridge.rs]"]
end

subgraph group_system["System features"]
  node_drives["Drive management<br/>[bridge.rs]"]
  node_preferences[("Settings storage<br/>[bridge.rs]")]
end

subgraph group_presentation["Presentation"]
  node_theme["Dynamic theming<br/>[Theme.qml]"]
  node_icons["Icon resolver<br/>[LoafIcon.qml]"]
  node_widgets["Reusable UI components"]
end

node_user(("File manager user"))

node_user -->|"uses"| node_window
node_entry -->|"loads"| node_window
node_entry -->|"declares module"| node_navigation
node_window -.->|"requests navigation"| node_navigation
node_window -.->|"requests operations"| node_fileops
node_window -.->|"supports undo"| node_history
node_window -.->|"requests archives"| node_archives
node_window -.->|"manages trash"| node_trash
node_window -.->|"supports search"| node_search
node_window -.->|"shows dashboard"| node_pc
node_pc -.->|"shows drives"| node_drives
node_settings -.->|"reads settings"| node_preferences
node_settings -.->|"configures theme"| node_theme
node_window -.->|"uses components"| node_widgets
node_window -.->|"resolves icons"| node_icons

click node_entry "https://github.com/m-uvex/loaf-fm/blob/main/src/main.rs"
click node_window "https://github.com/m-uvex/loaf-fm/blob/main/qml/main.qml"
click node_pc "https://github.com/m-uvex/loaf-fm/blob/main/qml/PCView.qml"
click node_settings "https://github.com/m-uvex/loaf-fm/blob/main/qml/SettingsView.qml"
click node_navigation "https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs"
click node_fileops "https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs"
click node_history "https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs"
click node_archives "https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs"
click node_trash "https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs"
click node_search "https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs"
click node_drives "https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs"
click node_preferences "https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs"
click node_theme "https://github.com/m-uvex/loaf-fm/blob/main/qml/Theme.qml"
click node_icons "https://github.com/m-uvex/loaf-fm/blob/main/qml/LoafIcon.qml"
click node_widgets "https://github.com/m-uvex/loaf-fm/tree/main/qml/components"

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_entry,node_window,node_pc,node_settings,node_user toneBlue
class node_navigation,node_fileops,node_history,node_archives,node_trash,node_search toneAmber
class node_drives,node_preferences toneMint
class node_theme,node_icons,node_widgets toneRose
```

## Components

### User interface

- [Application entry](https://github.com/m-uvex/loaf-fm/blob/main/src/main.rs): `src/main.rs`
- [Main window](https://github.com/m-uvex/loaf-fm/blob/main/qml/main.qml): `qml/main.qml`
- [Storage dashboard](https://github.com/m-uvex/loaf-fm/blob/main/qml/PCView.qml): `qml/PCView.qml`
- [Settings view](https://github.com/m-uvex/loaf-fm/blob/main/qml/SettingsView.qml): `qml/SettingsView.qml`

### File operations

- [Directory navigation](https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs): `src/bridge.rs`
- [File operations](https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs): `src/bridge.rs`
- [Undo and redo](https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs): `src/bridge.rs`
- [Archive handling](https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs): `src/bridge.rs`
- [Trash integration](https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs): `src/bridge.rs`
- [File search](https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs): `src/bridge.rs`

### System features

- [Drive management](https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs): `src/bridge.rs`
- [Settings storage](https://github.com/m-uvex/loaf-fm/blob/main/src/bridge.rs): `src/bridge.rs`

### Presentation

- [Dynamic theming](https://github.com/m-uvex/loaf-fm/blob/main/qml/Theme.qml): `qml/Theme.qml`
- [Icon resolver](https://github.com/m-uvex/loaf-fm/blob/main/qml/LoafIcon.qml): `qml/LoafIcon.qml`
- [Reusable UI components](https://github.com/m-uvex/loaf-fm/tree/main/qml/components): `qml/components`

### Other components

- **File manager user**

## Connections

- File manager user → Main window: uses (evidence: `README.md`)
- Application entry → Main window: loads (evidence: `src/main.rs`)
- Application entry → Directory navigation: declares module (evidence: `src/main.rs`)
- Main window → Directory navigation: requests navigation
- Main window → File operations: requests operations
- Main window → Undo and redo: supports undo
- Main window → Archive handling: requests archives
- Main window → Trash integration: manages trash
- Main window → File search: supports search
- Main window → Storage dashboard: shows dashboard
- Storage dashboard → Drive management: shows drives
- Settings view → Settings storage: reads settings
- Settings view → Dynamic theming: configures theme
- Main window → Reusable UI components: uses components
- Main window → Icon resolver: resolves icons
