# themarck/hermesys architecture

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

- Interactive diagram: https://gitdiagram.com/themarck/hermesys
- Repository: https://github.com/themarck/hermesys

## Overview

HermeSys is an edge-to-cloud telemetry pipeline. Its principal workflow publishes readings from a configurable source over MQTT, passes them through Telegraf for validation and metric standardization, streams them through Kafka, and analyzes them in a consumer that maintains current field state and checks configured thresholds. The README also describes downstream data management, but the available tree does not show a corresponding implementation. Telegraf and broker behavior is based on README documentation and configuration filenames; those configuration contents were not sampled.

Main entry points: [`telegraf.conf`](https://github.com/themarck/hermesys/blob/main/telegraf.conf) (Telegraf ingestion), [`kafka_consumer.py`](https://github.com/themarck/hermesys/blob/main/kafka_consumer.py) (Kafka consumer), [`docker-compose.yml`](https://github.com/themarck/hermesys/blob/main/docker-compose.yml) (Kafka stream), [`producer_energy.py`](https://github.com/themarck/hermesys/blob/main/producer_energy.py) (Telemetry producer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_acquisition["Data Acquisition"]
  node_producer["Telemetry producer<br/>[producer_energy.py]"]
end

subgraph group_ingestion["Ingestion"]
  node_mqtt["MQTT broker<br/>[mosquitto.conf]"]
  node_telegraf["Telegraf ingestion<br/>[telegraf.conf]"]
  node_validation["JSON validation<br/>[telegraf.conf]"]
  node_standardization["Metric standardization<br/>[telegraf.conf]"]
end

subgraph group_streaming["Streaming"]
  node_kafka[("Kafka stream<br/>[docker-compose.yml]")]
end

subgraph group_analysis["Telemetry Analysis"]
  node_consumer["Kafka consumer<br/>[kafka_consumer.py]"]
  node_state["Telemetry state<br/>[kafka_consumer.py]"]
  node_thresholds["Threshold analysis<br/>[kafka_consumer.py]"]
  node_metrics["Operational information"]
end

node_source(("API or dataset"))
node_data_management["Data management"]

node_source -.->|"supplies readings"| node_producer
node_producer -->|"publishes readings"| node_mqtt
node_mqtt -->|"provides telemetry"| node_telegraf
node_telegraf -->|"validates JSON"| node_validation
node_telegraf -->|"standardizes metrics"| node_standardization
node_validation -->|"forwards valid data"| node_kafka
node_standardization -->|"forwards metrics"| node_kafka
node_kafka -->|"streams messages"| node_consumer
node_consumer -->|"updates fields"| node_state
node_consumer -->|"checks limits"| node_thresholds
node_thresholds -->|"produces status"| node_metrics
node_metrics -.->|"supports integration"| node_data_management

click node_producer "https://github.com/themarck/hermesys/blob/main/producer_energy.py"
click node_mqtt "https://github.com/themarck/hermesys/blob/main/mosquitto.conf"
click node_telegraf "https://github.com/themarck/hermesys/blob/main/telegraf.conf"
click node_validation "https://github.com/themarck/hermesys/blob/main/telegraf.conf"
click node_standardization "https://github.com/themarck/hermesys/blob/main/telegraf.conf"
click node_kafka "https://github.com/themarck/hermesys/blob/main/docker-compose.yml"
click node_consumer "https://github.com/themarck/hermesys/blob/main/kafka_consumer.py"
click node_state "https://github.com/themarck/hermesys/blob/main/kafka_consumer.py"
click node_thresholds "https://github.com/themarck/hermesys/blob/main/kafka_consumer.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_producer toneBlue
class node_mqtt,node_telegraf,node_validation,node_standardization toneAmber
class node_kafka,node_source toneMint
class node_consumer,node_state,node_thresholds,node_metrics toneRose
class node_data_management toneIndigo
```

## Components

### Data Acquisition

- [Telemetry producer](https://github.com/themarck/hermesys/blob/main/producer_energy.py): `producer_energy.py`

### Ingestion

- [MQTT broker](https://github.com/themarck/hermesys/blob/main/mosquitto.conf): `mosquitto.conf`
- [Telegraf ingestion](https://github.com/themarck/hermesys/blob/main/telegraf.conf): `telegraf.conf`
- [JSON validation](https://github.com/themarck/hermesys/blob/main/telegraf.conf): `telegraf.conf`
- [Metric standardization](https://github.com/themarck/hermesys/blob/main/telegraf.conf): `telegraf.conf`

### Streaming

- [Kafka stream](https://github.com/themarck/hermesys/blob/main/docker-compose.yml): `docker-compose.yml`

### Telemetry Analysis

- [Kafka consumer](https://github.com/themarck/hermesys/blob/main/kafka_consumer.py): `kafka_consumer.py`
- [Telemetry state](https://github.com/themarck/hermesys/blob/main/kafka_consumer.py): `kafka_consumer.py`
- [Threshold analysis](https://github.com/themarck/hermesys/blob/main/kafka_consumer.py): `kafka_consumer.py`
- **Operational information**

### Other components

- **API or dataset**
- **Data management**

## Connections

- API or dataset → Telemetry producer: supplies readings
- Telemetry producer → MQTT broker: publishes readings
- MQTT broker → Telegraf ingestion: provides telemetry
- Telegraf ingestion → JSON validation: validates JSON
- Telegraf ingestion → Metric standardization: standardizes metrics
- JSON validation → Kafka stream: forwards valid data
- Metric standardization → Kafka stream: forwards metrics
- Kafka stream → Kafka consumer: streams messages
- Kafka consumer → Telemetry state: updates fields
- Kafka consumer → Threshold analysis: checks limits
- Threshold analysis → Operational information: produces status
- Operational information → Data management: supports integration
