# ambaru/rizpaq architecture

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

- Interactive diagram: https://gitdiagram.com/ambaru/rizpaq
- Repository: https://github.com/ambaru/rizpaq

## Overview

Rizpaq is a Windows desktop archiver with archive and backup profiles. In the archive workflow, a user browses or creates an archive, inspects versions, then extracts, compares, converts, or repairs it; in the backup profile, works and jobs are scheduled and checked. The map includes the documented archive, backup, integrity, and multi-format capabilities. Source excerpts are partial, so some subsystem links rely on README statements; uncertain internal dispatches are omitted.

Main entry points: [`core/zpaq_cli.py`](https://github.com/ambaru/rizpaq/blob/main/core/zpaq_cli.py) (ZPAQ command runner), [`runner/src/engine.rs`](https://github.com/ambaru/rizpaq/blob/main/runner/src/engine.rs) (Rust task runner), [`ui/backup_page.py`](https://github.com/ambaru/rizpaq/blob/main/ui/backup_page.py) (Backup profile), [`core/archive_index.py`](https://github.com/ambaru/rizpaq/blob/main/core/archive_index.py) (Archive index)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_app["Application startup<br/>[main.py]"]
  node_window["Main window<br/>[main_window.py]"]
  node_archive_ui["Archive actions<br/>[archive_actions.py]"]
  node_backup_ui["Backup profile<br/>[backup_page.py]"]
end

subgraph group_archive["Archive workflows"]
  node_archive_view["Browse and search<br/>[archive_loader.py]"]
  node_archive_index[("Archive index<br/>[archive_index.py]")]
  node_create["Archive creation"]
  node_extract["Extraction<br/>[extract_workers.py]"]
  node_conversion["Format conversion<br/>[universal_ops.py]"]
end

subgraph group_backup["Backup and scheduling"]
  node_task_data["Work and job data<br/>[tasks.py]"]
  node_scheduler["Scheduling<br/>[scheduler.py]"]
  node_headless["Headless job execution<br/>[headless.py]"]
end

subgraph group_engines["Engines and integrity"]
  node_integrity_ui["PAR2 workflows<br/>[par2_actions.py]"]
  node_par2["PAR2 operations<br/>[par2_ops.py]"]
  node_multipart["Multipart recovery<br/>[multipart_par2.py]"]
  node_zpaq["ZPAQ command runner<br/>[zpaq_cli.py]"]
  node_engine_paths["Engine path handling<br/>[engine_path.py]"]
  node_runner["Rust task runner<br/>[engine.rs]"]
end

subgraph group_platform["Shared services"]
  node_config[("Settings<br/>[config.py]")]
  node_config_bridge["UI settings bridge<br/>[config_bridge.py]"]
  node_parser["Listing parser<br/>[parser.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_process_health["Process health<br/>[proc_health.py]"]
  node_streaming["Output streaming<br/>[streaming.py]"]
  node_universal_worker["Universal archive worker"]
end

node_user(("Desktop user"))
node_external_engines{{"Archive and recovery engines"}}
node_task_scheduler{{"Windows Task Scheduler"}}

node_user -->|"launches"| node_app
node_app -->|"opens"| node_window
node_user -->|"works with archives"| node_archive_ui
node_archive_ui -.->|"browses"| node_archive_view
node_archive_view -->|"uses cached listing"| node_archive_index
node_user -->|"creates archives"| node_create
node_user -->|"extracts files"| node_extract
node_user -->|"converts formats"| node_conversion
node_user -->|"manages backups"| node_backup_ui
node_backup_ui -.->|"edits works and jobs"| node_task_data
node_backup_ui -.->|"schedules jobs"| node_scheduler
node_scheduler -.->|"registers tasks"| node_task_scheduler
node_task_scheduler -.->|"runs silently"| node_headless
node_user -->|"checks recovery sets"| node_integrity_ui
node_integrity_ui -.->|"requests verification"| node_par2
node_par2 -.->|"handles volumes"| node_multipart
node_par2 -->|"invokes engine"| node_zpaq
node_zpaq -->|"prepares paths"| node_engine_paths
node_zpaq -->|"monitors process"| node_process_health
node_zpaq -.->|"runs commands"| node_external_engines
node_runner -->|"prepares paths"| node_engine_paths
node_runner -->|"monitors liveness"| node_process_health
node_runner -.->|"runs engine"| node_external_engines
node_config_bridge -->|"reads settings"| node_config
node_archive_index -->|"uses models"| node_models
node_archive_index -->|"uses settings"| node_config
node_parser -->|"produces entries"| node_models
node_universal_worker -->|"uses streaming"| node_streaming
node_universal_worker -->|"delegates operations"| node_conversion

click node_app "https://github.com/ambaru/rizpaq/blob/main/main.py"
click node_window "https://github.com/ambaru/rizpaq/blob/main/ui/main_window.py"
click node_archive_ui "https://github.com/ambaru/rizpaq/blob/main/ui/archive_actions.py"
click node_backup_ui "https://github.com/ambaru/rizpaq/blob/main/ui/backup_page.py"
click node_archive_view "https://github.com/ambaru/rizpaq/blob/main/ui/archive_loader.py"
click node_archive_index "https://github.com/ambaru/rizpaq/blob/main/core/archive_index.py"
click node_create "https://github.com/ambaru/rizpaq/blob/main/ui/archive_create_dialog.py"
click node_extract "https://github.com/ambaru/rizpaq/blob/main/workers/extract_workers.py"
click node_conversion "https://github.com/ambaru/rizpaq/blob/main/core/universal_ops.py"
click node_task_data "https://github.com/ambaru/rizpaq/blob/main/core/tasks.py"
click node_scheduler "https://github.com/ambaru/rizpaq/blob/main/core/scheduler.py"
click node_headless "https://github.com/ambaru/rizpaq/blob/main/core/headless.py"
click node_integrity_ui "https://github.com/ambaru/rizpaq/blob/main/ui/par2_actions.py"
click node_par2 "https://github.com/ambaru/rizpaq/blob/main/core/par2_ops.py"
click node_multipart "https://github.com/ambaru/rizpaq/blob/main/core/multipart_par2.py"
click node_zpaq "https://github.com/ambaru/rizpaq/blob/main/core/zpaq_cli.py"
click node_engine_paths "https://github.com/ambaru/rizpaq/blob/main/core/engine_path.py"
click node_runner "https://github.com/ambaru/rizpaq/blob/main/runner/src/engine.rs"
click node_config "https://github.com/ambaru/rizpaq/blob/main/core/config.py"
click node_config_bridge "https://github.com/ambaru/rizpaq/blob/main/ui/config_bridge.py"
click node_parser "https://github.com/ambaru/rizpaq/blob/main/core/parser.py"
click node_models "https://github.com/ambaru/rizpaq/blob/main/core/models.py"
click node_process_health "https://github.com/ambaru/rizpaq/blob/main/core/proc_health.py"
click node_streaming "https://github.com/ambaru/rizpaq/blob/main/workers/streaming.py"
click node_universal_worker "https://github.com/ambaru/rizpaq/blob/main/workers/universal_worker.py"

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_window,node_archive_ui,node_backup_ui,node_user toneBlue
class node_archive_view,node_archive_index,node_create,node_extract,node_conversion toneAmber
class node_task_data,node_scheduler,node_headless toneMint
class node_integrity_ui,node_par2,node_multipart,node_zpaq,node_engine_paths,node_runner,node_task_scheduler toneRose
class node_config,node_config_bridge,node_parser,node_models,node_process_health,node_streaming,node_universal_worker,node_external_engines toneIndigo
```

## Components

### Desktop experience

- [Application startup](https://github.com/ambaru/rizpaq/blob/main/main.py): `main.py`
- [Main window](https://github.com/ambaru/rizpaq/blob/main/ui/main_window.py): `ui/main_window.py`
- [Archive actions](https://github.com/ambaru/rizpaq/blob/main/ui/archive_actions.py): `ui/archive_actions.py`
- [Backup profile](https://github.com/ambaru/rizpaq/blob/main/ui/backup_page.py): `ui/backup_page.py`

### Archive workflows

- [Browse and search](https://github.com/ambaru/rizpaq/blob/main/ui/archive_loader.py): `ui/archive_loader.py`
- [Archive index](https://github.com/ambaru/rizpaq/blob/main/core/archive_index.py): `core/archive_index.py`
- [Archive creation](https://github.com/ambaru/rizpaq/blob/main/ui/archive_create_dialog.py): `ui/archive_create_dialog.py`
- [Extraction](https://github.com/ambaru/rizpaq/blob/main/workers/extract_workers.py): `workers/extract_workers.py`
- [Format conversion](https://github.com/ambaru/rizpaq/blob/main/core/universal_ops.py): `core/universal_ops.py`

### Backup and scheduling

- [Work and job data](https://github.com/ambaru/rizpaq/blob/main/core/tasks.py): `core/tasks.py`
- [Scheduling](https://github.com/ambaru/rizpaq/blob/main/core/scheduler.py): `core/scheduler.py`
- [Headless job execution](https://github.com/ambaru/rizpaq/blob/main/core/headless.py): `core/headless.py`

### Engines and integrity

- [PAR2 workflows](https://github.com/ambaru/rizpaq/blob/main/ui/par2_actions.py): `ui/par2_actions.py`
- [PAR2 operations](https://github.com/ambaru/rizpaq/blob/main/core/par2_ops.py): `core/par2_ops.py`
- [Multipart recovery](https://github.com/ambaru/rizpaq/blob/main/core/multipart_par2.py): `core/multipart_par2.py`
- [ZPAQ command runner](https://github.com/ambaru/rizpaq/blob/main/core/zpaq_cli.py): `core/zpaq_cli.py`
- [Engine path handling](https://github.com/ambaru/rizpaq/blob/main/core/engine_path.py): `core/engine_path.py`
- [Rust task runner](https://github.com/ambaru/rizpaq/blob/main/runner/src/engine.rs): `runner/src/engine.rs`

### Shared services

- [Settings](https://github.com/ambaru/rizpaq/blob/main/core/config.py): `core/config.py`
- [UI settings bridge](https://github.com/ambaru/rizpaq/blob/main/ui/config_bridge.py): `ui/config_bridge.py`
- [Listing parser](https://github.com/ambaru/rizpaq/blob/main/core/parser.py): `core/parser.py`
- [Domain models](https://github.com/ambaru/rizpaq/blob/main/core/models.py): `core/models.py`
- [Process health](https://github.com/ambaru/rizpaq/blob/main/core/proc_health.py): `core/proc_health.py`
- [Output streaming](https://github.com/ambaru/rizpaq/blob/main/workers/streaming.py): `workers/streaming.py`
- [Universal archive worker](https://github.com/ambaru/rizpaq/blob/main/workers/universal_worker.py): `workers/universal_worker.py`

### Other components

- **Desktop user**
- **Archive and recovery engines**
- **Windows Task Scheduler**

## Connections

- Desktop user → Application startup: launches (evidence: `main.py`)
- Application startup → Main window: opens (evidence: `main.py`)
- Desktop user → Archive actions: works with archives
- Archive actions → Browse and search: browses
- Browse and search → Archive index: uses cached listing
- Desktop user → Archive creation: creates archives
- Desktop user → Extraction: extracts files
- Desktop user → Format conversion: converts formats
- Desktop user → Backup profile: manages backups
- Backup profile → Work and job data: edits works and jobs
- Backup profile → Scheduling: schedules jobs
- Scheduling → Windows Task Scheduler: registers tasks
- Windows Task Scheduler → Headless job execution: runs silently
- Desktop user → PAR2 workflows: checks recovery sets
- PAR2 workflows → PAR2 operations: requests verification
- PAR2 operations → Multipart recovery: handles volumes
- PAR2 operations → ZPAQ command runner: invokes engine (evidence: `core/par2_ops.py`)
- ZPAQ command runner → Engine path handling: prepares paths (evidence: `core/zpaq_cli.py`)
- ZPAQ command runner → Process health: monitors process (evidence: `core/zpaq_cli.py`)
- ZPAQ command runner → Archive and recovery engines: runs commands
- Rust task runner → Engine path handling: prepares paths (evidence: `runner/src/engine.rs`)
- Rust task runner → Process health: monitors liveness (evidence: `runner/src/engine.rs`)
- Rust task runner → Archive and recovery engines: runs engine
- UI settings bridge → Settings: reads settings (evidence: `ui/config_bridge.py`)
- Archive index → Domain models: uses models (evidence: `core/archive_index.py`)
- Archive index → Settings: uses settings (evidence: `core/archive_index.py`)
- Listing parser → Domain models: produces entries (evidence: `core/parser.py`)
- Universal archive worker → Output streaming: uses streaming (evidence: `workers/universal_worker.py`)
- Universal archive worker → Format conversion: delegates operations (evidence: `workers/universal_worker.py`)
