# alibarakat721/hvac-duct-dx architecture

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

- Interactive diagram: https://gitdiagram.com/alibarakat721/hvac-duct-dx
- Repository: https://github.com/alibarakat721/hvac-duct-dx

## Overview

This is a desktop HVAC equipment selector with integrated diffuser selection and room-layout design. The principal workflow is: an engineer supplies a HAP report or enters loads manually; the application extracts and validates design conditions, presents equipment choices from its catalog database, and produces reports or exports. A parallel diffuser workflow selects catalog-based diffusers and verifies their placement in room geometry. The graph reflects sampled calls and SOURCE INDEX references; README documentation is absent, and some peripheral subsystem wiring is not shown.

Main entry points: [`main.py`](https://github.com/alibarakat721/hvac-duct-dx/blob/main/main.py) (Workflow Controller), [`diffuser_calculator.py`](https://github.com/alibarakat721/hvac-duct-dx/blob/main/diffuser_calculator.py) (Diffuser Selection), [`ui_shell.py`](https://github.com/alibarakat721/hvac-duct-dx/blob/main/ui_shell.py) (Desktop UI), [`hvac_equipment.sqlite`](https://github.com/alibarakat721/hvac-duct-dx/blob/main/hvac_equipment.sqlite) (Equipment Catalog DB)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Load Inputs"]
  node_ui["Desktop UI<br/>[ui_shell.py]"]
  node_app["Workflow Controller<br/>[main.py]"]
  node_extractors["Report Extraction<br/>[extractors.py]"]
  node_hap["HAP Parsing<br/>[hap_parser.py]"]
  node_manual["Manual Inputs<br/>[manual_input.py]"]
end

subgraph group_equipment["Equipment Selection"]
  node_equipment_db[("Equipment Catalog DB")]
  node_miraco["Miraco Catalog<br/>[miraco_loader.py]"]
  node_rooftop["Rooftop Catalog<br/>[rooftop_loader.py]"]
  node_report["Equipment Report<br/>[report_builder.py]"]
  node_export["Data Export<br/>[exporters.py]"]
end

subgraph group_diffuser["Diffuser Design"]
  node_room_designer["Room Designer<br/>[room_designer.py]"]
  node_geometry["Room Geometry<br/>[room_geometry.py]"]
  node_diffuser_calc["Diffuser Selection"]
  node_catalog["Diffuser Catalog<br/>[catalog_data.py]"]
  node_placement_adapter["Placement Adapter"]
  node_placement["Placement Verification"]
  node_diffuser_report["Diffuser Reports<br/>[diffuser_report.py]"]
end

subgraph group_persistence["Project Outputs"]
  node_project["Project Persistence"]
end

node_engineer(("HVAC Engineer"))

node_engineer -->|"uses"| node_ui
node_ui -->|"invokes"| node_app
node_app -->|"extracts text"| node_extractors
node_app -->|"parses report"| node_hap
node_app -->|"requests inputs"| node_manual
node_manual -->|"reuses parsing"| node_hap
node_app -->|"queries"| node_equipment_db
node_app -->|"builds report"| node_report
node_app -->|"exports results"| node_export
node_app -->|"opens designer"| node_room_designer
node_app -->|"builds diffuser report"| node_diffuser_report
node_app -->|"loads and saves"| node_project
node_equipment_db -->|"supplies records"| node_report
node_room_designer -->|"uses geometry"| node_geometry
node_room_designer -->|"requests selection"| node_diffuser_calc
node_diffuser_calc -->|"reads catalog"| node_catalog
node_diffuser_calc -->|"uses room layout"| node_geometry
node_diffuser_calc -->|"delegates placement"| node_placement_adapter
node_placement_adapter -->|"calls engine"| node_placement
node_diffuser_report -->|"solves selection"| node_diffuser_calc
node_ui -->|"presents selection"| node_diffuser_calc
node_ui -->|"displays layout"| node_geometry
node_miraco -.->|"loads catalog"| node_equipment_db
node_rooftop -.->|"loads catalog"| node_equipment_db

click node_ui "https://github.com/alibarakat721/hvac-duct-dx/blob/main/ui_shell.py"
click node_app "https://github.com/alibarakat721/hvac-duct-dx/blob/main/main.py"
click node_extractors "https://github.com/alibarakat721/hvac-duct-dx/blob/main/extractors.py"
click node_hap "https://github.com/alibarakat721/hvac-duct-dx/blob/main/hap_parser.py"
click node_manual "https://github.com/alibarakat721/hvac-duct-dx/blob/main/manual_input.py"
click node_equipment_db "https://github.com/alibarakat721/hvac-duct-dx/blob/main/hvac_equipment.sqlite"
click node_miraco "https://github.com/alibarakat721/hvac-duct-dx/blob/main/miraco_loader.py"
click node_rooftop "https://github.com/alibarakat721/hvac-duct-dx/blob/main/rooftop_loader.py"
click node_report "https://github.com/alibarakat721/hvac-duct-dx/blob/main/report_builder.py"
click node_export "https://github.com/alibarakat721/hvac-duct-dx/blob/main/exporters.py"
click node_room_designer "https://github.com/alibarakat721/hvac-duct-dx/blob/main/room_designer.py"
click node_geometry "https://github.com/alibarakat721/hvac-duct-dx/blob/main/room_geometry.py"
click node_diffuser_calc "https://github.com/alibarakat721/hvac-duct-dx/blob/main/diffuser_calculator.py"
click node_catalog "https://github.com/alibarakat721/hvac-duct-dx/blob/main/catalog_data.py"
click node_placement_adapter "https://github.com/alibarakat721/hvac-duct-dx/blob/main/placement_engine_adapter.py"
click node_placement "https://github.com/alibarakat721/hvac-duct-dx/blob/main/placement_engine.py"
click node_diffuser_report "https://github.com/alibarakat721/hvac-duct-dx/blob/main/diffuser_report.py"
click node_project "https://github.com/alibarakat721/hvac-duct-dx/blob/main/project_persistence.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_ui,node_app,node_extractors,node_hap,node_manual toneBlue
class node_equipment_db,node_miraco,node_rooftop,node_report,node_export toneAmber
class node_room_designer,node_geometry,node_diffuser_calc,node_catalog,node_placement_adapter,node_placement,node_diffuser_report toneMint
class node_project toneRose
class node_engineer toneIndigo
```

## Components

### Load Inputs

- [Desktop UI](https://github.com/alibarakat721/hvac-duct-dx/blob/main/ui_shell.py): `ui_shell.py`
- [Workflow Controller](https://github.com/alibarakat721/hvac-duct-dx/blob/main/main.py): `main.py`
- [Report Extraction](https://github.com/alibarakat721/hvac-duct-dx/blob/main/extractors.py): `extractors.py`
- [HAP Parsing](https://github.com/alibarakat721/hvac-duct-dx/blob/main/hap_parser.py): `hap_parser.py`
- [Manual Inputs](https://github.com/alibarakat721/hvac-duct-dx/blob/main/manual_input.py): `manual_input.py`

### Equipment Selection

- [Equipment Catalog DB](https://github.com/alibarakat721/hvac-duct-dx/blob/main/hvac_equipment.sqlite): `hvac_equipment.sqlite`
- [Miraco Catalog](https://github.com/alibarakat721/hvac-duct-dx/blob/main/miraco_loader.py): `miraco_loader.py`
- [Rooftop Catalog](https://github.com/alibarakat721/hvac-duct-dx/blob/main/rooftop_loader.py): `rooftop_loader.py`
- [Equipment Report](https://github.com/alibarakat721/hvac-duct-dx/blob/main/report_builder.py): `report_builder.py`
- [Data Export](https://github.com/alibarakat721/hvac-duct-dx/blob/main/exporters.py): `exporters.py`

### Diffuser Design

- [Room Designer](https://github.com/alibarakat721/hvac-duct-dx/blob/main/room_designer.py): `room_designer.py`
- [Room Geometry](https://github.com/alibarakat721/hvac-duct-dx/blob/main/room_geometry.py): `room_geometry.py`
- [Diffuser Selection](https://github.com/alibarakat721/hvac-duct-dx/blob/main/diffuser_calculator.py): `diffuser_calculator.py`
- [Diffuser Catalog](https://github.com/alibarakat721/hvac-duct-dx/blob/main/catalog_data.py): `catalog_data.py`
- [Placement Adapter](https://github.com/alibarakat721/hvac-duct-dx/blob/main/placement_engine_adapter.py): `placement_engine_adapter.py`
- [Placement Verification](https://github.com/alibarakat721/hvac-duct-dx/blob/main/placement_engine.py): `placement_engine.py`
- [Diffuser Reports](https://github.com/alibarakat721/hvac-duct-dx/blob/main/diffuser_report.py): `diffuser_report.py`

### Project Outputs

- [Project Persistence](https://github.com/alibarakat721/hvac-duct-dx/blob/main/project_persistence.py): `project_persistence.py`

### Other components

- **HVAC Engineer**

## Connections

- HVAC Engineer → Desktop UI: uses
- Desktop UI → Workflow Controller: invokes (evidence: `ui_shell.py`)
- Workflow Controller → Report Extraction: extracts text (evidence: `main.py`)
- Workflow Controller → HAP Parsing: parses report (evidence: `main.py`)
- Workflow Controller → Manual Inputs: requests inputs (evidence: `main.py`)
- Manual Inputs → HAP Parsing: reuses parsing (evidence: `manual_input.py`)
- Workflow Controller → Equipment Catalog DB: queries (evidence: `main.py`)
- Workflow Controller → Equipment Report: builds report (evidence: `main.py`)
- Workflow Controller → Data Export: exports results (evidence: `main.py`)
- Workflow Controller → Room Designer: opens designer (evidence: `main.py`)
- Workflow Controller → Diffuser Reports: builds diffuser report (evidence: `main.py`)
- Workflow Controller → Project Persistence: loads and saves (evidence: `main.py`)
- Equipment Catalog DB → Equipment Report: supplies records (evidence: `report_builder.py`)
- Room Designer → Room Geometry: uses geometry (evidence: `room_designer.py`)
- Room Designer → Diffuser Selection: requests selection (evidence: `room_designer.py`)
- Diffuser Selection → Diffuser Catalog: reads catalog (evidence: `diffuser_calculator.py`)
- Diffuser Selection → Room Geometry: uses room layout (evidence: `diffuser_calculator.py`)
- Diffuser Selection → Placement Adapter: delegates placement (evidence: `diffuser_calculator.py`)
- Placement Adapter → Placement Verification: calls engine (evidence: `placement_engine_adapter.py`)
- Diffuser Reports → Diffuser Selection: solves selection (evidence: `diffuser_report.py`)
- Desktop UI → Diffuser Selection: presents selection (evidence: `ui_shell.py`)
- Desktop UI → Room Geometry: displays layout (evidence: `ui_shell.py`)
- Miraco Catalog → Equipment Catalog DB: loads catalog
- Rooftop Catalog → Equipment Catalog DB: loads catalog
