# hermesuser/haluro architecture

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

- Interactive diagram: https://gitdiagram.com/hermesuser/haluro
- Repository: https://github.com/hermesuser/haluro

## Overview

Haluro is a local-first desktop photographic darkroom for film emulation, scanned-negative development, roll projects, and print-oriented editing. Users bring images into the desktop interface or CLI, develop them with per-frame recipes, then export images or contact sheets and save portable .haluro projects. The graph separates the interface/API, domain workflows, image-processing engine, and local project/platform support. Several API and UI routes are unsampled, so those connections are omitted or marked unverified rather than inferred from names alone.

Main entry points: [`app.py`](https://github.com/hermesuser/haluro/blob/main/app.py) (Flask API), [`engine/pipeline.py`](https://github.com/hermesuser/haluro/blob/main/engine/pipeline.py) (Film pipeline), [`engine/roll_processor.py`](https://github.com/hermesuser/haluro/blob/main/engine/roll_processor.py) (Roll processing), [`cli.py`](https://github.com/hermesuser/haluro/blob/main/cli.py) (CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["App interfaces"]
  node_desktop_ui["Desktop UI<br/>[app.js]"]
  node_native_shell["Native shell<br/>[native_app.py]"]
  node_flask_api["Flask API<br/>[app.py]"]
  node_cli["CLI<br/>[cli.py]"]
end

subgraph group_workflow["Photo workflows"]
  node_roll_workflow["Roll processing<br/>[roll_processor.py]"]
  node_negative_development["Negative development"]
  node_contact_sheets["Contact sheets<br/>[contact_sheet.py]"]
end

subgraph group_engine["Image engine"]
  node_film_catalog["Film catalog<br/>[films.py]"]
  node_lut_processing["LUT processing<br/>[lut.py]"]
  node_image_pipeline["Film pipeline<br/>[pipeline.py]"]
  node_super_resolution["Optical tools<br/>[superres.py]"]
end

subgraph group_support["Projects and local support"]
  node_project_store[("Roll projects<br/>[projects.py]")]
  node_presets["User presets<br/>[presets.py]"]
  node_platform_io["Platform I/O<br/>[platform_io.py]"]
  node_updater["Updater<br/>[updater.py]"]
end

node_photographer(("Photographer"))
node_local_ai["Local AI upscaler"]
node_photo_files["Image files"]
node_developed_files["Developed exports"]

node_photographer -.->|"edits images"| node_desktop_ui
node_desktop_ui -.->|"sends requests"| node_flask_api
node_photographer -->|"runs commands"| node_cli
node_native_shell -->|"launches app"| node_flask_api
node_flask_api -->|"processes images"| node_image_pipeline
node_flask_api -->|"inverts negatives"| node_negative_development
node_flask_api -->|"dispatches rolls"| node_roll_workflow
node_flask_api -->|"manages projects"| node_project_store
node_flask_api -->|"manages presets"| node_presets
node_flask_api -->|"requests sheets"| node_contact_sheets
node_flask_api -->|"uses platform I/O"| node_platform_io
node_flask_api -->|"checks updates"| node_updater
node_cli -->|"renders images"| node_image_pipeline
node_cli -->|"develops negatives"| node_negative_development
node_cli -->|"renders projects"| node_roll_workflow
node_roll_workflow -->|"develops frames"| node_negative_development
node_roll_workflow -->|"renders frames"| node_image_pipeline
node_roll_workflow -->|"resolves film"| node_film_catalog
node_roll_workflow -->|"builds sheets"| node_contact_sheets
node_image_pipeline -->|"loads profiles"| node_film_catalog
node_image_pipeline -->|"applies LUTs"| node_lut_processing
node_image_pipeline -->|"uses optical tools"| node_super_resolution
node_image_pipeline -->|"uses platform I/O"| node_platform_io
node_negative_development -->|"uses processing"| node_image_pipeline
node_film_catalog -->|"loads LUTs"| node_lut_processing
node_film_catalog -->|"locates user data"| node_platform_io
node_super_resolution -.->|"falls back to"| node_local_ai
node_photographer -.->|"opens"| node_photo_files
node_photo_files -.->|"uploads"| node_flask_api
node_flask_api -.->|"exports"| node_developed_files
node_flask_api -.->|"saves roll state"| node_project_store

click node_desktop_ui "https://github.com/hermesuser/haluro/blob/main/static/js/app.js"
click node_native_shell "https://github.com/hermesuser/haluro/blob/main/native_app.py"
click node_flask_api "https://github.com/hermesuser/haluro/blob/main/app.py"
click node_cli "https://github.com/hermesuser/haluro/blob/main/cli.py"
click node_roll_workflow "https://github.com/hermesuser/haluro/blob/main/engine/roll_processor.py"
click node_negative_development "https://github.com/hermesuser/haluro/blob/main/engine/negative_inverter.py"
click node_film_catalog "https://github.com/hermesuser/haluro/blob/main/engine/films.py"
click node_lut_processing "https://github.com/hermesuser/haluro/blob/main/engine/lut.py"
click node_image_pipeline "https://github.com/hermesuser/haluro/blob/main/engine/pipeline.py"
click node_super_resolution "https://github.com/hermesuser/haluro/blob/main/engine/superres.py"
click node_contact_sheets "https://github.com/hermesuser/haluro/blob/main/engine/contact_sheet.py"
click node_project_store "https://github.com/hermesuser/haluro/blob/main/engine/projects.py"
click node_presets "https://github.com/hermesuser/haluro/blob/main/engine/presets.py"
click node_platform_io "https://github.com/hermesuser/haluro/blob/main/engine/platform_io.py"
click node_updater "https://github.com/hermesuser/haluro/blob/main/engine/updater.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_desktop_ui,node_native_shell,node_flask_api,node_cli toneBlue
class node_roll_workflow,node_negative_development,node_contact_sheets toneAmber
class node_film_catalog,node_lut_processing,node_image_pipeline,node_super_resolution toneMint
class node_project_store,node_presets,node_platform_io,node_updater toneRose
class node_photographer,node_local_ai,node_photo_files,node_developed_files toneIndigo
```

## Components

### App interfaces

- [Desktop UI](https://github.com/hermesuser/haluro/blob/main/static/js/app.js): `static/js/app.js`
- [Native shell](https://github.com/hermesuser/haluro/blob/main/native_app.py): `native_app.py`
- [Flask API](https://github.com/hermesuser/haluro/blob/main/app.py): `app.py`
- [CLI](https://github.com/hermesuser/haluro/blob/main/cli.py): `cli.py`

### Photo workflows

- [Roll processing](https://github.com/hermesuser/haluro/blob/main/engine/roll_processor.py): `engine/roll_processor.py`
- [Negative development](https://github.com/hermesuser/haluro/blob/main/engine/negative_inverter.py): `engine/negative_inverter.py`
- [Contact sheets](https://github.com/hermesuser/haluro/blob/main/engine/contact_sheet.py): `engine/contact_sheet.py`

### Image engine

- [Film catalog](https://github.com/hermesuser/haluro/blob/main/engine/films.py): `engine/films.py`
- [LUT processing](https://github.com/hermesuser/haluro/blob/main/engine/lut.py): `engine/lut.py`
- [Film pipeline](https://github.com/hermesuser/haluro/blob/main/engine/pipeline.py): `engine/pipeline.py`
- [Optical tools](https://github.com/hermesuser/haluro/blob/main/engine/superres.py): `engine/superres.py`

### Projects and local support

- [Roll projects](https://github.com/hermesuser/haluro/blob/main/engine/projects.py): `engine/projects.py`
- [User presets](https://github.com/hermesuser/haluro/blob/main/engine/presets.py): `engine/presets.py`
- [Platform I/O](https://github.com/hermesuser/haluro/blob/main/engine/platform_io.py): `engine/platform_io.py`
- [Updater](https://github.com/hermesuser/haluro/blob/main/engine/updater.py): `engine/updater.py`

### Other components

- **Photographer**
- **Local AI upscaler**
- **Image files**
- **Developed exports**

## Connections

- Photographer → Desktop UI: edits images (evidence: `README.md`)
- Desktop UI → Flask API: sends requests
- Photographer → CLI: runs commands (evidence: `README.md`)
- Native shell → Flask API: launches app (evidence: `native_app.py`)
- Flask API → Film pipeline: processes images (evidence: `app.py`)
- Flask API → Negative development: inverts negatives (evidence: `app.py`)
- Flask API → Roll processing: dispatches rolls (evidence: `app.py`)
- Flask API → Roll projects: manages projects (evidence: `app.py`)
- Flask API → User presets: manages presets (evidence: `app.py`)
- Flask API → Contact sheets: requests sheets (evidence: `app.py`)
- Flask API → Platform I/O: uses platform I/O (evidence: `app.py`)
- Flask API → Updater: checks updates (evidence: `app.py`)
- CLI → Film pipeline: renders images (evidence: `cli.py`)
- CLI → Negative development: develops negatives (evidence: `cli.py`)
- CLI → Roll processing: renders projects (evidence: `cli.py`)
- Roll processing → Negative development: develops frames (evidence: `engine/roll_processor.py`)
- Roll processing → Film pipeline: renders frames (evidence: `engine/roll_processor.py`)
- Roll processing → Film catalog: resolves film (evidence: `engine/roll_processor.py`)
- Roll processing → Contact sheets: builds sheets (evidence: `engine/roll_processor.py`)
- Film pipeline → Film catalog: loads profiles (evidence: `engine/pipeline.py`)
- Film pipeline → LUT processing: applies LUTs (evidence: `engine/pipeline.py`)
- Film pipeline → Optical tools: uses optical tools (evidence: `engine/pipeline.py`)
- Film pipeline → Platform I/O: uses platform I/O (evidence: `engine/pipeline.py`)
- Negative development → Film pipeline: uses processing (evidence: `engine/negative_inverter.py`)
- Film catalog → LUT processing: loads LUTs (evidence: `engine/films.py`)
- Film catalog → Platform I/O: locates user data (evidence: `engine/films.py`)
- Optical tools → Local AI upscaler: falls back to (evidence: `engine/superres.py`)
- Photographer → Image files: opens (evidence: `README.md`)
- Image files → Flask API: uploads
- Flask API → Developed exports: exports (evidence: `README.md`)
- Flask API → Roll projects: saves roll state (evidence: `README.md`)
