# alexxit/hasswp architecture

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

- Interactive diagram: https://gitdiagram.com/alexxit/hasswp
- Repository: https://github.com/alexxit/hasswp

## Overview

##### Connection and Data Flow

- User interactions (browser → Home Assistant Core)
- Configuration management (NotePad++ ↔ config files)
- Integration communications (Core ↔ Smart Device Integrations)
- Media processing pipeline (Cameras → WebRTC → StreamAssist)

##### Important Notes

Callouts to highlight:
- No Docker/Supervisor support
- Windows-specific limitations
- Portable configuration capability
- Local voice assistant functionality

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style Definitions
    classDef ui fill:#FFA07A,stroke:#333,stroke-width:2px
    classDef core fill:#4169E1,stroke:#333,stroke-width:2px,color:white
    classDef integration fill:#98FB98,stroke:#333,stroke-width:2px
    classDef storage fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef external fill:#FF6B6B,stroke:#333,stroke-width:2px

    %% User Interface Layer
    subgraph UI["User Interface Layer"]
        Browser["Web Browser\n(Port 8123)"]:::ui
        NPP["NotePad++\nConfig Editor"]:::ui
        CLI["Command Line Interface\n(hass.cmd, reset.cmd)"]:::ui
    end

    %% Core Application Layer
    subgraph Core["Core Application Layer"]
        HA["Home Assistant Core\nv2024.4.3"]:::core
        WinPy["WinPython Runtime\nv3.12.3 64-bit"]:::core
        HassWP["HassWP Wrapper"]:::core
        MainEntry["Main Entry Point"]:::core
        Tests["Test Suite"]:::core
    end

    %% Integration Layer
    subgraph Integrations["Integration Layer"]
        HACS["HACS\nComponent Manager"]:::integration
        subgraph SmartDev["Smart Device Integrations"]
            Ergo["Ergomotion"]:::integration
            Jura["JURA Coffee"]:::integration
            Sonoff["SonoffLAN"]:::integration
            Xiaomi["XiaomiGateway3"]:::integration
            Yandex["YandexStation"]:::integration
        end
        subgraph Media["Media Processing"]
            WebRTC["WebRTC"]:::integration
            Whisper["FasterWhisper\n(STT)"]:::integration
            Stream["StreamAssist"]:::integration
        end
    end

    %% Storage Layer
    subgraph Storage["Storage Layer"]
        Config["Configuration Files\n(/config)"]:::storage
        StorageFiles["Storage Files\n(/config/.storage)"]:::storage
        MediaFiles["Media Files\n(/media, /www)"]:::storage
    end

    %% Connections
    Browser --> HA
    NPP --> Config
    CLI --> HassWP
    HassWP --> HA
    HA --> WinPy
    HA --> HACS
    HACS --> SmartDev
    HA --> Media
    WebRTC --> Stream
    Whisper --> Stream
    HA --> Config
    HA --> StorageFiles
    HA --> MediaFiles
    MainEntry --> HassWP
    Tests --> HassWP

    %% Click Events
    click HassWP "https://github.com/AlexxIT/HassWP/tree/master/hass_win"
    click MainEntry "https://github.com/AlexxIT/HassWP/blob/master/hass_win/__main__.py"
    click Tests "https://github.com/AlexxIT/HassWP/tree/master/tests"

    %% Legend
    subgraph Legend
        UI_L["User Interface"]:::ui
        Core_L["Core Components"]:::core
        Int_L["Integrations"]:::integration
        Store_L["Storage"]:::storage
    end

    %% Notes
    note["Note: No Docker/Supervisor Support\nWindows-Specific Implementation\nPortable Configuration\nLocal Voice Assistant"]
```
