# dr-at0mic/og-converter architecture

> Architecture diagram of the GitHub repository dr-at0mic/og-converter, 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/dr-at0mic/og-converter
- Repository: https://github.com/dr-at0mic/og-converter

## Overview

OG Converter is a Windows desktop utility that turns a drag-and-drop gesture into a radial menu for conversion, file tools, or quick actions. The main flow is file selection through the global hook and wheel, option selection, then MainWindow job handling and ConversionEngine processing into local output. The README also documents compression, archive/protection, OCR, web/document rendering, themes, settings, and tray/install capabilities. Some subsystem links are documented rather than verified in sampled implementation; those are marked dashed.

Main entry points: [`Services/ConversionEngine.cs`](https://github.com/dr-at0mic/og-converter/blob/main/Services/ConversionEngine.cs) (Conversion engine), [`MainWindow.xaml.cs`](https://github.com/dr-at0mic/og-converter/blob/main/MainWindow.xaml.cs) (Main window), [`Controls/RadialWheelCanvas.cs`](https://github.com/dr-at0mic/og-converter/blob/main/Controls/RadialWheelCanvas.cs) (Radial wheel), [`Services/GlobalHookService.cs`](https://github.com/dr-at0mic/og-converter/blob/main/Services/GlobalHookService.cs) (Gesture hook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Desktop interaction"]
  node_selection["File selection"]
  node_hook["Gesture hook"]
  node_wheel["Radial wheel"]
  node_wheelrender["Wheel rendering<br/>[WheelPainter.cs]"]
  node_mainwindow["Main window<br/>[MainWindow.xaml.cs]"]
end

subgraph group_processing["File processing"]
  node_conversion["Conversion engine"]
  node_formats["Format registry<br/>[FormatRegistry.cs]"]
  node_compression["Compression"]
  node_media["Media editing"]
  node_documents["Document conversion<br/>[DocumentEngine.cs]"]
end

subgraph group_specialized["Specialized tools"]
  node_browser["Browser rendering"]
  node_archive["Archive creation<br/>[ArchiveWriter.cs]"]
  node_archiveops["Archive operations<br/>[ArchiveService.cs]"]
  node_protection["File protection"]
  node_ocr["OCR<br/>[OcrService.cs]"]
end

subgraph group_platform["App and customization"]
  node_templates["Wheel templates<br/>[TemplateManager.cs]"]
  node_models["Job and settings models<br/>[Models.cs]"]
  node_settings[("Settings<br/>[SettingsService.cs]")]
  node_tray["System tray<br/>[TrayIconService.cs]"]
  node_install["Installation<br/>[InstallService.cs]"]
end

node_user(("Windows user"))
node_edge["Microsoft Edge"]
node_localfiles[("Local files")]

node_user -.->|"selects files"| node_selection
node_user -->|"presses key"| node_hook
node_selection -.->|"provides selection"| node_hook
node_hook -.->|"opens wheel"| node_wheel
node_wheel -->|"renders"| node_wheelrender
node_wheel -->|"uses template"| node_templates
node_wheel -.->|"requests action"| node_mainwindow
node_mainwindow -->|"runs job"| node_conversion
node_mainwindow -.->|"configures job"| node_models
node_mainwindow -->|"loads settings"| node_settings
node_conversion -->|"checks formats"| node_formats
node_conversion -->|"delegates compression"| node_compression
node_conversion -->|"delegates edits"| node_media
node_conversion -->|"delegates documents"| node_documents
node_documents -->|"renders pages"| node_browser
node_conversion -->|"writes archives"| node_archive
node_conversion -->|"extracts archives"| node_archiveops
node_conversion -->|"protects files"| node_protection
node_conversion -->|"extracts text"| node_ocr
node_browser -.->|"runs browser"| node_edge
node_conversion -.->|"writes results"| node_localfiles
node_mainwindow -.->|"initializes tray"| node_tray
node_mainwindow -.->|"offers install"| node_install

click node_selection "https://github.com/dr-at0mic/og-converter/blob/main/Services/ShellSelectionService.cs"
click node_hook "https://github.com/dr-at0mic/og-converter/blob/main/Services/GlobalHookService.cs"
click node_wheel "https://github.com/dr-at0mic/og-converter/blob/main/Controls/RadialWheelCanvas.cs"
click node_wheelrender "https://github.com/dr-at0mic/og-converter/blob/main/Wheel/WheelPainter.cs"
click node_templates "https://github.com/dr-at0mic/og-converter/blob/main/Services/TemplateManager.cs"
click node_mainwindow "https://github.com/dr-at0mic/og-converter/blob/main/MainWindow.xaml.cs"
click node_models "https://github.com/dr-at0mic/og-converter/blob/main/Models/Models.cs"
click node_conversion "https://github.com/dr-at0mic/og-converter/blob/main/Services/ConversionEngine.cs"
click node_formats "https://github.com/dr-at0mic/og-converter/blob/main/Services/FormatRegistry.cs"
click node_compression "https://github.com/dr-at0mic/og-converter/blob/main/Services/CompressionService.cs"
click node_media "https://github.com/dr-at0mic/og-converter/blob/main/Services/MediaEditService.cs"
click node_documents "https://github.com/dr-at0mic/og-converter/blob/main/Services/DocumentEngine.cs"
click node_browser "https://github.com/dr-at0mic/og-converter/blob/main/Services/BrowserRenderService.cs"
click node_archive "https://github.com/dr-at0mic/og-converter/blob/main/Services/ArchiveWriter.cs"
click node_archiveops "https://github.com/dr-at0mic/og-converter/blob/main/Services/ArchiveService.cs"
click node_protection "https://github.com/dr-at0mic/og-converter/blob/main/Services/ProtectionService.cs"
click node_ocr "https://github.com/dr-at0mic/og-converter/blob/main/Services/OcrService.cs"
click node_settings "https://github.com/dr-at0mic/og-converter/blob/main/Services/SettingsService.cs"
click node_tray "https://github.com/dr-at0mic/og-converter/blob/main/Services/TrayIconService.cs"
click node_install "https://github.com/dr-at0mic/og-converter/blob/main/Services/InstallService.cs"

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_selection,node_hook,node_wheel,node_wheelrender,node_mainwindow,node_user toneBlue
class node_conversion,node_formats,node_compression,node_media,node_documents,node_localfiles toneAmber
class node_browser,node_archive,node_archiveops,node_protection,node_ocr toneMint
class node_templates,node_models,node_settings,node_tray,node_install toneRose
class node_edge toneIndigo
```

## Components

### Desktop interaction

- [File selection](https://github.com/dr-at0mic/og-converter/blob/main/Services/ShellSelectionService.cs): `Services/ShellSelectionService.cs`
- [Gesture hook](https://github.com/dr-at0mic/og-converter/blob/main/Services/GlobalHookService.cs): `Services/GlobalHookService.cs`
- [Radial wheel](https://github.com/dr-at0mic/og-converter/blob/main/Controls/RadialWheelCanvas.cs): `Controls/RadialWheelCanvas.cs`
- [Wheel rendering](https://github.com/dr-at0mic/og-converter/blob/main/Wheel/WheelPainter.cs): `Wheel/WheelPainter.cs`
- [Main window](https://github.com/dr-at0mic/og-converter/blob/main/MainWindow.xaml.cs): `MainWindow.xaml.cs`

### File processing

- [Conversion engine](https://github.com/dr-at0mic/og-converter/blob/main/Services/ConversionEngine.cs): `Services/ConversionEngine.cs`
- [Format registry](https://github.com/dr-at0mic/og-converter/blob/main/Services/FormatRegistry.cs): `Services/FormatRegistry.cs`
- [Compression](https://github.com/dr-at0mic/og-converter/blob/main/Services/CompressionService.cs): `Services/CompressionService.cs`
- [Media editing](https://github.com/dr-at0mic/og-converter/blob/main/Services/MediaEditService.cs): `Services/MediaEditService.cs`
- [Document conversion](https://github.com/dr-at0mic/og-converter/blob/main/Services/DocumentEngine.cs): `Services/DocumentEngine.cs`

### Specialized tools

- [Browser rendering](https://github.com/dr-at0mic/og-converter/blob/main/Services/BrowserRenderService.cs): `Services/BrowserRenderService.cs`
- [Archive creation](https://github.com/dr-at0mic/og-converter/blob/main/Services/ArchiveWriter.cs): `Services/ArchiveWriter.cs`
- [Archive operations](https://github.com/dr-at0mic/og-converter/blob/main/Services/ArchiveService.cs): `Services/ArchiveService.cs`
- [File protection](https://github.com/dr-at0mic/og-converter/blob/main/Services/ProtectionService.cs): `Services/ProtectionService.cs`
- [OCR](https://github.com/dr-at0mic/og-converter/blob/main/Services/OcrService.cs): `Services/OcrService.cs`

### App and customization

- [Wheel templates](https://github.com/dr-at0mic/og-converter/blob/main/Services/TemplateManager.cs): `Services/TemplateManager.cs`
- [Job and settings models](https://github.com/dr-at0mic/og-converter/blob/main/Models/Models.cs): `Models/Models.cs`
- [Settings](https://github.com/dr-at0mic/og-converter/blob/main/Services/SettingsService.cs): `Services/SettingsService.cs`
- [System tray](https://github.com/dr-at0mic/og-converter/blob/main/Services/TrayIconService.cs): `Services/TrayIconService.cs`
- [Installation](https://github.com/dr-at0mic/og-converter/blob/main/Services/InstallService.cs): `Services/InstallService.cs`

### Other components

- **Windows user**
- **Microsoft Edge**
- **Local files**

## Connections

- Windows user → File selection: selects files
- Windows user → Gesture hook: presses key
- File selection → Gesture hook: provides selection
- Gesture hook → Radial wheel: opens wheel
- Radial wheel → Wheel rendering: renders (evidence: `Controls/RadialWheelCanvas.cs`)
- Radial wheel → Wheel templates: uses template (evidence: `Controls/RadialWheelCanvas.cs`)
- Radial wheel → Main window: requests action (evidence: `MainWindow.xaml.cs`)
- Main window → Conversion engine: runs job (evidence: `MainWindow.xaml.cs`)
- Main window → Job and settings models: configures job (evidence: `MainWindow.xaml.cs`)
- Main window → Settings: loads settings (evidence: `MainWindow.xaml.cs`)
- Conversion engine → Format registry: checks formats (evidence: `Services/ConversionEngine.cs`)
- Conversion engine → Compression: delegates compression (evidence: `Services/ConversionEngine.cs`)
- Conversion engine → Media editing: delegates edits (evidence: `Services/ConversionEngine.cs`)
- Conversion engine → Document conversion: delegates documents (evidence: `Services/ConversionEngine.cs`)
- Document conversion → Browser rendering: renders pages (evidence: `Services/DocumentEngine.cs`)
- Conversion engine → Archive creation: writes archives (evidence: `Services/ConversionEngine.cs`)
- Conversion engine → Archive operations: extracts archives (evidence: `Services/ConversionEngine.cs`)
- Conversion engine → File protection: protects files (evidence: `Services/ConversionEngine.cs`)
- Conversion engine → OCR: extracts text (evidence: `Services/ConversionEngine.cs`)
- Browser rendering → Microsoft Edge: runs browser
- Conversion engine → Local files: writes results
- Main window → System tray: initializes tray (evidence: `MainWindow.xaml.cs`)
- Main window → Installation: offers install
