# alardware/loggia architecture

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

- Interactive diagram: https://gitdiagram.com/alardware/loggia
- Repository: https://github.com/alardware/loggia

## Overview

Loggia is a self-populating Home Assistant dashboard delivered as a panel. Its main workflow is to discover the installation’s areas, devices, and entities, build relevant views and device cards, then let household members inspect and control devices or run scenarios. The integration also supplies safety, heating, shutter, and other home-management capabilities. The graph reflects documented product behavior and source-index references; several backend subsystem paths are present in the tree but their internal call relationships were not sampled, so those links are omitted.

Main entry points: [`src/App.jsx`](https://github.com/alardware/loggia/blob/main/src/App.jsx) (Dashboard app), [`custom_components/loggia/frontend/panel.js`](https://github.com/alardware/loggia/blob/main/custom_components/loggia/frontend/panel.js) (Loggia panel), [`src/discovery.js`](https://github.com/alardware/loggia/blob/main/src/discovery.js) (Installation discovery), [`src/accueil/dashboard.jsx`](https://github.com/alardware/loggia/blob/main/src/accueil/dashboard.jsx) (Home and rooms)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Dashboard entry"]
  node_panel["Loggia panel<br/>[panel.js]"]
  node_app["Dashboard app<br/>[App.jsx]"]
end

subgraph group_frontend["Dashboard experience"]
  node_discovery["Installation discovery<br/>[discovery.js]"]
  node_shared_state["Shared state<br/>[state.js]"]
  node_home_view["Home and rooms<br/>[dashboard.jsx]"]
  node_attention["Safety attention<br/>[attention.js]"]
  node_device_views["Device views<br/>[appareils.jsx]"]
  node_energy["Energy view<br/>[energie.jsx]"]
  node_security["Security view<br/>[securite.jsx]"]
  node_profiles["User profiles<br/>[profiles.js]"]
end

subgraph group_controls["Device controls"]
  node_device_cards["Device cards<br/>[cartes.jsx]"]
  node_device_sheets["Device sheets<br/>[fiches.jsx]"]
  node_service_actions["Service actions<br/>[actions.js]"]
  node_scenarios["Scenarios<br/>[scenarios.js]"]
end

subgraph group_integration["Home integration"]
  node_integration_setup["Integration setup<br/>[config_flow.py]"]
  node_websocket_api["WebSocket API<br/>[websocket_api.py]"]
  node_persistent_store[("Profile storage<br/>[store.py]")]
end

subgraph group_home_ops["Home operations"]
  node_alerts["Safety alerts<br/>[alertes.py]"]
  node_heating["Heating management<br/>[chauffage.py]"]
  node_shutters["Shutter management<br/>[volets.py]"]
  node_rules["Rules and watches<br/>[regles.py]"]
  node_water["Water management<br/>[eau.py]"]
end

node_resident(("Resident"))
node_ha{{"Home Assistant"}}

node_resident -->|"opens"| node_panel
node_panel -.->|"loads"| node_app
node_app -->|"uses discovery"| node_discovery
node_app -->|"uses state"| node_shared_state
node_discovery -->|"reads registries"| node_ha
node_app -->|"shows dashboard"| node_home_view
node_home_view -->|"summarizes alerts"| node_attention
node_app -->|"shows devices"| node_device_views
node_device_views -.->|"renders cards"| node_device_cards
node_device_cards -->|"opens sheets"| node_device_sheets
node_device_sheets -.->|"commands devices"| node_service_actions
node_service_actions -->|"calls services"| node_ha
node_app -->|"offers scenarios"| node_scenarios
node_ha -->|"starts scenario"| node_scenarios
node_app -->|"shows energy"| node_energy
node_app -->|"shows security"| node_security
node_app -->|"loads profile"| node_profiles
node_resident -->|"sets up"| node_integration_setup
node_integration_setup -->|"registers integration"| node_ha
node_alerts -.->|"monitors sensors"| node_ha
node_heating -.->|"manages heating"| node_ha
node_shutters -.->|"manages shutters"| node_ha
node_rules -->|"uses automations"| node_ha
node_water -->|"closes inlet"| node_ha
node_profiles -.->|"persists settings"| node_persistent_store
node_app -.->|"uses integration API"| node_websocket_api

click node_panel "https://github.com/alardware/loggia/blob/main/custom_components/loggia/frontend/panel.js"
click node_app "https://github.com/alardware/loggia/blob/main/src/App.jsx"
click node_discovery "https://github.com/alardware/loggia/blob/main/src/discovery.js"
click node_shared_state "https://github.com/alardware/loggia/blob/main/src/state.js"
click node_home_view "https://github.com/alardware/loggia/blob/main/src/accueil/dashboard.jsx"
click node_attention "https://github.com/alardware/loggia/blob/main/src/attention.js"
click node_device_views "https://github.com/alardware/loggia/blob/main/src/views/appareils.jsx"
click node_device_cards "https://github.com/alardware/loggia/blob/main/src/cartescustom/cartes.jsx"
click node_device_sheets "https://github.com/alardware/loggia/blob/main/src/appareils/fiches.jsx"
click node_service_actions "https://github.com/alardware/loggia/blob/main/src/actions.js"
click node_scenarios "https://github.com/alardware/loggia/blob/main/src/scenarios.js"
click node_energy "https://github.com/alardware/loggia/blob/main/src/views/energie.jsx"
click node_security "https://github.com/alardware/loggia/blob/main/src/views/securite.jsx"
click node_profiles "https://github.com/alardware/loggia/blob/main/src/profiles.js"
click node_integration_setup "https://github.com/alardware/loggia/blob/main/custom_components/loggia/config_flow.py"
click node_websocket_api "https://github.com/alardware/loggia/blob/main/custom_components/loggia/websocket_api.py"
click node_persistent_store "https://github.com/alardware/loggia/blob/main/custom_components/loggia/store.py"
click node_alerts "https://github.com/alardware/loggia/blob/main/custom_components/loggia/alertes.py"
click node_heating "https://github.com/alardware/loggia/blob/main/custom_components/loggia/chauffage.py"
click node_shutters "https://github.com/alardware/loggia/blob/main/custom_components/loggia/volets.py"
click node_rules "https://github.com/alardware/loggia/blob/main/custom_components/loggia/regles.py"
click node_water "https://github.com/alardware/loggia/blob/main/custom_components/loggia/eau.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_panel,node_app toneBlue
class node_discovery,node_shared_state,node_home_view,node_attention,node_device_views,node_energy,node_security,node_profiles toneAmber
class node_device_cards,node_device_sheets,node_service_actions,node_scenarios toneMint
class node_integration_setup,node_websocket_api,node_persistent_store toneRose
class node_alerts,node_heating,node_shutters,node_rules,node_water,node_resident,node_ha toneIndigo
```

## Components

### Dashboard entry

- [Loggia panel](https://github.com/alardware/loggia/blob/main/custom_components/loggia/frontend/panel.js): `custom_components/loggia/frontend/panel.js`
- [Dashboard app](https://github.com/alardware/loggia/blob/main/src/App.jsx): `src/App.jsx`

### Dashboard experience

- [Installation discovery](https://github.com/alardware/loggia/blob/main/src/discovery.js): `src/discovery.js`
- [Shared state](https://github.com/alardware/loggia/blob/main/src/state.js): `src/state.js`
- [Home and rooms](https://github.com/alardware/loggia/blob/main/src/accueil/dashboard.jsx): `src/accueil/dashboard.jsx`
- [Safety attention](https://github.com/alardware/loggia/blob/main/src/attention.js): `src/attention.js`
- [Device views](https://github.com/alardware/loggia/blob/main/src/views/appareils.jsx): `src/views/appareils.jsx`
- [Energy view](https://github.com/alardware/loggia/blob/main/src/views/energie.jsx): `src/views/energie.jsx`
- [Security view](https://github.com/alardware/loggia/blob/main/src/views/securite.jsx): `src/views/securite.jsx`
- [User profiles](https://github.com/alardware/loggia/blob/main/src/profiles.js): `src/profiles.js`

### Device controls

- [Device cards](https://github.com/alardware/loggia/blob/main/src/cartescustom/cartes.jsx): `src/cartescustom/cartes.jsx`
- [Device sheets](https://github.com/alardware/loggia/blob/main/src/appareils/fiches.jsx): `src/appareils/fiches.jsx`
- [Service actions](https://github.com/alardware/loggia/blob/main/src/actions.js): `src/actions.js`
- [Scenarios](https://github.com/alardware/loggia/blob/main/src/scenarios.js): `src/scenarios.js`

### Home integration

- [Integration setup](https://github.com/alardware/loggia/blob/main/custom_components/loggia/config_flow.py): `custom_components/loggia/config_flow.py`
- [WebSocket API](https://github.com/alardware/loggia/blob/main/custom_components/loggia/websocket_api.py): `custom_components/loggia/websocket_api.py`
- [Profile storage](https://github.com/alardware/loggia/blob/main/custom_components/loggia/store.py): `custom_components/loggia/store.py`

### Home operations

- [Safety alerts](https://github.com/alardware/loggia/blob/main/custom_components/loggia/alertes.py): `custom_components/loggia/alertes.py`
- [Heating management](https://github.com/alardware/loggia/blob/main/custom_components/loggia/chauffage.py): `custom_components/loggia/chauffage.py`
- [Shutter management](https://github.com/alardware/loggia/blob/main/custom_components/loggia/volets.py): `custom_components/loggia/volets.py`
- [Rules and watches](https://github.com/alardware/loggia/blob/main/custom_components/loggia/regles.py): `custom_components/loggia/regles.py`
- [Water management](https://github.com/alardware/loggia/blob/main/custom_components/loggia/eau.py): `custom_components/loggia/eau.py`

### Other components

- **Resident**
- **Home Assistant**

## Connections

- Resident → Loggia panel: opens (evidence: `README.md`)
- Loggia panel → Dashboard app: loads
- Dashboard app → Installation discovery: uses discovery (evidence: `src/App.jsx`)
- Dashboard app → Shared state: uses state (evidence: `src/App.jsx`)
- Installation discovery → Home Assistant: reads registries (evidence: `README.md`)
- Dashboard app → Home and rooms: shows dashboard (evidence: `README.md`)
- Home and rooms → Safety attention: summarizes alerts (evidence: `src/accueil/dashboard.jsx`)
- Dashboard app → Device views: shows devices (evidence: `README.md`)
- Device views → Device cards: renders cards
- Device cards → Device sheets: opens sheets (evidence: `src/cartescustom/cartes.jsx`)
- Device sheets → Service actions: commands devices (evidence: `src/appareils/fiches.jsx`)
- Service actions → Home Assistant: calls services (evidence: `src/actions.js`)
- Dashboard app → Scenarios: offers scenarios (evidence: `README.md`)
- Home Assistant → Scenarios: starts scenario (evidence: `README.md`)
- Dashboard app → Energy view: shows energy (evidence: `README.md`)
- Dashboard app → Security view: shows security (evidence: `README.md`)
- Dashboard app → User profiles: loads profile (evidence: `README.md`)
- Resident → Integration setup: sets up (evidence: `README.md`)
- Integration setup → Home Assistant: registers integration (evidence: `README.md`)
- Safety alerts → Home Assistant: monitors sensors
- Heating management → Home Assistant: manages heating
- Shutter management → Home Assistant: manages shutters
- Rules and watches → Home Assistant: uses automations (evidence: `README.md`)
- Water management → Home Assistant: closes inlet (evidence: `README.md`)
- User profiles → Profile storage: persists settings
- Dashboard app → WebSocket API: uses integration API
