# motalim-ai/adawat architecture

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

- Interactive diagram: https://gitdiagram.com/motalim-ai/adawat
- Repository: https://github.com/motalim-ai/adawat

## Overview

Adawat is a local, cross-platform file conversion and editing app. Its main workflow is to detect a file drag, open a modifier-key wheel, let the user choose a conversion, tool, or file action, then save or present the result. The graph combines the documented workflow with sampled macOS, Windows, and Linux entry points and shared operation capabilities. Some platform-specific and operation internals were not sampled, so their links are limited to documented behavior or omitted where ownership is unclear.

Main entry points: [`Sources/Adawat/Operations/OperationCatalog.swift`](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/OperationCatalog.swift) (Operation catalog), [`Sources/Adawat/Support/Output.swift`](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Support/Output.swift) (Output routing), [`Sources/Adawat/Wheel/WheelController.swift`](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Wheel/WheelController.swift) (Choice wheel), [`Sources/Adawat/Operations/MediaEngine.swift`](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/MediaEngine.swift) (Audio video)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Desktop interaction"]
  node_drag["Drag detection<br/>[DragMonitor.swift]"]
  node_windows_app["Windows app<br/>[Program.cs]"]
  node_linux_app["Linux app<br/>[Program.cs]"]
  node_wheel["Choice wheel"]
  node_file_managers["File-manager launch<br/>[FileManagers.cs]"]
end

subgraph group_dispatch["Choice and dispatch"]
  node_catalog["Operation catalog"]
  node_actions["File actions<br/>[FileActions.swift]"]
end

subgraph group_media["File operations"]
  node_image_ops["Image conversion<br/>[ImageEngine.swift]"]
  node_media_ops["Audio video<br/>[MediaEngine.swift]"]
  node_pdf_ops["PDF tools<br/>[PDFOps.swift]"]
  node_documents["Document tools<br/>[DocumentOps.swift]"]
  node_archives["Archive tools<br/>[ArchiveOps.swift]"]
  node_qr["QR codes<br/>[QRCode.swift]"]
end

subgraph group_output["Results and settings"]
  node_output["Output routing<br/>[Output.swift]"]
  node_settings[("User settings<br/>[AppSettings.swift]")]
  node_float["Floating files<br/>[FloatManager.swift]"]
end

node_user(("User"))
node_external_tools["Media tools"]

node_user -->|"drags files"| node_drag
node_drag -.->|"opens on key"| node_wheel
node_user -->|"chooses mode"| node_wheel
node_windows_app -->|"opens wheel"| node_wheel
node_linux_app -->|"presents files"| node_wheel
node_file_managers -->|"launches wheel"| node_linux_app
node_wheel -->|"loads choices"| node_catalog
node_wheel -->|"runs actions"| node_actions
node_catalog -.->|"offers conversion"| node_image_ops
node_catalog -.->|"offers conversion"| node_media_ops
node_catalog -.->|"offers tools"| node_pdf_ops
node_catalog -.->|"offers tools"| node_documents
node_catalog -.->|"offers tools"| node_archives
node_catalog -.->|"offers tools"| node_qr
node_user -.->|"selects image output"| node_image_ops
node_user -.->|"selects media output"| node_media_ops
node_image_ops -.->|"saves result"| node_output
node_media_ops -.->|"saves result"| node_output
node_pdf_ops -.->|"saves result"| node_output
node_documents -.->|"saves result"| node_output
node_archives -.->|"saves result"| node_output
node_qr -.->|"saves result"| node_output
node_settings -.->|"configures location"| node_output
node_media_ops -.->|"uses codecs"| node_external_tools
node_actions -.->|"opens Float"| node_float

click node_drag "https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Drag/DragMonitor.swift"
click node_windows_app "https://github.com/motalim-ai/adawat/blob/main/windows/src/Adawat.App/Program.cs"
click node_linux_app "https://github.com/motalim-ai/adawat/blob/main/linux/src/Adawat.Linux/Program.cs"
click node_wheel "https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Wheel/WheelController.swift"
click node_file_managers "https://github.com/motalim-ai/adawat/blob/main/linux/src/Adawat.Linux/Desktop/FileManagers.cs"
click node_catalog "https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/OperationCatalog.swift"
click node_actions "https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/FileActions.swift"
click node_image_ops "https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/ImageEngine.swift"
click node_media_ops "https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/MediaEngine.swift"
click node_pdf_ops "https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/PDFOps.swift"
click node_documents "https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/DocumentOps.swift"
click node_archives "https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/ArchiveOps.swift"
click node_qr "https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/QRCode.swift"
click node_output "https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Support/Output.swift"
click node_settings "https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/App/AppSettings.swift"
click node_float "https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Float/FloatManager.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_drag,node_windows_app,node_linux_app,node_wheel,node_file_managers,node_user toneBlue
class node_catalog,node_actions toneAmber
class node_image_ops,node_media_ops,node_pdf_ops,node_documents,node_archives,node_qr toneMint
class node_output,node_settings,node_float toneRose
class node_external_tools toneIndigo
```

## Components

### Desktop interaction

- [Drag detection](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Drag/DragMonitor.swift): `Sources/Adawat/Drag/DragMonitor.swift`
- [Windows app](https://github.com/motalim-ai/adawat/blob/main/windows/src/Adawat.App/Program.cs): `windows/src/Adawat.App/Program.cs`
- [Linux app](https://github.com/motalim-ai/adawat/blob/main/linux/src/Adawat.Linux/Program.cs): `linux/src/Adawat.Linux/Program.cs`
- [Choice wheel](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Wheel/WheelController.swift): `Sources/Adawat/Wheel/WheelController.swift`
- [File-manager launch](https://github.com/motalim-ai/adawat/blob/main/linux/src/Adawat.Linux/Desktop/FileManagers.cs): `linux/src/Adawat.Linux/Desktop/FileManagers.cs`

### Choice and dispatch

- [Operation catalog](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/OperationCatalog.swift): `Sources/Adawat/Operations/OperationCatalog.swift`
- [File actions](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/FileActions.swift): `Sources/Adawat/Operations/FileActions.swift`

### File operations

- [Image conversion](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/ImageEngine.swift): `Sources/Adawat/Operations/ImageEngine.swift`
- [Audio video](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/MediaEngine.swift): `Sources/Adawat/Operations/MediaEngine.swift`
- [PDF tools](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/PDFOps.swift): `Sources/Adawat/Operations/PDFOps.swift`
- [Document tools](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/DocumentOps.swift): `Sources/Adawat/Operations/DocumentOps.swift`
- [Archive tools](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/ArchiveOps.swift): `Sources/Adawat/Operations/ArchiveOps.swift`
- [QR codes](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Operations/QRCode.swift): `Sources/Adawat/Operations/QRCode.swift`

### Results and settings

- [Output routing](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Support/Output.swift): `Sources/Adawat/Support/Output.swift`
- [User settings](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/App/AppSettings.swift): `Sources/Adawat/App/AppSettings.swift`
- [Floating files](https://github.com/motalim-ai/adawat/blob/main/Sources/Adawat/Float/FloatManager.swift): `Sources/Adawat/Float/FloatManager.swift`

### Other components

- **User**
- **Media tools**

## Connections

- User → Drag detection: drags files (evidence: `README.md`)
- Drag detection → Choice wheel: opens on key
- User → Choice wheel: chooses mode (evidence: `README.md`)
- Windows app → Choice wheel: opens wheel (evidence: `windows/src/Adawat.App/Program.cs`)
- Linux app → Choice wheel: presents files (evidence: `linux/src/Adawat.Linux/Program.cs`)
- File-manager launch → Linux app: launches wheel (evidence: `linux/src/Adawat.Linux/Desktop/FileManagers.cs`)
- Choice wheel → Operation catalog: loads choices (evidence: `Sources/Adawat/Wheel/WheelController.swift`)
- Choice wheel → File actions: runs actions (evidence: `README.md`)
- Operation catalog → Image conversion: offers conversion
- Operation catalog → Audio video: offers conversion
- Operation catalog → PDF tools: offers tools
- Operation catalog → Document tools: offers tools
- Operation catalog → Archive tools: offers tools
- Operation catalog → QR codes: offers tools
- User → Image conversion: selects image output
- User → Audio video: selects media output
- Image conversion → Output routing: saves result (evidence: `Sources/Adawat/Operations/ImageEngine.swift`)
- Audio video → Output routing: saves result
- PDF tools → Output routing: saves result
- Document tools → Output routing: saves result
- Archive tools → Output routing: saves result
- QR codes → Output routing: saves result
- User settings → Output routing: configures location
- Audio video → Media tools: uses codecs
- File actions → Floating files: opens Float
