# aydintb/par2dialog architecture

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

- Interactive diagram: https://gitdiagram.com/aydintb/par2dialog
- Repository: https://github.com/aydintb/par2dialog

## Overview

Par2Dialog is an egui desktop GUI for creating, verifying, repairing, and batch-processing PAR2 sets. Users choose files and parameters in operation tabs; the app dispatches work to a create backend backed by par2cmdline or the rust-par2 verification/repair library, then presents progress and per-file results. Settings and theme handling form a separate UI branch. The graph follows the README and indexed imports; unsampled implementation details are represented only where documented, and no unverified wiring is asserted.

Main entry points: [`src/app.rs`](https://github.com/aydintb/par2dialog/blob/main/src/app.rs) (Application shell), [`src/tabs/verify_tab.rs`](https://github.com/aydintb/par2dialog/blob/main/src/tabs/verify_tab.rs) (Verify tab), [`src/tabs/repair_tab.rs`](https://github.com/aydintb/par2dialog/blob/main/src/tabs/repair_tab.rs) (Repair tab), [`src/tabs/create_tab.rs`](https://github.com/aydintb/par2dialog/blob/main/src/tabs/create_tab.rs) (Create tab)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_app["Application shell<br/>[app.rs]"]
  node_create_tab["Create tab<br/>[create_tab.rs]"]
  node_verify_tab["Verify tab<br/>[verify_tab.rs]"]
  node_repair_tab["Repair tab<br/>[repair_tab.rs]"]
  node_batch_tab["Batch tab<br/>[batch_tab.rs]"]
  node_settings_tab["Settings tab<br/>[settings_tab.rs]"]
end

subgraph group_operations["PAR2 workflows"]
  node_create_engine["PAR2 creation<br/>[create.rs]"]
  node_verify_engine["PAR2 verification<br/>[verify.rs]"]
  node_repair_engine["Feasibility and repair<br/>[repair.rs]"]
  node_operation_types["Operation data types<br/>[types.rs]"]
end

subgraph group_presentation["Shared UI components"]
  node_file_picker["File picker<br/>[file_picker.rs]"]
  node_progress["Progress display<br/>[progress.rs]"]
  node_status_list["File status list<br/>[status_list.rs]"]
  node_theme["Theme and text styling<br/>[theme.rs]"]
  node_paths["Path utilities<br/>[paths.rs]"]
end

subgraph group_integrations["PAR2 engines"]
  node_par2cmdline["par2cmdline"]
  node_rust_par2["rust-par2 library"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"dispatches UI"| node_create_tab
node_app -->|"dispatches UI"| node_verify_tab
node_app -->|"dispatches UI"| node_repair_tab
node_app -->|"dispatches UI"| node_batch_tab
node_app -->|"dispatches UI"| node_settings_tab
node_verify_tab -->|"requests tab switch"| node_repair_tab
node_create_tab -->|"starts creation"| node_create_engine
node_verify_tab -->|"starts verification"| node_verify_engine
node_repair_tab -->|"checks and repairs"| node_repair_engine
node_batch_tab -->|"runs verification"| node_verify_engine
node_batch_tab -->|"runs repair"| node_repair_engine
node_repair_engine -->|"verifies before repair"| node_verify_engine
node_create_engine -->|"spawns subprocess"| node_par2cmdline
node_verify_engine -->|"parses and verifies"| node_rust_par2
node_repair_engine -->|"parses and repairs"| node_rust_par2
node_create_tab -->|"uses picker"| node_file_picker
node_verify_tab -->|"uses picker"| node_file_picker
node_repair_tab -->|"uses picker"| node_file_picker
node_create_tab -->|"shows progress"| node_progress
node_verify_tab -->|"shows progress"| node_progress
node_repair_tab -->|"shows progress"| node_progress
node_verify_tab -->|"shows file results"| node_status_list
node_repair_tab -->|"shows file results"| node_status_list
node_status_list -->|"formats path text"| node_theme
node_app -->|"sets application theme"| node_theme
node_create_tab -->|"uses theme styling"| node_theme
node_settings_tab -->|"configures theme"| node_theme
node_create_engine -->|"uses configuration"| node_operation_types
node_verify_engine -->|"returns file results"| node_operation_types
node_repair_engine -->|"returns repair results"| node_operation_types
node_progress -->|"renders updates"| node_operation_types
node_status_list -->|"renders file entries"| node_operation_types

click node_app "https://github.com/aydintb/par2dialog/blob/main/src/app.rs"
click node_create_tab "https://github.com/aydintb/par2dialog/blob/main/src/tabs/create_tab.rs"
click node_verify_tab "https://github.com/aydintb/par2dialog/blob/main/src/tabs/verify_tab.rs"
click node_repair_tab "https://github.com/aydintb/par2dialog/blob/main/src/tabs/repair_tab.rs"
click node_batch_tab "https://github.com/aydintb/par2dialog/blob/main/src/tabs/batch_tab.rs"
click node_settings_tab "https://github.com/aydintb/par2dialog/blob/main/src/tabs/settings_tab.rs"
click node_create_engine "https://github.com/aydintb/par2dialog/blob/main/src/par2/create.rs"
click node_verify_engine "https://github.com/aydintb/par2dialog/blob/main/src/par2/verify.rs"
click node_repair_engine "https://github.com/aydintb/par2dialog/blob/main/src/par2/repair.rs"
click node_operation_types "https://github.com/aydintb/par2dialog/blob/main/src/par2/types.rs"
click node_file_picker "https://github.com/aydintb/par2dialog/blob/main/src/widgets/file_picker.rs"
click node_progress "https://github.com/aydintb/par2dialog/blob/main/src/widgets/progress.rs"
click node_status_list "https://github.com/aydintb/par2dialog/blob/main/src/widgets/status_list.rs"
click node_theme "https://github.com/aydintb/par2dialog/blob/main/src/theme.rs"
click node_paths "https://github.com/aydintb/par2dialog/blob/main/src/util/paths.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_app,node_create_tab,node_verify_tab,node_repair_tab,node_batch_tab,node_settings_tab,node_user toneBlue
class node_create_engine,node_verify_engine,node_repair_engine,node_operation_types toneAmber
class node_file_picker,node_progress,node_status_list,node_theme,node_paths toneMint
class node_par2cmdline,node_rust_par2 toneRose
```

## Components

### Desktop interface

- [Application shell](https://github.com/aydintb/par2dialog/blob/main/src/app.rs): `src/app.rs`
- [Create tab](https://github.com/aydintb/par2dialog/blob/main/src/tabs/create_tab.rs): `src/tabs/create_tab.rs`
- [Verify tab](https://github.com/aydintb/par2dialog/blob/main/src/tabs/verify_tab.rs): `src/tabs/verify_tab.rs`
- [Repair tab](https://github.com/aydintb/par2dialog/blob/main/src/tabs/repair_tab.rs): `src/tabs/repair_tab.rs`
- [Batch tab](https://github.com/aydintb/par2dialog/blob/main/src/tabs/batch_tab.rs): `src/tabs/batch_tab.rs`
- [Settings tab](https://github.com/aydintb/par2dialog/blob/main/src/tabs/settings_tab.rs): `src/tabs/settings_tab.rs`

### PAR2 workflows

- [PAR2 creation](https://github.com/aydintb/par2dialog/blob/main/src/par2/create.rs): `src/par2/create.rs`
- [PAR2 verification](https://github.com/aydintb/par2dialog/blob/main/src/par2/verify.rs): `src/par2/verify.rs`
- [Feasibility and repair](https://github.com/aydintb/par2dialog/blob/main/src/par2/repair.rs): `src/par2/repair.rs`
- [Operation data types](https://github.com/aydintb/par2dialog/blob/main/src/par2/types.rs): `src/par2/types.rs`

### Shared UI components

- [File picker](https://github.com/aydintb/par2dialog/blob/main/src/widgets/file_picker.rs): `src/widgets/file_picker.rs`
- [Progress display](https://github.com/aydintb/par2dialog/blob/main/src/widgets/progress.rs): `src/widgets/progress.rs`
- [File status list](https://github.com/aydintb/par2dialog/blob/main/src/widgets/status_list.rs): `src/widgets/status_list.rs`
- [Theme and text styling](https://github.com/aydintb/par2dialog/blob/main/src/theme.rs): `src/theme.rs`
- [Path utilities](https://github.com/aydintb/par2dialog/blob/main/src/util/paths.rs): `src/util/paths.rs`

### PAR2 engines

- **par2cmdline**
- **rust-par2 library**

### Other components

- **User**

## Connections

- User → Application shell: uses (evidence: `README.md`)
- Application shell → Create tab: dispatches UI (evidence: `src/app.rs`)
- Application shell → Verify tab: dispatches UI (evidence: `src/app.rs`)
- Application shell → Repair tab: dispatches UI (evidence: `src/app.rs`)
- Application shell → Batch tab: dispatches UI (evidence: `src/app.rs`)
- Application shell → Settings tab: dispatches UI (evidence: `src/app.rs`)
- Verify tab → Repair tab: requests tab switch (evidence: `src/app.rs`)
- Create tab → PAR2 creation: starts creation (evidence: `src/tabs/create_tab.rs`)
- Verify tab → PAR2 verification: starts verification (evidence: `src/tabs/verify_tab.rs`)
- Repair tab → Feasibility and repair: checks and repairs (evidence: `src/tabs/repair_tab.rs`)
- Batch tab → PAR2 verification: runs verification (evidence: `src/tabs/batch_tab.rs`)
- Batch tab → Feasibility and repair: runs repair (evidence: `src/tabs/batch_tab.rs`)
- Feasibility and repair → PAR2 verification: verifies before repair (evidence: `src/par2/repair.rs`)
- PAR2 creation → par2cmdline: spawns subprocess (evidence: `README.md`)
- PAR2 verification → rust-par2 library: parses and verifies (evidence: `README.md`)
- Feasibility and repair → rust-par2 library: parses and repairs (evidence: `README.md`)
- Create tab → File picker: uses picker (evidence: `src/tabs/create_tab.rs`)
- Verify tab → File picker: uses picker (evidence: `src/tabs/verify_tab.rs`)
- Repair tab → File picker: uses picker (evidence: `src/tabs/repair_tab.rs`)
- Create tab → Progress display: shows progress (evidence: `src/tabs/create_tab.rs`)
- Verify tab → Progress display: shows progress (evidence: `src/tabs/verify_tab.rs`)
- Repair tab → Progress display: shows progress (evidence: `src/tabs/repair_tab.rs`)
- Verify tab → File status list: shows file results (evidence: `src/tabs/verify_tab.rs`)
- Repair tab → File status list: shows file results (evidence: `src/tabs/repair_tab.rs`)
- File status list → Theme and text styling: formats path text (evidence: `src/widgets/status_list.rs`)
- Application shell → Theme and text styling: sets application theme (evidence: `src/app.rs`)
- Create tab → Theme and text styling: uses theme styling (evidence: `src/tabs/create_tab.rs`)
- Settings tab → Theme and text styling: configures theme (evidence: `src/tabs/settings_tab.rs`)
- PAR2 creation → Operation data types: uses configuration (evidence: `src/par2/create.rs`)
- PAR2 verification → Operation data types: returns file results (evidence: `src/par2/verify.rs`)
- Feasibility and repair → Operation data types: returns repair results (evidence: `src/par2/repair.rs`)
- Progress display → Operation data types: renders updates (evidence: `src/widgets/progress.rs`)
- File status list → Operation data types: renders file entries (evidence: `src/widgets/status_list.rs`)
