# tonyxtyan/helab architecture

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

- Interactive diagram: https://gitdiagram.com/tonyxtyan/helab
- Repository: https://github.com/tonyxtyan/helab

## Overview

HeLab is a PyQt desktop lab-data browser and analysis board. A user opens a folder in the main window; folder tabs browse the filesystem, asynchronously compute status, and load selected data into RAM. The window also exposes selectable analysis scripts and plotting tools. The graph captures the documented multi-analysis direction and sampled runtime wiring; script implementations and several worker details are unsampled, so uncertain internal links are omitted.

Main entry points: [`helab/views/FolderExplorer.py`](https://github.com/tonyxtyan/helab/blob/main/helab/views/FolderExplorer.py) (Folder explorer), [`helab/views/HelabMainWindow.py`](https://github.com/tonyxtyan/helab/blob/main/helab/views/HelabMainWindow.py) (Main window), [`helab/models/HelabFileSystemModel.py`](https://github.com/tonyxtyan/helab/blob/main/helab/models/HelabFileSystemModel.py) (Filesystem model), [`helab/workers/StatusWorker.py`](https://github.com/tonyxtyan/helab/blob/main/helab/workers/StatusWorker.py) (Status worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_entry["Application entry<br/>[main.py]"]
  node_window["Main window<br/>[HelabMainWindow.py]"]
  node_tabs["Folder tabs<br/>[FolderTabWidget.py]"]
  node_icons["Icon resources<br/>[icons.py]"]
  node_settings["Settings dialog<br/>[SettingsDialog.py]"]
  node_memory["Memory window"]
end

subgraph group_browse["Folder and status"]
  node_explorer["Folder explorer<br/>[FolderExplorer.py]"]
  node_fsmodel["Filesystem model"]
  node_statusview["Status tree<br/>[StatusTreeView.py]"]
  node_delegate["Status icons"]
  node_report["Status report<br/>[StatusReport.py]"]
end

subgraph group_runtime["Workers and state"]
  node_dirworker["Directory check"]
  node_statusworker["Status worker<br/>[StatusWorker.py]"]
  node_deepworker["Deep status scan"]
  node_rescanworker["Status rescan"]
  node_loadworker["RAM data loader"]
  node_threading["Thread coordination<br/>[threading_setup.py]"]
  node_caches[("Persistent caches<br/>[caching_setup.py]")]
  node_oscache[("Filesystem cache<br/>[os_cached.py]")]
end

subgraph group_analysis["Analysis scripts"]
  node_selector["Script selector"]
  node_manager["Script manager<br/>[scripts_manager.py]"]
  node_base["Script interface<br/>[base.py]"]
  node_plot["3D scatter plot"]
  node_dash["Dash server helper<br/>[dash_server.py]"]
end

node_user(("Lab user"))

node_user -->|"starts app"| node_entry
node_entry -->|"launches"| node_window
node_window -->|"creates tabs"| node_tabs
node_window -->|"uses selector"| node_selector
node_window -->|"opens settings"| node_settings
node_window -->|"opens window"| node_memory
node_tabs -->|"creates explorer"| node_explorer
node_explorer -->|"uses model"| node_fsmodel
node_explorer -->|"uses view"| node_statusview
node_statusview -->|"uses delegate"| node_delegate
node_fsmodel -->|"reads status"| node_report
node_fsmodel -->|"starts worker"| node_statusworker
node_explorer -->|"requests checks"| node_dirworker
node_explorer -->|"requests scans"| node_deepworker
node_explorer -->|"requests rescans"| node_rescanworker
node_explorer -->|"loads selection"| node_loadworker
node_statusworker -->|"updates report"| node_report
node_loadworker -->|"reads report"| node_report
node_threading -->|"coordinates"| node_dirworker
node_threading -->|"coordinates"| node_loadworker
node_threading -->|"coordinates"| node_statusworker
node_statusworker -->|"uses caches"| node_caches
node_dirworker -->|"checks cached paths"| node_oscache
node_explorer -->|"manages cache"| node_caches
node_selector -->|"uses manager"| node_manager
node_manager -->|"uses interface"| node_base
node_selector -->|"selects analysis"| node_plot
node_plot -->|"uses server"| node_dash
node_entry -->|"initializes icons"| node_icons
node_fsmodel -->|"uses status icons"| node_icons

click node_entry "https://github.com/tonyxtyan/helab/blob/main/helab/main.py"
click node_window "https://github.com/tonyxtyan/helab/blob/main/helab/views/HelabMainWindow.py"
click node_tabs "https://github.com/tonyxtyan/helab/blob/main/helab/views/FolderTabWidget.py"
click node_explorer "https://github.com/tonyxtyan/helab/blob/main/helab/views/FolderExplorer.py"
click node_fsmodel "https://github.com/tonyxtyan/helab/blob/main/helab/models/HelabFileSystemModel.py"
click node_statusview "https://github.com/tonyxtyan/helab/blob/main/helab/views/StatusTreeView.py"
click node_delegate "https://github.com/tonyxtyan/helab/blob/main/helab/views/StatusIconDelegate.py"
click node_report "https://github.com/tonyxtyan/helab/blob/main/helab/models/StatusReport.py"
click node_dirworker "https://github.com/tonyxtyan/helab/blob/main/helab/workers/DirectoryCheckWorker.py"
click node_statusworker "https://github.com/tonyxtyan/helab/blob/main/helab/workers/StatusWorker.py"
click node_deepworker "https://github.com/tonyxtyan/helab/blob/main/helab/workers/StatusDeepWorker.py"
click node_rescanworker "https://github.com/tonyxtyan/helab/blob/main/helab/workers/StatusRescanWorker.py"
click node_loadworker "https://github.com/tonyxtyan/helab/blob/main/helab/workers/LoadFolderToRamWorker.py"
click node_threading "https://github.com/tonyxtyan/helab/blob/main/helab/utils/threading_setup.py"
click node_caches "https://github.com/tonyxtyan/helab/blob/main/helab/utils/caching_setup.py"
click node_oscache "https://github.com/tonyxtyan/helab/blob/main/helab/utils/os_cached.py"
click node_selector "https://github.com/tonyxtyan/helab/blob/main/helab/models/ScriptTreeSelector.py"
click node_manager "https://github.com/tonyxtyan/helab/blob/main/helab/scripts/scripts_manager.py"
click node_base "https://github.com/tonyxtyan/helab/blob/main/helab/scripts/base.py"
click node_plot "https://github.com/tonyxtyan/helab/blob/main/helab/scripts/plotly_3d_sactter.py"
click node_dash "https://github.com/tonyxtyan/helab/blob/main/helab/utils/dash_server.py"
click node_icons "https://github.com/tonyxtyan/helab/blob/main/helab/resources/icons.py"
click node_settings "https://github.com/tonyxtyan/helab/blob/main/helab/views/SettingsDialog.py"
click node_memory "https://github.com/tonyxtyan/helab/blob/main/helab/views/MemoryUsageWindow.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_entry,node_window,node_tabs,node_icons,node_settings,node_memory,node_user toneBlue
class node_explorer,node_fsmodel,node_statusview,node_delegate,node_report toneAmber
class node_dirworker,node_statusworker,node_deepworker,node_rescanworker,node_loadworker,node_threading,node_caches,node_oscache toneMint
class node_selector,node_manager,node_base,node_plot,node_dash toneRose
```

## Components

### Desktop interface

- [Application entry](https://github.com/tonyxtyan/helab/blob/main/helab/main.py): `helab/main.py`
- [Main window](https://github.com/tonyxtyan/helab/blob/main/helab/views/HelabMainWindow.py): `helab/views/HelabMainWindow.py`
- [Folder tabs](https://github.com/tonyxtyan/helab/blob/main/helab/views/FolderTabWidget.py): `helab/views/FolderTabWidget.py`
- [Icon resources](https://github.com/tonyxtyan/helab/blob/main/helab/resources/icons.py): `helab/resources/icons.py`
- [Settings dialog](https://github.com/tonyxtyan/helab/blob/main/helab/views/SettingsDialog.py): `helab/views/SettingsDialog.py`
- [Memory window](https://github.com/tonyxtyan/helab/blob/main/helab/views/MemoryUsageWindow.py): `helab/views/MemoryUsageWindow.py`

### Folder and status

- [Folder explorer](https://github.com/tonyxtyan/helab/blob/main/helab/views/FolderExplorer.py): `helab/views/FolderExplorer.py`
- [Filesystem model](https://github.com/tonyxtyan/helab/blob/main/helab/models/HelabFileSystemModel.py): `helab/models/HelabFileSystemModel.py`
- [Status tree](https://github.com/tonyxtyan/helab/blob/main/helab/views/StatusTreeView.py): `helab/views/StatusTreeView.py`
- [Status icons](https://github.com/tonyxtyan/helab/blob/main/helab/views/StatusIconDelegate.py): `helab/views/StatusIconDelegate.py`
- [Status report](https://github.com/tonyxtyan/helab/blob/main/helab/models/StatusReport.py): `helab/models/StatusReport.py`

### Workers and state

- [Directory check](https://github.com/tonyxtyan/helab/blob/main/helab/workers/DirectoryCheckWorker.py): `helab/workers/DirectoryCheckWorker.py`
- [Status worker](https://github.com/tonyxtyan/helab/blob/main/helab/workers/StatusWorker.py): `helab/workers/StatusWorker.py`
- [Deep status scan](https://github.com/tonyxtyan/helab/blob/main/helab/workers/StatusDeepWorker.py): `helab/workers/StatusDeepWorker.py`
- [Status rescan](https://github.com/tonyxtyan/helab/blob/main/helab/workers/StatusRescanWorker.py): `helab/workers/StatusRescanWorker.py`
- [RAM data loader](https://github.com/tonyxtyan/helab/blob/main/helab/workers/LoadFolderToRamWorker.py): `helab/workers/LoadFolderToRamWorker.py`
- [Thread coordination](https://github.com/tonyxtyan/helab/blob/main/helab/utils/threading_setup.py): `helab/utils/threading_setup.py`
- [Persistent caches](https://github.com/tonyxtyan/helab/blob/main/helab/utils/caching_setup.py): `helab/utils/caching_setup.py`
- [Filesystem cache](https://github.com/tonyxtyan/helab/blob/main/helab/utils/os_cached.py): `helab/utils/os_cached.py`

### Analysis scripts

- [Script selector](https://github.com/tonyxtyan/helab/blob/main/helab/models/ScriptTreeSelector.py): `helab/models/ScriptTreeSelector.py`
- [Script manager](https://github.com/tonyxtyan/helab/blob/main/helab/scripts/scripts_manager.py): `helab/scripts/scripts_manager.py`
- [Script interface](https://github.com/tonyxtyan/helab/blob/main/helab/scripts/base.py): `helab/scripts/base.py`
- [3D scatter plot](https://github.com/tonyxtyan/helab/blob/main/helab/scripts/plotly_3d_sactter.py): `helab/scripts/plotly_3d_sactter.py`
- [Dash server helper](https://github.com/tonyxtyan/helab/blob/main/helab/utils/dash_server.py): `helab/utils/dash_server.py`

### Other components

- **Lab user**

## Connections

- Lab user → Application entry: starts app (evidence: `README.md`)
- Application entry → Main window: launches (evidence: `helab/main.py`)
- Main window → Folder tabs: creates tabs (evidence: `helab/views/HelabMainWindow.py`)
- Main window → Script selector: uses selector (evidence: `helab/views/HelabMainWindow.py`)
- Main window → Settings dialog: opens settings (evidence: `helab/views/HelabMainWindow.py`)
- Main window → Memory window: opens window (evidence: `helab/views/HelabMainWindow.py`)
- Folder tabs → Folder explorer: creates explorer (evidence: `helab/views/FolderTabWidget.py`)
- Folder explorer → Filesystem model: uses model (evidence: `helab/views/FolderExplorer.py`)
- Folder explorer → Status tree: uses view (evidence: `helab/views/FolderExplorer.py`)
- Status tree → Status icons: uses delegate (evidence: `helab/views/StatusTreeView.py`)
- Filesystem model → Status report: reads status (evidence: `helab/models/HelabFileSystemModel.py`)
- Filesystem model → Status worker: starts worker (evidence: `helab/models/HelabFileSystemModel.py`)
- Folder explorer → Directory check: requests checks (evidence: `helab/views/FolderExplorer.py`)
- Folder explorer → Deep status scan: requests scans (evidence: `helab/views/FolderExplorer.py`)
- Folder explorer → Status rescan: requests rescans (evidence: `helab/views/FolderExplorer.py`)
- Folder explorer → RAM data loader: loads selection (evidence: `helab/views/FolderExplorer.py`)
- Status worker → Status report: updates report (evidence: `helab/workers/StatusWorker.py`)
- RAM data loader → Status report: reads report (evidence: `helab/workers/LoadFolderToRamWorker.py`)
- Thread coordination → Directory check: coordinates (evidence: `helab/utils/threading_setup.py`)
- Thread coordination → RAM data loader: coordinates (evidence: `helab/utils/threading_setup.py`)
- Thread coordination → Status worker: coordinates (evidence: `helab/utils/threading_setup.py`)
- Status worker → Persistent caches: uses caches (evidence: `helab/workers/StatusWorker.py`)
- Directory check → Filesystem cache: checks cached paths (evidence: `helab/workers/DirectoryCheckWorker.py`)
- Folder explorer → Persistent caches: manages cache (evidence: `helab/views/FolderExplorer.py`)
- Script selector → Script manager: uses manager (evidence: `helab/models/ScriptTreeSelector.py`)
- Script manager → Script interface: uses interface (evidence: `helab/scripts/scripts_manager.py`)
- Script selector → 3D scatter plot: selects analysis (evidence: `helab/models/ScriptTreeSelector.py`)
- 3D scatter plot → Dash server helper: uses server (evidence: `helab/scripts/plotly_3d_sactter.py`)
- Application entry → Icon resources: initializes icons (evidence: `helab/main.py`)
- Filesystem model → Icon resources: uses status icons (evidence: `helab/models/HelabFileSystemModel.py`)
