How anur01/softwaredevproject_ml-kem works
This repository is a simulated legacy sensor-to-cloud telemetry system modernized with ML-KEM on the gateway–cloud hop. Its main workflow is sensor readings framed and encrypted by a constrained device, validated and forwarded by the gateway, then ingested and exposed by the cloud. The graph also preserves the documented legacy rollback path, cloud dashboard and APIs, operator health/metrics, shared logging, and baseline measurement capability. Some endpoint and forwarding details are unsampled; those relationships are included only where the README or source index supports them.
Main entry points: app.py Telemetry API · gateway.py Cloud forwarding · protocol.py Legacy framing · admin.py Gateway admin
Components 19
Legacy device
- Sensor simulator
legacy_device/device.py - Legacy framing
legacy_device/protocol.py
Edge gateway
- Frame ingest
edge_gateway/gateway.py - Replay checks
edge_gateway/gateway.py - Cloud forwarding
edge_gateway/gateway.py - Gateway admin
edge_gateway/admin.py
Cloud service
- Telemetry API
cloud_service/app.py - Reading store
cloud_service/app.py - Live dashboard
cloud_service/static/dashboard.html
Secure channels
- ML-KEM handshake
pqc_channel/channel.py - Session encryption
pqc_channel/channel.py - Legacy cloud path
edge_gateway/gateway.py
Operations
- Cloud metrics
observability/metrics.py - Gateway metrics
observability/metrics.py - Structured logging
observability/logs.py - Baseline measurements
tools/baseline.py
Other components
- Sensor device
- Operator
- Metrics scraper
Connections 26
- Sensor device → Sensor simulator: starts
README.md - Sensor simulator → Legacy framing: builds frames
legacy_device/device.py - Legacy framing → Frame ingest: sends TCP frames
README.md - Frame ingest → Legacy framing: decodes frames
edge_gateway/gateway.py - Frame ingest → Replay checks: checks sequence
README.md - Frame ingest → Cloud forwarding: forwards reading
README.md - Cloud forwarding → ML-KEM handshake: establishes session
edge_gateway/gateway.py - ML-KEM handshake → Telemetry API: requests key and session
README.md - Cloud forwarding → Session encryption: seals readings
README.md - Cloud forwarding → Telemetry API: posts sealed telemetry
README.md - Telemetry API → ML-KEM handshake: decapsulates session
cloud_service/app.py - Telemetry API → Session encryption: opens messages
README.md - Telemetry API → Reading store: stores readings
cloud_service/app.py - Operator → Telemetry API: queries APIs
README.md - Telemetry API → Live dashboard: serves dashboard
README.md - Cloud forwarding → Legacy cloud path: selects rollback mode
README.md - Legacy cloud path → Telemetry API: posts legacy readings
README.md - Gateway admin → Gateway metrics: renders metrics
edge_gateway/admin.py - Cloud forwarding → Gateway admin: provides gateway status
edge_gateway/gateway.py - Telemetry API → Cloud metrics: exposes metrics
cloud_service/app.py - Metrics scraper → Telemetry API: scrapes metrics
README.md - Metrics scraper → Gateway admin: scrapes metrics
README.md - Frame ingest → Structured logging: logs events
edge_gateway/gateway.py - Telemetry API → Structured logging: logs events
cloud_service/app.py - Baseline measurements → Legacy framing: measures baseline
tools/baseline.py - Baseline measurements → Session encryption: measures PQC costs
tools/baseline.py