# noackjona-hash/jonanoackignite architecture

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

- Interactive diagram: https://gitdiagram.com/noackjona-hash/jonanoackignite
- Repository: https://github.com/noackjona-hash/jonanoackignite

## Overview

#### Purpose and entry points
IGNITE is a desktop medical thermal-image analysis client for ThermoAI Vision. Its primary executable entry point is `main.py`, which prioritizes immediate UI startup while deferring heavy imaging/ML imports. The desktop package is built for distribution with PyInstaller (`Ignite.spec`) and an installer definition (`ignite_installer.iss`). A separate static/Vite-style product landing site lives under `ignite-landing/src/main.js`.

#### Application bootstrap and responsive UI
The startup path coordinates a lightweight splash/loading experience, background initialization, and the main CustomTkinter event loop. The main dashboard and user-driven analysis controls are centered in:
- `main.py`
- `gui/main_window.py`
- `gui/theme.py`

This is a desktop GUI boundary: UI work must remain on the Tk/CustomTkinter thread, while expensive imports and image analysis should execute asynchronously to avoid blocking interaction.

#### Thermal image-processing pipeline
The computer-vision layer performs local processing of thermal imagery, including bilateral filtering, CLAHE enhancement, contour segmentation, ROI/foot isolation, and bilateral temperature comparison. Its core processing boundary is:
- `image_processing.py`
- `utils.py`
- `config.py`

The pipeline consumes selected thermal images from the UI, produces derived image/measurement results for presentation, and is intended to keep calculations in memory. OpenCV, NumPy, Pillow, and potentially PyTorch are material runtime dependencies.

#### Native/Rust computation core
The repository includes a Rust crate alongside the Python application, suggesting selected performance-sensitive or correctness-critical functionality is implemented or being migrated into a native core:
- `Cargo.toml`
- `src/lib.rs`
- `Cargo.lock`

Python/Rust behavioral alignment is explicitly represented by parity-oriented tests, making this an important interface boundary: Python-side processing and the Rust library should preserve equivalent results and data semantics.

#### Data persistence and audit boundary
Application-local state, persisted settings, and audit-related behavior are separated from visual and processing code:
- `storage.py`
- `audit_log.py`
- `settings.json`

This layer is the likely boundary for retaining user preferences, derived metadata, and compliance-relevant audit records. Raw medical imagery should not be treated as durable application data unless explicitly required, consistent with the stated privacy-first design.

#### Privacy and analysis-service integration
The intended deployment model supports local image processing and potentially encrypted communication with a local FastAPI-based ThermoAI analysis backend. The desktop client is therefore responsible for controlling the transition between local UI/image handling and any backend request path. Relevant client-side orchestration and settings surfaces are:
- `main.py`
- `config.py`
- `storage.py`

No backend service source is present in this tree; FastAPI/TLS infrastructure is an external integration rather than a repository-owned server runtime.

#### Packaging, release, and public distribution
Desktop packaging combines Python dependencies with application assets into installable artifacts, while CI builds and releases wheels:
- `Ignite.spec`
- `.github/workflows/build_wheels.yml`
- `.github/workflows/release.yml`

The separate web landing project distributes installation material and marketing assets, including a public Windows installer:
- `ignite-landing/src/main.js`
- `ignite-landing/public/IGNITE_Setup_v1.0.0.exe`

Main entry points: [`image_processing.py`](https://github.com/noackjona-hash/jonanoackignite/blob/main/image_processing.py) (Thermal processing), [`main.py`](https://github.com/noackjona-hash/jonanoackignite/blob/main/main.py) (Application bootstrap), [`gui/main_window.py`](https://github.com/noackjona-hash/jonanoackignite/blob/main/gui/main_window.py) (Dashboard and controls), [`storage.py`](https://github.com/noackjona-hash/jonanoackignite/blob/main/storage.py) (Local state storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop Client"]
  node_entry["Application bootstrap<br/>Python entry point<br/>[main.py]"]
  node_ui["Dashboard and controls<br/>CustomTkinter UI<br/>[main_window.py]"]
  node_theme["UI theme<br/>UI styling<br/>[theme.py]"]
  node_async["Background analysis<br/>async orchestration<br/>[main.py]"]
  node_pipeline["Thermal processing<br/>CV pipeline"]
  node_processing_utils["Image utilities<br/>processing support<br/>[utils.py]"]
  node_config["Client configuration<br/>configuration boundary<br/>[config.py]"]
  node_persistence[("Local state storage<br/>persistence boundary<br/>[storage.py]")]
  node_audit["Audit logging<br/>compliance records<br/>[audit_log.py]"]
  node_settings["Persisted settings<br/>settings data<br/>[settings.json]"]
end

subgraph group_native["Native Core"]
  node_rust_crate["Rust native library<br/>Rust crate<br/>[lib.rs]"]
  node_cargo_manifest["Rust crate manifest<br/>Cargo manifest<br/>[Cargo.toml]"]
  node_cargo_lock["Rust dependency lock<br/>Cargo lockfile<br/>[Cargo.lock]"]
end

subgraph group_distribution["Distribution"]
  node_pyinstaller["PyInstaller build<br/>desktop packaging<br/>[Ignite.spec]"]
  node_wheel_ci["Wheel build CI<br/>GitHub Actions workflow<br/>[build_wheels.yml]"]
  node_release_ci["Release CI<br/>GitHub Actions workflow<br/>[release.yml]"]
  node_landing["Product landing site<br/>Vite web entry point<br/>[main.js]"]
  node_installer["Windows installer asset<br/>public installer"]
  node_installer_definition["Installer definition<br/>installer script"]
end

node_backend{{"ThermoAI backend<br/>external FastAPI service"}}

node_entry -->|"starts"| node_ui
node_entry -->|"defers work to"| node_async
node_ui -->|"applies"| node_theme
node_ui -->|"submits selected images"| node_async
node_async -->|"runs"| node_pipeline
node_pipeline -->|"uses"| node_processing_utils
node_config -->|"configures"| node_pipeline
node_pipeline -->|"returns derived results"| node_ui
node_pipeline -.->|"maintains behavioral parity with"| node_rust_crate
node_config -.->|"controls optional endpoint"| node_backend
node_async -.->|"optionally requests analysis"| node_backend
node_entry -->|"loads and saves state"| node_persistence
node_persistence -->|"persists"| node_settings
node_persistence -->|"records audit events"| node_audit
node_cargo_manifest -->|"defines"| node_rust_crate
node_cargo_lock -->|"locks dependencies for"| node_rust_crate
node_pyinstaller -->|"packages"| node_entry
node_installer_definition -->|"installs packaged application"| node_pyinstaller
node_wheel_ci -->|"builds release artifacts"| node_pyinstaller
node_release_ci -->|"publishes build outputs"| node_wheel_ci
node_landing -->|"distributes"| node_installer

click node_entry "https://github.com/noackjona-hash/jonanoackignite/blob/main/main.py"
click node_ui "https://github.com/noackjona-hash/jonanoackignite/blob/main/gui/main_window.py"
click node_theme "https://github.com/noackjona-hash/jonanoackignite/blob/main/gui/theme.py"
click node_async "https://github.com/noackjona-hash/jonanoackignite/blob/main/main.py"
click node_pipeline "https://github.com/noackjona-hash/jonanoackignite/blob/main/image_processing.py"
click node_processing_utils "https://github.com/noackjona-hash/jonanoackignite/blob/main/utils.py"
click node_config "https://github.com/noackjona-hash/jonanoackignite/blob/main/config.py"
click node_persistence "https://github.com/noackjona-hash/jonanoackignite/blob/main/storage.py"
click node_audit "https://github.com/noackjona-hash/jonanoackignite/blob/main/audit_log.py"
click node_settings "https://github.com/noackjona-hash/jonanoackignite/blob/main/settings.json"
click node_rust_crate "https://github.com/noackjona-hash/jonanoackignite/blob/main/src/lib.rs"
click node_cargo_manifest "https://github.com/noackjona-hash/jonanoackignite/blob/main/Cargo.toml"
click node_cargo_lock "https://github.com/noackjona-hash/jonanoackignite/blob/main/Cargo.lock"
click node_pyinstaller "https://github.com/noackjona-hash/jonanoackignite/blob/main/Ignite.spec"
click node_wheel_ci "https://github.com/noackjona-hash/jonanoackignite/blob/main/.github/workflows/build_wheels.yml"
click node_release_ci "https://github.com/noackjona-hash/jonanoackignite/blob/main/.github/workflows/release.yml"
click node_landing "https://github.com/noackjona-hash/jonanoackignite/blob/main/ignite-landing/src/main.js"
click node_installer "https://github.com/noackjona-hash/jonanoackignite/blob/main/ignite-landing/public/IGNITE_Setup_v1.0.0.exe"
click node_installer_definition "https://github.com/noackjona-hash/jonanoackignite/blob/main/ignite_installer.iss"

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_ui,node_theme,node_async,node_pipeline,node_processing_utils,node_config,node_persistence,node_audit,node_settings toneBlue
class node_rust_crate,node_cargo_manifest,node_cargo_lock toneAmber
class node_pyinstaller,node_wheel_ci,node_release_ci,node_landing,node_installer,node_installer_definition toneMint
class node_backend toneNeutral
```

## Components

### Desktop Client

Local privacy-first thermal analysis application.

- [Application bootstrap](https://github.com/noackjona-hash/jonanoackignite/blob/main/main.py): Python entry point · Starts the UI promptly and defers heavy initialization. · `main.py`
- [Dashboard and controls](https://github.com/noackjona-hash/jonanoackignite/blob/main/gui/main_window.py): CustomTkinter UI · Owns user interaction and presentation on the Tk thread. · `gui/main_window.py`
- [UI theme](https://github.com/noackjona-hash/jonanoackignite/blob/main/gui/theme.py): UI styling · `gui/theme.py`
- [Background analysis](https://github.com/noackjona-hash/jonanoackignite/blob/main/main.py): async orchestration · Keeps imports and image processing off the UI thread. · `main.py`
- [Thermal processing](https://github.com/noackjona-hash/jonanoackignite/blob/main/image_processing.py): CV pipeline · Filters, enhances, segments feet/ROIs, and compares temperatures in memory. · `image_processing.py`
- [Image utilities](https://github.com/noackjona-hash/jonanoackignite/blob/main/utils.py): processing support · `utils.py`
- [Client configuration](https://github.com/noackjona-hash/jonanoackignite/blob/main/config.py): configuration boundary · Supplies processing and service-integration settings. · `config.py`
- [Local state storage](https://github.com/noackjona-hash/jonanoackignite/blob/main/storage.py): persistence boundary · Retains preferences and derived metadata rather than raw imagery by default. · `storage.py`
- [Audit logging](https://github.com/noackjona-hash/jonanoackignite/blob/main/audit_log.py): compliance records · `audit_log.py`
- [Persisted settings](https://github.com/noackjona-hash/jonanoackignite/blob/main/settings.json): settings data · `settings.json`

### Native Core

Rust implementation boundary for parity-sensitive computation.

- [Rust native library](https://github.com/noackjona-hash/jonanoackignite/blob/main/src/lib.rs): Rust crate · Performance or correctness-critical implementation with Python parity requirements. · `src/lib.rs`
- [Rust crate manifest](https://github.com/noackjona-hash/jonanoackignite/blob/main/Cargo.toml): Cargo manifest · `Cargo.toml`
- [Rust dependency lock](https://github.com/noackjona-hash/jonanoackignite/blob/main/Cargo.lock): Cargo lockfile · `Cargo.lock`

### Distribution

Desktop release and public landing-site delivery.

- [PyInstaller build](https://github.com/noackjona-hash/jonanoackignite/blob/main/Ignite.spec): desktop packaging · Packages the Python desktop application and assets. · `Ignite.spec`
- [Wheel build CI](https://github.com/noackjona-hash/jonanoackignite/blob/main/.github/workflows/build_wheels.yml): GitHub Actions workflow · `.github/workflows/build_wheels.yml`
- [Release CI](https://github.com/noackjona-hash/jonanoackignite/blob/main/.github/workflows/release.yml): GitHub Actions workflow · `.github/workflows/release.yml`
- [Product landing site](https://github.com/noackjona-hash/jonanoackignite/blob/main/ignite-landing/src/main.js): Vite web entry point · Publishes installation material and marketing assets. · `ignite-landing/src/main.js`
- [Windows installer asset](https://github.com/noackjona-hash/jonanoackignite/blob/main/ignite-landing/public/IGNITE_Setup_v1.0.0.exe): public installer · `ignite-landing/public/IGNITE_Setup_v1.0.0.exe`
- [Installer definition](https://github.com/noackjona-hash/jonanoackignite/blob/main/ignite_installer.iss): installer script · `ignite_installer.iss`

### Other components

- **ThermoAI backend**: external FastAPI service · Optional encrypted local analysis-service integration; source is not in this repository.

## Connections

- Application bootstrap → Dashboard and controls: starts
- Application bootstrap → Background analysis: defers work to
- Dashboard and controls → UI theme: applies
- Dashboard and controls → Background analysis: submits selected images
- Background analysis → Thermal processing: runs
- Thermal processing → Image utilities: uses
- Client configuration → Thermal processing: configures
- Thermal processing → Dashboard and controls: returns derived results
- Thermal processing → Rust native library: maintains behavioral parity with
- Client configuration → ThermoAI backend: controls optional endpoint
- Background analysis → ThermoAI backend: optionally requests analysis
- Application bootstrap → Local state storage: loads and saves state
- Local state storage → Persisted settings: persists
- Local state storage → Audit logging: records audit events
- Rust crate manifest → Rust native library: defines
- Rust dependency lock → Rust native library: locks dependencies for
- PyInstaller build → Application bootstrap: packages
- Installer definition → PyInstaller build: installs packaged application
- Wheel build CI → PyInstaller build: builds release artifacts
- Release CI → Wheel build CI: publishes build outputs
- Product landing site → Windows installer asset: distributes
