|
| 1 | +# Phase 7 — Production IoT Platform (NexusIoT) |
| 2 | + |
| 3 | +## 🏭 What I Built |
| 4 | + |
| 5 | +**NexusIoT** — A production-grade industrial IoT telemetry platform with real-time streaming, explainable anomaly detection, and full Kubernetes orchestration. |
| 6 | + |
| 7 | +🔗 **Full Project Repository:** [github.com/MrDadhich456/NexusIoT](https://github.com/MrDadhich456/NexusIoT) |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## Tech Stack |
| 12 | + |
| 13 | +| Layer | Technology | Purpose | |
| 14 | +|-------|-----------|---------| |
| 15 | +| **IoT Protocol** | MQTT (Mosquitto) | Device-to-cloud messaging with QoS-1 | |
| 16 | +| **Message Bus** | Apache Kafka | Durable, replayable event streaming | |
| 17 | +| **Database** | TimescaleDB | Time-series optimised PostgreSQL | |
| 18 | +| **API** | FastAPI + WebSocket | REST endpoints + real-time live streams | |
| 19 | +| **ML/XAI** | SHAP + IsolationForest | Explainable anomaly detection | |
| 20 | +| **Orchestration** | Kubernetes (minikube) | Container orchestration | |
| 21 | +| **IaC** | Terraform | AWS infrastructure as code (free tier) | |
| 22 | +| **CI/CD** | GitHub Actions | Automated lint → test → build → deploy | |
| 23 | +| **Monitoring** | Prometheus + Grafana | Metrics, dashboards, alerting | |
| 24 | + |
| 25 | +## What I Learned |
| 26 | + |
| 27 | +- **MQTT protocol** — how IoT devices communicate with QoS guarantees |
| 28 | +- **Kafka as a message bus** — decoupling producers from consumers, replay capability |
| 29 | +- **TimescaleDB hypertables** — time-series partitioning for fast range queries |
| 30 | +- **WebSocket streaming** — real-time data push from Kafka to browser (<50ms) |
| 31 | +- **SHAP explainability** — making ML models interpretable (why was this flagged?) |
| 32 | +- **Kubernetes manifests** — Deployments, StatefulSets, Services, HPA, PVCs |
| 33 | +- **Terraform provisioning** — EC2 + security groups + IAM as code |
| 34 | +- **CI/CD pipelines** — multi-stage GitHub Actions with Docker Hub + SSH deploy |
| 35 | +- **Prometheus custom metrics** — instrumenting application code for observability |
| 36 | + |
| 37 | +## Architecture |
| 38 | + |
| 39 | +``` |
| 40 | +Devices (MQTT) → Mosquitto → Kafka → Stream Processor → TimescaleDB |
| 41 | + ↓ ↓ |
| 42 | + SHAP Explainer FastAPI + WebSocket |
| 43 | + ↓ ↓ |
| 44 | + Anomaly Alerts Live Dashboard |
| 45 | +``` |
| 46 | + |
| 47 | +## Key Differentiator |
| 48 | + |
| 49 | +Unlike typical IoT projects that just collect data, NexusIoT tells you **why** an anomaly was flagged — "spindle RPM drove 68% of this anomaly" — using SHAP explainability stored as JSONB alongside every alert. |
0 commit comments