# fablevi/hd_sentinel_ui_linux architecture

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

- Interactive diagram: https://gitdiagram.com/fablevi/hd_sentinel_ui_linux
- Repository: https://github.com/fablevi/hd_sentinel_ui_linux

## Overview

HD Sentinel UI Linux is a native GTK4/libadwaita desktop monitor for disk health and RAM. Its principal workflow is to locate or accept the HDSentinel executable, start privileged sensor collection, parse live disk XML and RAM output, and render selectable disk, partition, and memory details. Settings and measurement history persist in the local cache. The graph follows the README and sampled source; subsystem paths identify existing tree locations where implementation excerpts were unavailable.

Main entry points: [`src/components/ScriptRunnerComponents/Runner.tsx`](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/ScriptRunnerComponents/Runner.tsx) (Monitor runner), [`src/components/DriveContent/DriveContentView.tsx`](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DriveContent/DriveContentView.tsx) (Drive detail view), [`src/components/DndConent/app.tsx`](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DndConent/app.tsx) (Setup window), [`exec/hdsentinel-wrapper.sh`](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/exec/hdsentinel-wrapper.sh) (Privileged helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup and Shell"]
  node_app["Setup window<br/>[app.tsx]"]
  node_entry["Application entry<br/>[index.tsx]"]
end

subgraph group_collection["Sensor Collection"]
  node_runner["Monitor runner<br/>[Runner.tsx]"]
  node_helper["Privileged helper"]
  node_xmlparse["XML parser<br/>[XMLtoJSON.ts]"]
  node_ramparse["RAM parser<br/>[parseDmidecode.ts]"]
  node_diskmodel["Disk data model"]
  node_rammodel["RAM data model<br/>[ram.model.ts]"]
end

subgraph group_presentation["Monitoring UI"]
  node_main["Monitoring shell<br/>[MainComponent.tsx]"]
  node_sidebar["Device navigation<br/>[ScrollSideBar.tsx]"]
  node_driveview["Drive detail view"]
  node_diskview["Disk overview<br/>[DiskView.tsx]"]
  node_smartview["SMART details<br/>[SMARTView.tsx]"]
  node_partitionview["Partition details<br/>[TabulatedView.tsx]"]
  node_ramview["RAM details<br/>[RamDriveView.tsx]"]
end

subgraph group_state["Configuration and History"]
  node_settings["Settings dialog<br/>[SettingsDialog.tsx]"]
  node_config[("Local config store<br/>[useLocalConfig.tsx]")]
  node_translations["UI translations<br/>[useTranslation.ts]"]
end

node_user(("Desktop user"))
node_binary["HDSentinel binary"]
node_pkexec["pkexec"]
node_dmidecode["dmidecode"]

node_user -->|"launches"| node_entry
node_entry -->|"renders"| node_app
node_user -->|"drops binary"| node_app
node_app -->|"installs"| node_binary
node_app -->|"opens monitor"| node_runner
node_runner -->|"starts helper"| node_pkexec
node_pkexec -->|"runs privileged"| node_helper
node_helper -->|"samples disks"| node_binary
node_helper -.->|"reads RAM"| node_dmidecode
node_helper -->|"streams output"| node_runner
node_runner -->|"parses XML"| node_xmlparse
node_runner -->|"parses RAM output"| node_ramparse
node_runner -->|"passes live data"| node_main
node_xmlparse -->|"produces disk data"| node_diskmodel
node_ramparse -->|"produces RAM data"| node_rammodel
node_main -->|"renders navigation"| node_sidebar
node_main -->|"renders selection"| node_driveview
node_sidebar -->|"selects device"| node_main
node_driveview -->|"shows disk summary"| node_diskview
node_driveview -->|"shows SMART data"| node_smartview
node_driveview -->|"shows partitions"| node_partitionview
node_driveview -->|"shows RAM details"| node_ramview
node_settings -->|"reads and saves"| node_config
node_entry -->|"loads settings"| node_config
node_translations -->|"reads language"| node_config
node_app -->|"localizes UI"| node_translations
node_runner -->|"localizes UI"| node_translations
node_user -->|"changes preferences"| node_settings

click node_app "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DndConent/app.tsx"
click node_runner "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/ScriptRunnerComponents/Runner.tsx"
click node_helper "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/exec/hdsentinel-wrapper.sh"
click node_xmlparse "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/helper/XMLtoJSON.ts"
click node_ramparse "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/helper/parseDmidecode.ts"
click node_diskmodel "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/models/hdsentinel.model.ts"
click node_rammodel "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/models/ram.model.ts"
click node_main "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/MainComponent.tsx"
click node_sidebar "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/SideBar/ScrollSideBar.tsx"
click node_driveview "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DriveContent/DriveContentView.tsx"
click node_diskview "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DriveContent/Disc/Disks/DiskView.tsx"
click node_smartview "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DriveContent/Disc/NotRemovable/SMARTView.tsx"
click node_partitionview "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DriveContent/Disc/NotRemovable/TabulatedView.tsx"
click node_ramview "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DriveContent/Disc/Ram/RamDriveView.tsx"
click node_settings "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/Dialogs/SettingsDialog.tsx"
click node_config "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/hooks/useLocalConfig.tsx"
click node_translations "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/Languages/useTranslation.ts"
click node_entry "https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/index.tsx"

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_entry,node_user toneBlue
class node_runner,node_helper,node_xmlparse,node_ramparse,node_diskmodel,node_rammodel toneAmber
class node_main,node_sidebar,node_driveview,node_diskview,node_smartview,node_partitionview,node_ramview toneMint
class node_settings,node_config,node_translations toneRose
class node_binary,node_pkexec,node_dmidecode toneIndigo
```

## Components

### Setup and Shell

- [Setup window](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DndConent/app.tsx): `src/components/DndConent/app.tsx`
- [Application entry](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/index.tsx): `src/index.tsx`

### Sensor Collection

- [Monitor runner](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/ScriptRunnerComponents/Runner.tsx): `src/components/ScriptRunnerComponents/Runner.tsx`
- [Privileged helper](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/exec/hdsentinel-wrapper.sh): `exec/hdsentinel-wrapper.sh`
- [XML parser](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/helper/XMLtoJSON.ts): `src/helper/XMLtoJSON.ts`
- [RAM parser](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/helper/parseDmidecode.ts): `src/helper/parseDmidecode.ts`
- [Disk data model](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/models/hdsentinel.model.ts): `src/models/hdsentinel.model.ts`
- [RAM data model](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/models/ram.model.ts): `src/models/ram.model.ts`

### Monitoring UI

- [Monitoring shell](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/MainComponent.tsx): `src/components/MainComponent.tsx`
- [Device navigation](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/SideBar/ScrollSideBar.tsx): `src/components/SideBar/ScrollSideBar.tsx`
- [Drive detail view](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DriveContent/DriveContentView.tsx): `src/components/DriveContent/DriveContentView.tsx`
- [Disk overview](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DriveContent/Disc/Disks/DiskView.tsx): `src/components/DriveContent/Disc/Disks/DiskView.tsx`
- [SMART details](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DriveContent/Disc/NotRemovable/SMARTView.tsx): `src/components/DriveContent/Disc/NotRemovable/SMARTView.tsx`
- [Partition details](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DriveContent/Disc/NotRemovable/TabulatedView.tsx): `src/components/DriveContent/Disc/NotRemovable/TabulatedView.tsx`
- [RAM details](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/DriveContent/Disc/Ram/RamDriveView.tsx): `src/components/DriveContent/Disc/Ram/RamDriveView.tsx`

### Configuration and History

- [Settings dialog](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/Dialogs/SettingsDialog.tsx): `src/components/Dialogs/SettingsDialog.tsx`
- [Local config store](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/hooks/useLocalConfig.tsx): `src/hooks/useLocalConfig.tsx`
- [UI translations](https://github.com/fablevi/hd_sentinel_ui_linux/blob/main/src/components/Languages/useTranslation.ts): `src/components/Languages/useTranslation.ts`

### Other components

- **Desktop user**
- **HDSentinel binary**
- **pkexec**
- **dmidecode**

## Connections

- Desktop user → Application entry: launches
- Application entry → Setup window: renders
- Desktop user → Setup window: drops binary
- Setup window → HDSentinel binary: installs
- Setup window → Monitor runner: opens monitor
- Monitor runner → pkexec: starts helper
- pkexec → Privileged helper: runs privileged
- Privileged helper → HDSentinel binary: samples disks
- Privileged helper → dmidecode: reads RAM
- Privileged helper → Monitor runner: streams output
- Monitor runner → XML parser: parses XML
- Monitor runner → RAM parser: parses RAM output
- Monitor runner → Monitoring shell: passes live data
- XML parser → Disk data model: produces disk data
- RAM parser → RAM data model: produces RAM data
- Monitoring shell → Device navigation: renders navigation
- Monitoring shell → Drive detail view: renders selection
- Device navigation → Monitoring shell: selects device
- Drive detail view → Disk overview: shows disk summary
- Drive detail view → SMART details: shows SMART data
- Drive detail view → Partition details: shows partitions
- Drive detail view → RAM details: shows RAM details
- Settings dialog → Local config store: reads and saves
- Application entry → Local config store: loads settings
- UI translations → Local config store: reads language
- Setup window → UI translations: localizes UI
- Monitor runner → UI translations: localizes UI
- Desktop user → Settings dialog: changes preferences
