# cjh-blip/dialux-compiler architecture

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

- Interactive diagram: https://gitdiagram.com/cjh-blip/dialux-compiler
- Repository: https://github.com/cjh-blip/dialux-compiler

## Overview

dialux-compiler turns building drawings and luminaire spreadsheets into structured IR, validates and plans modeling actions, then supports DIALux automation and report generation. A separate STF export path handles room geometry; the README notes that STF does not carry the project’s luminaires. The repository also presents the workbench and UIA executor as reusable automation capabilities. Some source excerpts are partial, so uncertain wiring between task modules and execution internals is omitted.

Main entry points: [`src/main.py`](https://github.com/cjh-blip/dialux-compiler/blob/main/src/main.py) (CLI Pipeline), [`src/parser/dxf.py`](https://github.com/cjh-blip/dialux-compiler/blob/main/src/parser/dxf.py) (Drawing Parser), [`src/planner/core.py`](https://github.com/cjh-blip/dialux-compiler/blob/main/src/planner/core.py) (Action Planner), [`src/parser/xlsx.py`](https://github.com/cjh-blip/dialux-compiler/blob/main/src/parser/xlsx.py) (Spreadsheet Parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Input and IR"]
  node_main["CLI Pipeline<br/>[main.py]"]
  node_dxf["Drawing Parser<br/>[dxf.py]"]
  node_xlsx["Spreadsheet Parser<br/>[xlsx.py]"]
  node_parser_chain["Geometry Helpers<br/>[_chain.py]"]
  node_ir["Project IR"]
end

subgraph group_planning["Validation and Planning"]
  node_join["Luminaire Join<br/>[join.py]"]
  node_mount["Mount Heights<br/>[mount.py]"]
  node_validator["IR Validator<br/>[__init__.py]"]
  node_planner["Action Planner<br/>[core.py]"]
  node_action_plan["Action Plan"]
  node_stf["STF Exporter<br/>[stf.py]"]
end

subgraph group_dialux["DIALux Modeling"]
  node_dialux_tasks["DIALux Tasks"]
  node_uia["UIA Executor"]
  node_uia_driver["UIA Driver<br/>[driver.py]"]
end

subgraph group_automation["Automation Framework"]
  node_workbench["Workbench"]
  node_dispatcher["Trigger Dispatcher<br/>[dispatcher.py]"]
  node_recognition["UI Recognition<br/>[recognition.py]"]
  node_config["Workbench Config<br/>[config.py]"]
end

subgraph group_interfaces["User Interfaces"]
  node_launcher["Desktop Launcher<br/>[launcher.py]"]
  node_overlay["Progress Overlay<br/>[overlay.py]"]
  node_env["Runtime Paths<br/>[env.py]"]
end

node_user(("Engineer"))
node_drawing["DWG/DXF Drawing"]
node_spreadsheet["Luminaire Sheet"]
node_dialux(("DIALux evo"))

node_user -->|"provides inputs"| node_main
node_drawing -->|"supplies drawing"| node_main
node_spreadsheet -->|"supplies sheet"| node_main
node_main -->|"parses drawing"| node_dxf
node_main -->|"reads sheet"| node_xlsx
node_dxf -->|"extracts geometry"| node_parser_chain
node_dxf -->|"produces rooms"| node_ir
node_xlsx -->|"supplies luminaire data"| node_ir
node_main -->|"matches luminaires"| node_join
node_main -->|"assigns heights"| node_mount
node_main -->|"validates IR"| node_validator
node_main -->|"builds plan"| node_planner
node_planner -->|"checks halt rules"| node_validator
node_planner -->|"produces actions"| node_action_plan
node_main -->|"exports geometry"| node_stf
node_stf -->|"writes STF for import"| node_dialux
node_dialux_tasks -->|"uses UI automation"| node_uia
node_uia -->|"drives controls"| node_uia_driver
node_uia_driver -->|"automates interface"| node_dialux
node_workbench -->|"provides scheduling"| node_dispatcher
node_dispatcher -->|"observes UI state"| node_recognition
node_user -->|"starts workflow"| node_launcher
node_launcher -->|"resolves executable"| node_env
node_user -->|"starts automation"| node_overlay

click node_main "https://github.com/cjh-blip/dialux-compiler/blob/main/src/main.py"
click node_dxf "https://github.com/cjh-blip/dialux-compiler/blob/main/src/parser/dxf.py"
click node_xlsx "https://github.com/cjh-blip/dialux-compiler/blob/main/src/parser/xlsx.py"
click node_parser_chain "https://github.com/cjh-blip/dialux-compiler/blob/main/src/parser/_chain.py"
click node_join "https://github.com/cjh-blip/dialux-compiler/blob/main/src/planner/join.py"
click node_mount "https://github.com/cjh-blip/dialux-compiler/blob/main/src/planner/mount.py"
click node_validator "https://github.com/cjh-blip/dialux-compiler/blob/main/src/validator/__init__.py"
click node_planner "https://github.com/cjh-blip/dialux-compiler/blob/main/src/planner/core.py"
click node_stf "https://github.com/cjh-blip/dialux-compiler/blob/main/src/exporter/stf.py"
click node_dialux_tasks "https://github.com/cjh-blip/dialux-compiler/tree/main/src/tasks/dialux"
click node_uia "https://github.com/cjh-blip/dialux-compiler/tree/main/src/executor/uia"
click node_uia_driver "https://github.com/cjh-blip/dialux-compiler/blob/main/src/executor/uia/driver.py"
click node_workbench "https://github.com/cjh-blip/dialux-compiler/tree/main/src/workbench"
click node_dispatcher "https://github.com/cjh-blip/dialux-compiler/blob/main/src/workbench/dispatcher.py"
click node_recognition "https://github.com/cjh-blip/dialux-compiler/blob/main/src/workbench/recognition.py"
click node_config "https://github.com/cjh-blip/dialux-compiler/blob/main/src/workbench/config.py"
click node_launcher "https://github.com/cjh-blip/dialux-compiler/blob/main/src/ui/launcher.py"
click node_overlay "https://github.com/cjh-blip/dialux-compiler/blob/main/src/ui/overlay.py"
click node_env "https://github.com/cjh-blip/dialux-compiler/blob/main/src/core/env.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_main,node_dxf,node_xlsx,node_parser_chain,node_ir toneBlue
class node_join,node_mount,node_validator,node_planner,node_action_plan,node_stf toneAmber
class node_dialux_tasks,node_uia,node_uia_driver toneMint
class node_workbench,node_dispatcher,node_recognition,node_config toneRose
class node_launcher,node_overlay,node_env,node_user,node_drawing,node_spreadsheet,node_dialux toneIndigo
```

## Components

### Input and IR

- [CLI Pipeline](https://github.com/cjh-blip/dialux-compiler/blob/main/src/main.py): `src/main.py`
- [Drawing Parser](https://github.com/cjh-blip/dialux-compiler/blob/main/src/parser/dxf.py): `src/parser/dxf.py`
- [Spreadsheet Parser](https://github.com/cjh-blip/dialux-compiler/blob/main/src/parser/xlsx.py): `src/parser/xlsx.py`
- [Geometry Helpers](https://github.com/cjh-blip/dialux-compiler/blob/main/src/parser/_chain.py): `src/parser/_chain.py`
- **Project IR**

### Validation and Planning

- [Luminaire Join](https://github.com/cjh-blip/dialux-compiler/blob/main/src/planner/join.py): `src/planner/join.py`
- [Mount Heights](https://github.com/cjh-blip/dialux-compiler/blob/main/src/planner/mount.py): `src/planner/mount.py`
- [IR Validator](https://github.com/cjh-blip/dialux-compiler/blob/main/src/validator/__init__.py): `src/validator/__init__.py`
- [Action Planner](https://github.com/cjh-blip/dialux-compiler/blob/main/src/planner/core.py): `src/planner/core.py`
- **Action Plan**
- [STF Exporter](https://github.com/cjh-blip/dialux-compiler/blob/main/src/exporter/stf.py): `src/exporter/stf.py`

### DIALux Modeling

- [DIALux Tasks](https://github.com/cjh-blip/dialux-compiler/tree/main/src/tasks/dialux): `src/tasks/dialux`
- [UIA Executor](https://github.com/cjh-blip/dialux-compiler/tree/main/src/executor/uia): `src/executor/uia`
- [UIA Driver](https://github.com/cjh-blip/dialux-compiler/blob/main/src/executor/uia/driver.py): `src/executor/uia/driver.py`

### Automation Framework

- [Workbench](https://github.com/cjh-blip/dialux-compiler/tree/main/src/workbench): `src/workbench`
- [Trigger Dispatcher](https://github.com/cjh-blip/dialux-compiler/blob/main/src/workbench/dispatcher.py): `src/workbench/dispatcher.py`
- [UI Recognition](https://github.com/cjh-blip/dialux-compiler/blob/main/src/workbench/recognition.py): `src/workbench/recognition.py`
- [Workbench Config](https://github.com/cjh-blip/dialux-compiler/blob/main/src/workbench/config.py): `src/workbench/config.py`

### User Interfaces

- [Desktop Launcher](https://github.com/cjh-blip/dialux-compiler/blob/main/src/ui/launcher.py): `src/ui/launcher.py`
- [Progress Overlay](https://github.com/cjh-blip/dialux-compiler/blob/main/src/ui/overlay.py): `src/ui/overlay.py`
- [Runtime Paths](https://github.com/cjh-blip/dialux-compiler/blob/main/src/core/env.py): `src/core/env.py`

### Other components

- **Engineer**
- **DWG/DXF Drawing**
- **Luminaire Sheet**
- **DIALux evo**

## Connections

- Engineer → CLI Pipeline: provides inputs
- DWG/DXF Drawing → CLI Pipeline: supplies drawing
- Luminaire Sheet → CLI Pipeline: supplies sheet
- CLI Pipeline → Drawing Parser: parses drawing
- CLI Pipeline → Spreadsheet Parser: reads sheet
- Drawing Parser → Geometry Helpers: extracts geometry
- Drawing Parser → Project IR: produces rooms
- Spreadsheet Parser → Project IR: supplies luminaire data
- CLI Pipeline → Luminaire Join: matches luminaires
- CLI Pipeline → Mount Heights: assigns heights
- CLI Pipeline → IR Validator: validates IR
- CLI Pipeline → Action Planner: builds plan
- Action Planner → IR Validator: checks halt rules
- Action Planner → Action Plan: produces actions
- CLI Pipeline → STF Exporter: exports geometry
- STF Exporter → DIALux evo: writes STF for import
- DIALux Tasks → UIA Executor: uses UI automation
- UIA Executor → UIA Driver: drives controls
- UIA Driver → DIALux evo: automates interface
- Workbench → Trigger Dispatcher: provides scheduling
- Trigger Dispatcher → UI Recognition: observes UI state
- Engineer → Desktop Launcher: starts workflow
- Desktop Launcher → Runtime Paths: resolves executable
- Engineer → Progress Overlay: starts automation
