# loayamer910/storagearch architecture

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

- Interactive diagram: https://gitdiagram.com/loayamer910/storagearch
- Repository: https://github.com/loayamer910/storagearch

## Overview

StorageArch is a Windows desktop archiver whose main workflow is to select files, detect their contents, choose and run suitable compression candidates, restore and verify each candidate, then retain only a qualifying result in a ZIP archive and catalog. The GUI also supports category management, verification, checkout and check-in of edited workspace files, and settings. An optional offline-by-default cloud client handles registration, feedback, telemetry, crash reports, remote configuration and updates. Relationships reflect README statements and the supplied source index/excerpts; unsampled subsystem links are omitted where their callers are not evidenced.

Main entry points: [`core/api.py`](https://github.com/loayamer910/storagearch/blob/main/core/api.py) (Core API), [`gui/main_window.py`](https://github.com/loayamer910/storagearch/blob/main/gui/main_window.py) (Main window), [`gui/items_tab.py`](https://github.com/loayamer910/storagearch/blob/main/gui/items_tab.py) (Items and tabs), [`gui/settings_tab.py`](https://github.com/loayamer910/storagearch/blob/main/gui/settings_tab.py) (Settings tab)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop UI"]
  node_window["Main window<br/>[main_window.py]"]
  node_tabs["Items and tabs<br/>[items_tab.py]"]
  node_category_tab["Category tab<br/>[categories_tab.py]"]
  node_dashboard["Dashboard tab<br/>[dashboard_tab.py]"]
  node_settings_tab["Settings tab<br/>[settings_tab.py]"]
  node_dialogs["Dialogs<br/>[dialogs.py]"]
  node_gui_workers["GUI workers<br/>[workers.py]"]
end

subgraph group_archive["Archive workflow"]
  node_api["Core API<br/>[api.py]"]
  node_store["ZIP archive store<br/>[store.py]"]
  node_catalog[("Archive catalog<br/>[catalog.py]")]
end

subgraph group_engine["Compression engine"]
  node_pipeline["Decision pipeline<br/>[pipeline.py]"]
  node_content["Content detection<br/>[content.py]"]
  node_router["Strategy routing<br/>[router.py]"]
  node_executor["Candidate executor<br/>[executor.py]"]
  node_workers["Process workers<br/>[workers.py]"]
  node_strategies["Compression strategies<br/>[base.py]"]
  node_candidate["Candidate verify/restore<br/>[candidate.py]"]
end

subgraph group_cloud["Optional cloud"]
  node_events["Cloud event handoff<br/>[events.py]"]
  node_installation["Installation service"]
  node_feedback["Feedback service"]
  node_telemetry["Telemetry service"]
  node_crash["Crash service<br/>[crash_service.py]"]
  node_queues[("Persistent queues<br/>[base_queue.py]")]
  node_sender["Background sender"]
  node_cloud_client["HTTPS client<br/>[cloud_client.py]"]
  node_remote_update["Config and updates"]
end

node_user(("User"))
node_cloud_user(("Cloud user action"))
node_cloud_service(("Cloud backend"))

node_user -->|"uses"| node_window
node_window -->|"shows"| node_tabs
node_window -->|"shows"| node_category_tab
node_window -->|"shows"| node_dashboard
node_window -->|"shows"| node_settings_tab
node_tabs -->|"calls"| node_api
node_category_tab -->|"calls"| node_api
node_settings_tab -->|"calls"| node_api
node_tabs -->|"opens"| node_dialogs
node_category_tab -->|"opens"| node_dialogs
node_settings_tab -->|"opens"| node_dialogs
node_tabs -->|"dispatches"| node_gui_workers
node_settings_tab -->|"dispatches"| node_gui_workers
node_api -->|"decides compression"| node_pipeline
node_pipeline -->|"scans bytes"| node_content
node_pipeline -->|"routes candidates"| node_router
node_pipeline -->|"runs candidates"| node_executor
node_executor -->|"runs candidate"| node_candidate
node_executor -->|"dispatches"| node_workers
node_candidate -->|"compresses and restores"| node_strategies
node_api -->|"writes archives"| node_store
node_api -->|"records archives"| node_catalog
node_api -->|"reports outcomes"| node_events
node_events -->|"dispatches events"| node_telemetry
node_events -->|"dispatches crashes"| node_crash
node_cloud_user -->|"registers"| node_installation
node_installation -->|"registers with"| node_cloud_client
node_cloud_user -->|"submits feedback"| node_feedback
node_feedback -->|"gets identity"| node_installation
node_feedback -->|"enqueues"| node_queues
node_crash -->|"enqueues"| node_queues
node_crash -->|"checks consent"| node_telemetry
node_telemetry -.->|"persists events"| node_queues
node_sender -.->|"drains"| node_queues
node_sender -.->|"sends queued data"| node_cloud_client
node_cloud_client -->|"sends HTTPS"| node_cloud_service
node_remote_update -->|"fetches metadata"| node_cloud_client

click node_window "https://github.com/loayamer910/storagearch/blob/main/gui/main_window.py"
click node_tabs "https://github.com/loayamer910/storagearch/blob/main/gui/items_tab.py"
click node_category_tab "https://github.com/loayamer910/storagearch/blob/main/gui/categories_tab.py"
click node_dashboard "https://github.com/loayamer910/storagearch/blob/main/gui/dashboard_tab.py"
click node_settings_tab "https://github.com/loayamer910/storagearch/blob/main/gui/settings_tab.py"
click node_dialogs "https://github.com/loayamer910/storagearch/blob/main/gui/dialogs.py"
click node_gui_workers "https://github.com/loayamer910/storagearch/blob/main/gui/workers.py"
click node_api "https://github.com/loayamer910/storagearch/blob/main/core/api.py"
click node_pipeline "https://github.com/loayamer910/storagearch/blob/main/core/pipeline.py"
click node_content "https://github.com/loayamer910/storagearch/blob/main/core/content.py"
click node_router "https://github.com/loayamer910/storagearch/blob/main/core/router.py"
click node_executor "https://github.com/loayamer910/storagearch/blob/main/core/executor.py"
click node_workers "https://github.com/loayamer910/storagearch/blob/main/core/workers.py"
click node_strategies "https://github.com/loayamer910/storagearch/blob/main/core/strategies/base.py"
click node_candidate "https://github.com/loayamer910/storagearch/blob/main/core/candidate.py"
click node_store "https://github.com/loayamer910/storagearch/blob/main/core/store.py"
click node_catalog "https://github.com/loayamer910/storagearch/blob/main/core/catalog.py"
click node_events "https://github.com/loayamer910/storagearch/blob/main/core/events.py"
click node_installation "https://github.com/loayamer910/storagearch/blob/main/local_cloud/installation_service.py"
click node_feedback "https://github.com/loayamer910/storagearch/blob/main/local_cloud/feedback_service.py"
click node_telemetry "https://github.com/loayamer910/storagearch/blob/main/local_cloud/telemetry_service.py"
click node_crash "https://github.com/loayamer910/storagearch/blob/main/local_cloud/crash_service.py"
click node_queues "https://github.com/loayamer910/storagearch/blob/main/local_cloud/queues/base_queue.py"
click node_sender "https://github.com/loayamer910/storagearch/blob/main/local_cloud/background_sender.py"
click node_cloud_client "https://github.com/loayamer910/storagearch/blob/main/local_cloud/cloud_client.py"
click node_remote_update "https://github.com/loayamer910/storagearch/blob/main/local_cloud/remote_config_service.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_window,node_tabs,node_category_tab,node_dashboard,node_settings_tab,node_dialogs,node_gui_workers,node_user,node_cloud_user toneBlue
class node_api,node_store,node_catalog toneAmber
class node_pipeline,node_content,node_router,node_executor,node_workers,node_strategies,node_candidate toneMint
class node_events,node_installation,node_feedback,node_telemetry,node_crash,node_queues,node_sender,node_cloud_client,node_remote_update toneRose
class node_cloud_service toneIndigo
```

## Components

### Desktop UI

- [Main window](https://github.com/loayamer910/storagearch/blob/main/gui/main_window.py): `gui/main_window.py`
- [Items and tabs](https://github.com/loayamer910/storagearch/blob/main/gui/items_tab.py): `gui/items_tab.py`
- [Category tab](https://github.com/loayamer910/storagearch/blob/main/gui/categories_tab.py): `gui/categories_tab.py`
- [Dashboard tab](https://github.com/loayamer910/storagearch/blob/main/gui/dashboard_tab.py): `gui/dashboard_tab.py`
- [Settings tab](https://github.com/loayamer910/storagearch/blob/main/gui/settings_tab.py): `gui/settings_tab.py`
- [Dialogs](https://github.com/loayamer910/storagearch/blob/main/gui/dialogs.py): `gui/dialogs.py`
- [GUI workers](https://github.com/loayamer910/storagearch/blob/main/gui/workers.py): `gui/workers.py`

### Archive workflow

- [Core API](https://github.com/loayamer910/storagearch/blob/main/core/api.py): `core/api.py`
- [ZIP archive store](https://github.com/loayamer910/storagearch/blob/main/core/store.py): `core/store.py`
- [Archive catalog](https://github.com/loayamer910/storagearch/blob/main/core/catalog.py): `core/catalog.py`

### Compression engine

- [Decision pipeline](https://github.com/loayamer910/storagearch/blob/main/core/pipeline.py): `core/pipeline.py`
- [Content detection](https://github.com/loayamer910/storagearch/blob/main/core/content.py): `core/content.py`
- [Strategy routing](https://github.com/loayamer910/storagearch/blob/main/core/router.py): `core/router.py`
- [Candidate executor](https://github.com/loayamer910/storagearch/blob/main/core/executor.py): `core/executor.py`
- [Process workers](https://github.com/loayamer910/storagearch/blob/main/core/workers.py): `core/workers.py`
- [Compression strategies](https://github.com/loayamer910/storagearch/blob/main/core/strategies/base.py): `core/strategies/base.py`
- [Candidate verify/restore](https://github.com/loayamer910/storagearch/blob/main/core/candidate.py): `core/candidate.py`

### Optional cloud

- [Cloud event handoff](https://github.com/loayamer910/storagearch/blob/main/core/events.py): `core/events.py`
- [Installation service](https://github.com/loayamer910/storagearch/blob/main/local_cloud/installation_service.py): `local_cloud/installation_service.py`
- [Feedback service](https://github.com/loayamer910/storagearch/blob/main/local_cloud/feedback_service.py): `local_cloud/feedback_service.py`
- [Telemetry service](https://github.com/loayamer910/storagearch/blob/main/local_cloud/telemetry_service.py): `local_cloud/telemetry_service.py`
- [Crash service](https://github.com/loayamer910/storagearch/blob/main/local_cloud/crash_service.py): `local_cloud/crash_service.py`
- [Persistent queues](https://github.com/loayamer910/storagearch/blob/main/local_cloud/queues/base_queue.py): `local_cloud/queues/base_queue.py`
- [Background sender](https://github.com/loayamer910/storagearch/blob/main/local_cloud/background_sender.py): `local_cloud/background_sender.py`
- [HTTPS client](https://github.com/loayamer910/storagearch/blob/main/local_cloud/cloud_client.py): `local_cloud/cloud_client.py`
- [Config and updates](https://github.com/loayamer910/storagearch/blob/main/local_cloud/remote_config_service.py): `local_cloud/remote_config_service.py`

### Other components

- **User**
- **Cloud user action**
- **Cloud backend**

## Connections

- User → Main window: uses (evidence: `README.md`)
- Main window → Items and tabs: shows (evidence: `gui/main_window.py`)
- Main window → Category tab: shows (evidence: `gui/main_window.py`)
- Main window → Dashboard tab: shows (evidence: `gui/main_window.py`)
- Main window → Settings tab: shows (evidence: `gui/main_window.py`)
- Items and tabs → Core API: calls (evidence: `gui/items_tab.py`)
- Category tab → Core API: calls (evidence: `gui/categories_tab.py`)
- Settings tab → Core API: calls (evidence: `gui/settings_tab.py`)
- Items and tabs → Dialogs: opens (evidence: `gui/items_tab.py`)
- Category tab → Dialogs: opens (evidence: `gui/categories_tab.py`)
- Settings tab → Dialogs: opens (evidence: `gui/settings_tab.py`)
- Items and tabs → GUI workers: dispatches (evidence: `gui/items_tab.py`)
- Settings tab → GUI workers: dispatches (evidence: `gui/settings_tab.py`)
- Core API → Decision pipeline: decides compression (evidence: `core/api.py`)
- Decision pipeline → Content detection: scans bytes (evidence: `core/pipeline.py`)
- Decision pipeline → Strategy routing: routes candidates (evidence: `core/pipeline.py`)
- Decision pipeline → Candidate executor: runs candidates (evidence: `core/pipeline.py`)
- Candidate executor → Candidate verify/restore: runs candidate (evidence: `core/executor.py`)
- Candidate executor → Process workers: dispatches (evidence: `core/executor.py`)
- Candidate verify/restore → Compression strategies: compresses and restores (evidence: `core/candidate.py`)
- Core API → ZIP archive store: writes archives (evidence: `core/api.py`)
- Core API → Archive catalog: records archives (evidence: `core/api.py`)
- Core API → Cloud event handoff: reports outcomes (evidence: `core/api.py`)
- Cloud event handoff → Telemetry service: dispatches events (evidence: `core/events.py`)
- Cloud event handoff → Crash service: dispatches crashes (evidence: `core/events.py`)
- Cloud user action → Installation service: registers (evidence: `local_cloud/installation_service.py`)
- Installation service → HTTPS client: registers with (evidence: `local_cloud/installation_service.py`)
- Cloud user action → Feedback service: submits feedback (evidence: `local_cloud/feedback_service.py`)
- Feedback service → Installation service: gets identity (evidence: `local_cloud/feedback_service.py`)
- Feedback service → Persistent queues: enqueues (evidence: `local_cloud/feedback_service.py`)
- Crash service → Persistent queues: enqueues (evidence: `local_cloud/crash_service.py`)
- Crash service → Telemetry service: checks consent (evidence: `local_cloud/crash_service.py`)
- Telemetry service → Persistent queues: persists events
- Background sender → Persistent queues: drains
- Background sender → HTTPS client: sends queued data
- HTTPS client → Cloud backend: sends HTTPS (evidence: `local_cloud/cloud_client.py`)
- Config and updates → HTTPS client: fetches metadata (evidence: `local_cloud/remote_config_service.py`)
