# rangdev/quietfix architecture

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

- Interactive diagram: https://gitdiagram.com/rangdev/quietfix
- Repository: https://github.com/rangdev/quietfix

## Overview

QuietFix monitors industrial equipment through oneM2M: collectors publish sensor readings, analysis detects anomalies, and a backup AE manages central copies; a dashboard presents latest values. Separate capabilities add adaptive collection, per-machine ML, typed FlexContainer readings, semantic discovery, MQTT transport, and access control. The graph follows documented flows and source-index references; unsampled implementation details are not inferred beyond those references.

Main entry points: [`apps/analyzer_ae.py`](https://github.com/rangdev/quietfix/blob/main/apps/analyzer_ae.py) (Analyzer AE), [`apps/onem2m_client.py`](https://github.com/rangdev/quietfix/blob/main/apps/onem2m_client.py) (oneM2M Client), [`apps/resource_registry.py`](https://github.com/rangdev/quietfix/blob/main/apps/resource_registry.py) (Resource Registry), [`apps/collector_ae.py`](https://github.com/rangdev/quietfix/blob/main/apps/collector_ae.py) (Collector AE)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection"]
  node_collector["Collector AE<br/>[collector_ae.py]"]
  node_adaptive["Adaptive Collector"]
  node_sensor_model["Sensor Simulator"]
end

subgraph group_analysis["Analysis"]
  node_analyzer["Analyzer AE<br/>[analyzer_ae.py]"]
  node_anomaly["Anomaly Detection<br/>[ml_anomaly.py]"]
  node_ml_management["ML Management<br/>[ml_manage.py]"]
end

subgraph group_storage["oneM2M Resources"]
  node_backup["Backup Management AE<br/>[backup_ae.py]"]
end

subgraph group_interfaces["Interfaces"]
  node_dashboard["Dashboard AE<br/>[dashboard.py]"]
  node_dashboard_ui["Dashboard UI<br/>[dashboard.html]"]
end

subgraph group_shared["Shared Services"]
  node_registry["Resource Registry"]
  node_one_client["oneM2M Client<br/>[onem2m_client.py]"]
  node_device_model["Device Model<br/>[device_model.py]"]
  node_flex["FlexContainer Model<br/>[flex_model.py]"]
  node_semantics["Semantic Model<br/>[semantics.py]"]
  node_groups["Group Queries<br/>[group_queries.py]"]
  node_events["Notifications<br/>[event_worker.py]"]
  node_worker_state[("Worker State<br/>[worker_state.py]")]
  node_access["Access Control<br/>[access_control.py]"]
  node_routing["Route Guard<br/>[routing.py]"]
  node_mqtt["MQTT Client<br/>[mqtt_client.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_semantic_query["Semantic Query<br/>[semantic_query.py]"]
end

node_operator(("Operator"))
node_sensors(("Synthetic Sensors"))
node_mn[("MN-CSE")]
node_in[("IN-CSE Archive")]

node_sensors -->|"simulated by"| node_sensor_model
node_collector -->|"generates readings"| node_sensor_model
node_collector -->|"uses when enabled"| node_adaptive
node_collector -->|"publishes readings"| node_registry
node_registry -->|"stores resources"| node_mn
node_analyzer -->|"handles notifications"| node_events
node_events -.->|"wakes analysis"| node_analyzer
node_analyzer -->|"discovers machines"| node_registry
node_analyzer -->|"evaluates readings"| node_anomaly
node_analyzer -->|"tracks progress"| node_worker_state
node_analyzer -->|"reads and writes results"| node_mn
node_ml_management -->|"trains models"| node_anomaly
node_backup -->|"handles notifications"| node_events
node_backup -->|"queries central group"| node_groups
node_backup -->|"requests central copies"| node_mn
node_mn -->|"forwards over Mcc"| node_in
node_dashboard -->|"queries latest values"| node_groups
node_dashboard -.->|"serves interface"| node_dashboard_ui
node_operator -.->|"views monitoring"| node_dashboard
node_dashboard -->|"retrieves values"| node_mn
node_registry -->|"validates identities"| node_device_model
node_registry -->|"publishes typed readings"| node_flex
node_flex -->|"publishes descriptors"| node_semantics
node_semantic_query -->|"discovers resources"| node_semantics
node_collector -->|"uses transport client"| node_one_client
node_analyzer -->|"uses transport client"| node_one_client
node_backup -->|"uses transport client"| node_one_client
node_dashboard -->|"uses transport client"| node_one_client
node_one_client -->|"sends oneM2M requests"| node_mn
node_access -->|"provisions policies"| node_one_client
node_events -->|"applies subscription policy"| node_access
node_registry -->|"guards publishing"| node_routing
node_one_client -.->|"selects MQTT client"| node_mqtt
node_mqtt -.->|"exchanges oneM2M messages"| node_mn
node_collector -->|"reads settings"| node_config

click node_collector "https://github.com/rangdev/quietfix/blob/main/apps/collector_ae.py"
click node_adaptive "https://github.com/rangdev/quietfix/blob/main/apps/adaptive_collector.py"
click node_sensor_model "https://github.com/rangdev/quietfix/blob/main/apps/sensor_simulator.py"
click node_analyzer "https://github.com/rangdev/quietfix/blob/main/apps/analyzer_ae.py"
click node_anomaly "https://github.com/rangdev/quietfix/blob/main/apps/ml_anomaly.py"
click node_ml_management "https://github.com/rangdev/quietfix/blob/main/apps/ml_manage.py"
click node_backup "https://github.com/rangdev/quietfix/blob/main/apps/backup_ae.py"
click node_dashboard "https://github.com/rangdev/quietfix/blob/main/apps/dashboard.py"
click node_dashboard_ui "https://github.com/rangdev/quietfix/blob/main/apps/dashboard.html"
click node_registry "https://github.com/rangdev/quietfix/blob/main/apps/resource_registry.py"
click node_one_client "https://github.com/rangdev/quietfix/blob/main/apps/onem2m_client.py"
click node_device_model "https://github.com/rangdev/quietfix/blob/main/apps/device_model.py"
click node_flex "https://github.com/rangdev/quietfix/blob/main/apps/flex_model.py"
click node_semantics "https://github.com/rangdev/quietfix/blob/main/apps/semantics.py"
click node_groups "https://github.com/rangdev/quietfix/blob/main/apps/group_queries.py"
click node_events "https://github.com/rangdev/quietfix/blob/main/apps/event_worker.py"
click node_worker_state "https://github.com/rangdev/quietfix/blob/main/apps/worker_state.py"
click node_access "https://github.com/rangdev/quietfix/blob/main/apps/access_control.py"
click node_routing "https://github.com/rangdev/quietfix/blob/main/apps/routing.py"
click node_mqtt "https://github.com/rangdev/quietfix/blob/main/apps/mqtt_client.py"
click node_config "https://github.com/rangdev/quietfix/blob/main/apps/config.py"
click node_semantic_query "https://github.com/rangdev/quietfix/blob/main/apps/semantic_query.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_collector,node_adaptive,node_sensor_model toneBlue
class node_analyzer,node_anomaly,node_ml_management,node_mn,node_in toneAmber
class node_backup toneMint
class node_dashboard,node_dashboard_ui toneRose
class node_registry,node_one_client,node_device_model,node_flex,node_semantics,node_groups,node_events,node_worker_state,node_access,node_routing,node_mqtt,node_config,node_semantic_query,node_operator,node_sensors toneIndigo
```

## Components

### Collection

- [Collector AE](https://github.com/rangdev/quietfix/blob/main/apps/collector_ae.py): `apps/collector_ae.py`
- [Adaptive Collector](https://github.com/rangdev/quietfix/blob/main/apps/adaptive_collector.py): `apps/adaptive_collector.py`
- [Sensor Simulator](https://github.com/rangdev/quietfix/blob/main/apps/sensor_simulator.py): `apps/sensor_simulator.py`

### Analysis

- [Analyzer AE](https://github.com/rangdev/quietfix/blob/main/apps/analyzer_ae.py): `apps/analyzer_ae.py`
- [Anomaly Detection](https://github.com/rangdev/quietfix/blob/main/apps/ml_anomaly.py): `apps/ml_anomaly.py`
- [ML Management](https://github.com/rangdev/quietfix/blob/main/apps/ml_manage.py): `apps/ml_manage.py`

### oneM2M Resources

- [Backup Management AE](https://github.com/rangdev/quietfix/blob/main/apps/backup_ae.py): `apps/backup_ae.py`

### Interfaces

- [Dashboard AE](https://github.com/rangdev/quietfix/blob/main/apps/dashboard.py): `apps/dashboard.py`
- [Dashboard UI](https://github.com/rangdev/quietfix/blob/main/apps/dashboard.html): `apps/dashboard.html`

### Shared Services

- [Resource Registry](https://github.com/rangdev/quietfix/blob/main/apps/resource_registry.py): `apps/resource_registry.py`
- [oneM2M Client](https://github.com/rangdev/quietfix/blob/main/apps/onem2m_client.py): `apps/onem2m_client.py`
- [Device Model](https://github.com/rangdev/quietfix/blob/main/apps/device_model.py): `apps/device_model.py`
- [FlexContainer Model](https://github.com/rangdev/quietfix/blob/main/apps/flex_model.py): `apps/flex_model.py`
- [Semantic Model](https://github.com/rangdev/quietfix/blob/main/apps/semantics.py): `apps/semantics.py`
- [Group Queries](https://github.com/rangdev/quietfix/blob/main/apps/group_queries.py): `apps/group_queries.py`
- [Notifications](https://github.com/rangdev/quietfix/blob/main/apps/event_worker.py): `apps/event_worker.py`
- [Worker State](https://github.com/rangdev/quietfix/blob/main/apps/worker_state.py): `apps/worker_state.py`
- [Access Control](https://github.com/rangdev/quietfix/blob/main/apps/access_control.py): `apps/access_control.py`
- [Route Guard](https://github.com/rangdev/quietfix/blob/main/apps/routing.py): `apps/routing.py`
- [MQTT Client](https://github.com/rangdev/quietfix/blob/main/apps/mqtt_client.py): `apps/mqtt_client.py`
- [Configuration](https://github.com/rangdev/quietfix/blob/main/apps/config.py): `apps/config.py`
- [Semantic Query](https://github.com/rangdev/quietfix/blob/main/apps/semantic_query.py): `apps/semantic_query.py`

### Other components

- **Operator**
- **Synthetic Sensors**
- **MN-CSE**
- **IN-CSE Archive**

## Connections

- Synthetic Sensors → Sensor Simulator: simulated by
- Collector AE → Sensor Simulator: generates readings (evidence: `apps/collector_ae.py`)
- Collector AE → Adaptive Collector: uses when enabled (evidence: `apps/collector_ae.py`)
- Collector AE → Resource Registry: publishes readings (evidence: `apps/collector_ae.py`)
- Resource Registry → MN-CSE: stores resources (evidence: `README.md`)
- Analyzer AE → Notifications: handles notifications (evidence: `apps/analyzer_ae.py`)
- Notifications → Analyzer AE: wakes analysis (evidence: `README.md`)
- Analyzer AE → Resource Registry: discovers machines (evidence: `apps/analyzer_ae.py`)
- Analyzer AE → Anomaly Detection: evaluates readings (evidence: `apps/analyzer_ae.py`)
- Analyzer AE → Worker State: tracks progress (evidence: `apps/analyzer_ae.py`)
- Analyzer AE → MN-CSE: reads and writes results (evidence: `README.md`)
- ML Management → Anomaly Detection: trains models (evidence: `apps/ml_manage.py`)
- Backup Management AE → Notifications: handles notifications (evidence: `apps/backup_ae.py`)
- Backup Management AE → Group Queries: queries central group (evidence: `apps/backup_ae.py`)
- Backup Management AE → MN-CSE: requests central copies (evidence: `README.md`)
- MN-CSE → IN-CSE Archive: forwards over Mcc (evidence: `README.md`)
- Dashboard AE → Group Queries: queries latest values (evidence: `apps/dashboard.py`)
- Dashboard AE → Dashboard UI: serves interface
- Operator → Dashboard AE: views monitoring
- Dashboard AE → MN-CSE: retrieves values (evidence: `README.md`)
- Resource Registry → Device Model: validates identities (evidence: `apps/resource_registry.py`)
- Resource Registry → FlexContainer Model: publishes typed readings (evidence: `apps/resource_registry.py`)
- FlexContainer Model → Semantic Model: publishes descriptors (evidence: `apps/flex_model.py`)
- Semantic Query → Semantic Model: discovers resources (evidence: `apps/semantic_query.py`)
- Collector AE → oneM2M Client: uses transport client (evidence: `apps/collector_ae.py`)
- Analyzer AE → oneM2M Client: uses transport client (evidence: `apps/analyzer_ae.py`)
- Backup Management AE → oneM2M Client: uses transport client (evidence: `apps/backup_ae.py`)
- Dashboard AE → oneM2M Client: uses transport client (evidence: `apps/dashboard.py`)
- oneM2M Client → MN-CSE: sends oneM2M requests (evidence: `apps/onem2m_client.py`)
- Access Control → oneM2M Client: provisions policies (evidence: `apps/access_control.py`)
- Notifications → Access Control: applies subscription policy (evidence: `apps/event_worker.py`)
- Resource Registry → Route Guard: guards publishing (evidence: `apps/resource_registry.py`)
- oneM2M Client → MQTT Client: selects MQTT client (evidence: `apps/onem2m_client.py`)
- MQTT Client → MN-CSE: exchanges oneM2M messages (evidence: `apps/mqtt_client.py`)
- Collector AE → Configuration: reads settings (evidence: `apps/collector_ae.py`)
