# clarotechnet/dominium architecture

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

- Interactive diagram: https://gitdiagram.com/clarotechnet/dominium
- Repository: https://github.com/clarotechnet/dominium

## Overview

DOMINIUM is Technet’s operational dashboard for service orders, TOA field data, Imperium operations, inventory, automation, and access control. The main user workflow enters through the web application, which coordinates operational features and presents results in the static frontend. TOA capture and import, Imperium execution, inventory/material handling, and operational intelligence are distinct domain branches. Authentication has local, PostgreSQL, and Supabase backends; the TOA cloud bridge is a separate integration. Some links rely on the SOURCE INDEX or README rather than full source excerpts, so uncertain wiring is omitted.

Main entry points: [`app.py`](https://github.com/clarotechnet/dominium/blob/main/app.py) (Web application), [`official_close.py`](https://github.com/clarotechnet/dominium/blob/main/official_close.py) (Official close), [`integrations/toa_cloud_bridge/src/index.js`](https://github.com/clarotechnet/dominium/blob/main/integrations/toa_cloud_bridge/src/index.js) (Cloud bridge API), [`toa_capture.py`](https://github.com/clarotechnet/dominium/blob/main/toa_capture.py) (TOA capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web_access["Web and access"]
  node_app["Web application<br/>[app.py]"]
  node_frontend["Dashboard frontend<br/>[app.js]"]
  node_security["API security<br/>[api_security.py]"]
  node_auth_local["Local auth store<br/>[auth_store.py]"]
  node_auth_postgres["PostgreSQL auth"]
  node_auth_supabase["Supabase auth"]
end

subgraph group_toa["TOA operations"]
  node_toa_capture["TOA capture<br/>[toa_capture.py]"]
  node_toa_import["TOA import<br/>[toa_import.py]"]
  node_toa_automation["TOA automation<br/>[toa_automation.py]"]
  node_toa_local["Local TOA collector"]
  node_toa_cloud_client["TOA cloud client"]
end

subgraph group_imperium["Imperium operations"]
  node_imperium_api["Imperium operations<br/>[imperium_api.py]"]
  node_imperium_http["Imperium HTTP API"]
  node_datasnap["DataSnap client<br/>[datasnap_client.py]"]
  node_material_matching["Material matching"]
  node_official_close["Official close<br/>[official_close.py]"]
  node_flow_server["Flow analysis server<br/>[server.py]"]
  node_flow_analyzer["Capture analyzer<br/>[analyzer.py]"]
end

subgraph group_operations["Operational data"]
  node_operational_store[("Operational store")]
  node_intelligence["Operations intelligence"]
  node_datalake[("TOA data lake")]
end

subgraph group_integrations["Integrations"]
  node_bridge_api["Cloud bridge API<br/>[index.js]"]
  node_bridge_core["Bridge data rules<br/>[core.js]"]
  node_bridge_db[("Bridge job database<br/>[index.js]")]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_app
node_app -.->|"serves dashboard"| node_frontend
node_app -->|"uses"| node_security
node_app -->|"uses"| node_auth_local
node_app -->|"references"| node_auth_postgres
node_app -->|"references"| node_auth_supabase
node_app -->|"uses"| node_operational_store
node_app -->|"uses"| node_toa_capture
node_app -->|"uses"| node_toa_import
node_app -->|"uses"| node_toa_automation
node_app -->|"uses"| node_imperium_api
node_app -->|"uses"| node_imperium_http
node_app -->|"uses"| node_official_close
node_app -->|"uses"| node_intelligence
node_app -->|"uses"| node_material_matching
node_toa_capture -->|"ingests captures"| node_operational_store
node_app -->|"configures collector"| node_toa_local
node_intelligence -->|"reads capture data"| node_toa_capture
node_app -->|"uses"| node_datalake
node_imperium_api -->|"uses"| node_datasnap
node_imperium_http -->|"uses"| node_datasnap
node_official_close -->|"uses"| node_imperium_http
node_official_close -->|"uses"| node_material_matching
node_flow_server -->|"analyzes uploads"| node_flow_analyzer
node_toa_cloud_client -->|"requests lookups"| node_bridge_api
node_bridge_api -->|"uses validation"| node_bridge_core
node_bridge_api -->|"reads and writes jobs"| node_bridge_db

click node_app "https://github.com/clarotechnet/dominium/blob/main/app.py"
click node_frontend "https://github.com/clarotechnet/dominium/blob/main/static/app.js"
click node_security "https://github.com/clarotechnet/dominium/blob/main/api_security.py"
click node_auth_local "https://github.com/clarotechnet/dominium/blob/main/auth_store.py"
click node_auth_postgres "https://github.com/clarotechnet/dominium/blob/main/auth_store_postgres.py"
click node_auth_supabase "https://github.com/clarotechnet/dominium/blob/main/supabase_auth_store.py"
click node_toa_capture "https://github.com/clarotechnet/dominium/blob/main/toa_capture.py"
click node_toa_import "https://github.com/clarotechnet/dominium/blob/main/toa_import.py"
click node_toa_automation "https://github.com/clarotechnet/dominium/blob/main/toa_automation.py"
click node_toa_local "https://github.com/clarotechnet/dominium/blob/main/toa_local_collector.py"
click node_toa_cloud_client "https://github.com/clarotechnet/dominium/blob/main/toa_cloud_client.py"
click node_bridge_api "https://github.com/clarotechnet/dominium/blob/main/integrations/toa_cloud_bridge/src/index.js"
click node_bridge_core "https://github.com/clarotechnet/dominium/blob/main/integrations/toa_cloud_bridge/src/core.js"
click node_bridge_db "https://github.com/clarotechnet/dominium/blob/main/integrations/toa_cloud_bridge/src/index.js"
click node_imperium_api "https://github.com/clarotechnet/dominium/blob/main/imperium_api.py"
click node_imperium_http "https://github.com/clarotechnet/dominium/blob/main/imperium_http_api.py"
click node_datasnap "https://github.com/clarotechnet/dominium/blob/main/datasnap_client.py"
click node_material_matching "https://github.com/clarotechnet/dominium/blob/main/material_matching.py"
click node_official_close "https://github.com/clarotechnet/dominium/blob/main/official_close.py"
click node_flow_server "https://github.com/clarotechnet/dominium/blob/main/flow_reader/server.py"
click node_flow_analyzer "https://github.com/clarotechnet/dominium/blob/main/flow_reader/analyzer.py"
click node_operational_store "https://github.com/clarotechnet/dominium/blob/main/operational_store.py"
click node_intelligence "https://github.com/clarotechnet/dominium/blob/main/operations_intelligence.py"
click node_datalake "https://github.com/clarotechnet/dominium/blob/main/toa_datalake_store.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_app,node_frontend,node_security,node_auth_local,node_auth_postgres,node_auth_supabase toneBlue
class node_toa_capture,node_toa_import,node_toa_automation,node_toa_local,node_toa_cloud_client toneAmber
class node_imperium_api,node_imperium_http,node_datasnap,node_material_matching,node_official_close,node_flow_server,node_flow_analyzer toneMint
class node_operational_store,node_intelligence,node_datalake toneRose
class node_bridge_api,node_bridge_core,node_bridge_db,node_operator toneIndigo
```

## Components

### Web and access

- [Web application](https://github.com/clarotechnet/dominium/blob/main/app.py): `app.py`
- [Dashboard frontend](https://github.com/clarotechnet/dominium/blob/main/static/app.js): `static/app.js`
- [API security](https://github.com/clarotechnet/dominium/blob/main/api_security.py): `api_security.py`
- [Local auth store](https://github.com/clarotechnet/dominium/blob/main/auth_store.py): `auth_store.py`
- [PostgreSQL auth](https://github.com/clarotechnet/dominium/blob/main/auth_store_postgres.py): `auth_store_postgres.py`
- [Supabase auth](https://github.com/clarotechnet/dominium/blob/main/supabase_auth_store.py): `supabase_auth_store.py`

### TOA operations

- [TOA capture](https://github.com/clarotechnet/dominium/blob/main/toa_capture.py): `toa_capture.py`
- [TOA import](https://github.com/clarotechnet/dominium/blob/main/toa_import.py): `toa_import.py`
- [TOA automation](https://github.com/clarotechnet/dominium/blob/main/toa_automation.py): `toa_automation.py`
- [Local TOA collector](https://github.com/clarotechnet/dominium/blob/main/toa_local_collector.py): `toa_local_collector.py`
- [TOA cloud client](https://github.com/clarotechnet/dominium/blob/main/toa_cloud_client.py): `toa_cloud_client.py`

### Imperium operations

- [Imperium operations](https://github.com/clarotechnet/dominium/blob/main/imperium_api.py): `imperium_api.py`
- [Imperium HTTP API](https://github.com/clarotechnet/dominium/blob/main/imperium_http_api.py): `imperium_http_api.py`
- [DataSnap client](https://github.com/clarotechnet/dominium/blob/main/datasnap_client.py): `datasnap_client.py`
- [Material matching](https://github.com/clarotechnet/dominium/blob/main/material_matching.py): `material_matching.py`
- [Official close](https://github.com/clarotechnet/dominium/blob/main/official_close.py): `official_close.py`
- [Flow analysis server](https://github.com/clarotechnet/dominium/blob/main/flow_reader/server.py): `flow_reader/server.py`
- [Capture analyzer](https://github.com/clarotechnet/dominium/blob/main/flow_reader/analyzer.py): `flow_reader/analyzer.py`

### Operational data

- [Operational store](https://github.com/clarotechnet/dominium/blob/main/operational_store.py): `operational_store.py`
- [Operations intelligence](https://github.com/clarotechnet/dominium/blob/main/operations_intelligence.py): `operations_intelligence.py`
- [TOA data lake](https://github.com/clarotechnet/dominium/blob/main/toa_datalake_store.py): `toa_datalake_store.py`

### Integrations

- [Cloud bridge API](https://github.com/clarotechnet/dominium/blob/main/integrations/toa_cloud_bridge/src/index.js): `integrations/toa_cloud_bridge/src/index.js`
- [Bridge data rules](https://github.com/clarotechnet/dominium/blob/main/integrations/toa_cloud_bridge/src/core.js): `integrations/toa_cloud_bridge/src/core.js`
- [Bridge job database](https://github.com/clarotechnet/dominium/blob/main/integrations/toa_cloud_bridge/src/index.js): `integrations/toa_cloud_bridge/src/index.js`

### Other components

- **Operator**

## Connections

- Operator → Web application: uses (evidence: `README.md`)
- Web application → Dashboard frontend: serves dashboard (evidence: `README.md`)
- Web application → API security: uses (evidence: `app.py`)
- Web application → Local auth store: uses (evidence: `app.py`)
- Web application → PostgreSQL auth: references (evidence: `app.py`)
- Web application → Supabase auth: references (evidence: `app.py`)
- Web application → Operational store: uses (evidence: `app.py`)
- Web application → TOA capture: uses (evidence: `app.py`)
- Web application → TOA import: uses (evidence: `app.py`)
- Web application → TOA automation: uses (evidence: `app.py`)
- Web application → Imperium operations: uses (evidence: `app.py`)
- Web application → Imperium HTTP API: uses (evidence: `app.py`)
- Web application → Official close: uses (evidence: `app.py`)
- Web application → Operations intelligence: uses (evidence: `app.py`)
- Web application → Material matching: uses (evidence: `app.py`)
- TOA capture → Operational store: ingests captures
- Web application → Local TOA collector: configures collector (evidence: `app.py`)
- Operations intelligence → TOA capture: reads capture data (evidence: `operations_intelligence.py`)
- Web application → TOA data lake: uses (evidence: `app.py`)
- Imperium operations → DataSnap client: uses (evidence: `imperium_api.py`)
- Imperium HTTP API → DataSnap client: uses (evidence: `imperium_http_api.py`)
- Official close → Imperium HTTP API: uses (evidence: `official_close.py`)
- Official close → Material matching: uses (evidence: `official_close.py`)
- Flow analysis server → Capture analyzer: analyzes uploads (evidence: `flow_reader/server.py`)
- TOA cloud client → Cloud bridge API: requests lookups (evidence: `toa_cloud_client.py`)
- Cloud bridge API → Bridge data rules: uses validation (evidence: `integrations/toa_cloud_bridge/src/index.js`)
- Cloud bridge API → Bridge job database: reads and writes jobs (evidence: `integrations/toa_cloud_bridge/src/index.js`)
