Tech stack for an IoT telemetry platform (2026)
Factory sensor monitoring, designed by StackPrism from one sentence: 14 components, a reason for each, and the live checks that watch them.
The stack
Next.js
MinIO
WebSocket
Redis
- TimescaleDB
PostgreSQL
- Keycloak
Grafana
- Grafana Loki
Prometheus
“An IoT platform that collects temperature and vibration readings from 50,000 factory sensors every few seconds over MQTT, stores the time series for a year, alerts engineers when a machine looks abnormal, and shows live dashboards.”
Their answers on the constraints step
- Lock-in
- Prefer open source and portable
Make it yours. Open this stack in the editor to check its health, harden it and hand it to your coding agent. No sign-up, nothing to generate.
Start from this stackSelect a component to see what it does and what it connects to, or pick one above to see what breaks if it goes down. Pinch or use the buttons to zoom.
Why this stack
Sensors publish readings over MQTT to a broker running in the company’s own Kubernetes cluster. A telemetry processor reads every topic, writes the readings to TimescaleDB, a PostgreSQL extension for time series, keeps the latest values in Redis and passes them to an alert worker that checks each machine’s rules. Engineers watch live dashboards in a Next.js frontend, which gets history from the backend API and live updates from a WebSocket service. Every piece can run in any cloud or on the factory’s own servers, which is what the portability answer asked for: Keycloak for sign-in, MinIO for files, and Prometheus, Grafana and Loki to watch the platform itself.
Why each piece
All 14 components on the diagram: what each one does, what it talks to, and what stops if it goes down.
Next.js Frontend
Engineer dashboard. Calls Backend API (queries) and WebSocket Service (subscribes).
Nothing else on the diagram depends on it.
MinIO
Runs on Kubernetes
Object storage.
Nothing else on the diagram depends on it.
Alert Worker
Runs on Kubernetes
Alerting and escalation. Calls PostgreSQL (rules), Redis (dedups), WebSocket Service (state) and Keycloak (auth). Called by Telemetry Processor (events).
If it goes down, 1 of 13 components degrades.
Backend API
Runs on Kubernetes, in Core Services
REST/GraphQL API. Calls Keycloak (auth), PostgreSQL (reads), TimescaleDB (queries) and Redis (reads). Called by Next.js Frontend (queries).
If it goes down, 1 of 13 components stops working.
WebSocket Service
Runs on Kubernetes, in Core Services
Live updates. Called by Next.js Frontend (subscribes), Alert Worker (state) and Telemetry Processor (updates).
If it goes down, 3 of 13 components degrade.
MQTT Broker
Runs on Kubernetes, in Core Services
Mosquitto or EMQX. Calls Telemetry Processor (topics).
Nothing else on the diagram depends on it.
Telemetry Processor
Runs on Kubernetes, in Core Services
Stream processor. Calls Alert Worker (events), TimescaleDB (writes), PostgreSQL (enriches), Redis (caches) and WebSocket Service (updates). Called by MQTT Broker (topics).
If it goes down, 1 of 13 components degrades.
Redis
Runs on Kubernetes
Hot dashboard cache. Called by Alert Worker (dedups), Backend API (reads) and Telemetry Processor (caches).
If it goes down, 3 of 13 components degrade.
TimescaleDB
Runs on Kubernetes, in Databases
Time-series store. Called by Backend API (queries) and Telemetry Processor (writes).
If it goes down, 3 of 13 components stop working and 1 degrades.
PostgreSQL
Runs on Kubernetes, in Databases
Operational database. Called by Alert Worker (rules), Backend API (reads) and Telemetry Processor (enriches).
If it goes down, 4 of 13 components stop working and 1 degrades.
Keycloak
Auth and RBAC. Called by Backend API (auth) and Alert Worker (auth).
If it goes down, 3 of 13 components stop working and 1 degrades.
Grafana
Runs on Kubernetes, in Metrics
Metrics dashboards. Calls Prometheus (reads).
Nothing else on the diagram depends on it.
Loki
Runs on Kubernetes
Log aggregation.
Nothing else on the diagram depends on it.
Prometheus
Runs on Kubernetes, in Metrics
Metrics collection. Called by Grafana (reads).
If it goes down, 1 of 13 components degrades.
When this stack fits
- Tens of thousands of devices send small readings every few seconds.
- You want to run in your own cluster, in any cloud or on-premises.
- Engineers need live dashboards and alerts while a machine is still running.
When to pick something else
- No one on the team runs Kubernetes and databases: a managed IoT and time-series service is less work, at the cost of lock-in.
- Readings arrive once a minute or less: plain PostgreSQL can store them without a time-series extension.
What you need to build this
14 components across 7 areas of the stack.
Build it with your AI agent
Hand the stack to Claude Code, Codex, Cursor or any coding agent as a brief: how it connects, install steps and a build plan.
Frontend1
- Docs
Next.js Frontend
Engineer dashboard
npm install next
Backend & APIs5
MQTT Broker
Mosquitto or EMQX
Telemetry Processor
Stream processor
Backend API
REST/GraphQL API
WebSocket Service
Live updates
Alert Worker
Alerting and escalation
Data2
TimescaleDB
Time-series store
- Docs
PostgreSQL
Operational database
Cache & queues1
- Docs
Redis
Hot dashboard cache
Auth1
- Docs
Keycloak
Auth and RBAC
Storage & CDN1
MinIO
Object storage
Observability3
Install
npm install next
SDKs only. Pick your own database driver or ORM.