# davinci05/azubireflektorscripts architecture

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

- Interactive diagram: https://gitdiagram.com/davinci05/azubireflektorscripts
- Repository: https://github.com/davinci05/azubireflektorscripts

## Overview

##### Main Components

a) Core Services:
- Movement Sensor Service
- Mirror Control Service
- Influx Data Service
- Flask Web Interface
- Pipeline Service

b) External Components:
- InfluxDB Database
- IoT Devices (in network)
- AzubiReflektor Hardware (monitor/display)

##### Component Relationships

- Movement Sensor → Mirror Control (motion data)
- IoT Devices → Influx Data Service (sensor data)
- Influx Data Service → InfluxDB (data storage)
- Flask Interface ↔ All Services (monitoring/control)
- Pipeline → All Components (updates/deployment)

##### Detailed Component Specifications

For each component, include:

Movement Sensor:
- Config file dependency
- Motion detection output
- Hardware interface

Mirror Control:
- Control interface
- Template rendering capability
- Hardware communication

Influx Data:
- Data collection endpoints
- Configuration management
- Database connection

Flask Interface:
- Web server
- Template rendering
- Service integration

Pipeline:
- Update script
- Package management
- Service restart capability

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Main Components
    subgraph Sensors
        MS[Motion Sensor System]:::input
    end

    subgraph Control
        MC[Mirror Control System]:::process
    end

    subgraph Storage
        DS[Data Storage System]:::storage
    end

    subgraph Interface
        WI[Web Interface]:::interface
    end

    subgraph Pipeline
        UP[Update Pipeline]:::pipeline
    end

    %% Connections
    MS --> MC
    MC --> DS
    MS --> WI
    MC --> WI
    DS --> WI

    %% Pipeline Connections
    UP -.-> MS
    UP -.-> MC
    UP -.-> DS
    UP -.-> WI

    %% Click Events
    click MS "https://github.com/davinci05/AzubiReflektorScripts/tree/main/movement_sensor"
    click MS "https://github.com/davinci05/AzubiReflektorScripts/blob/main/movement_sensor/main.py"
    click MC "https://github.com/davinci05/AzubiReflektorScripts/tree/main/mirrorcontrol"
    click MC "https://github.com/davinci05/AzubiReflektorScripts/blob/main/mirrorcontrol/main.py"
    click DS "https://github.com/davinci05/AzubiReflektorScripts/tree/main/influx_data"
    click DS "https://github.com/davinci05/AzubiReflektorScripts/blob/main/influx_data/main.py"
    click WI "https://github.com/davinci05/AzubiReflektorScripts/tree/main/flask"
    click WI "https://github.com/davinci05/AzubiReflektorScripts/blob/main/flask/templates/index.html"
    click UP "https://github.com/davinci05/AzubiReflektorScripts/blob/main/pipe/update.sh"

    %% Styling
    classDef input fill:#90EE90,stroke:#333,stroke-width:2px
    classDef process fill:#87CEEB,stroke:#333,stroke-width:2px
    classDef storage fill:#FFA500,stroke:#333,stroke-width:2px
    classDef interface fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef pipeline fill:#D3D3D3,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1[Input]:::input
        L2[Processing]:::process
        L3[Storage]:::storage
        L4[Interface]:::interface
        L5[Pipeline]:::pipeline
    end
```
