NOTQIN / Smartex
Cross-project propagation
NOTQIN Replay Fixture Discipline Propagation Spec 2026-06-30 adapts SijiLab replay-fixture discipline to one demo-critical telemetry path.
Deployment propagation
NOTQIN Demo Deployment Gate Propagation Spec 2026-06-30 adapts Wellys-PV deployment-gate findings to a lightweight NOTQIN demo/pilot gate.
Frontend safety propagation
NOTQIN Frontend Demo Safety Gate Propagation Spec 2026-06-30 adapts Wellys-PV frontend safety lessons to the selected NOTQIN demo path.
Current execution spec
NOTQIN Execution Spec 2026-06-29 drives the July-August repo work: event-derived prospect focus, first outreach assets, demo readiness, and the narrow-wedge boundary.
⚠️ 2026-06-28 audit: Repo has been consolidated into
C:\Users\21260\IdeaProjects\smartexmonorepo. Old pathC:\Users\21260\IdeaProjects\notqinis abandoned.
1. Project Summary
A full-stack Industrial Intelligence platform — 18 apps + 10 services + 13 packages in a monorepo. Real-time IoT telemetry (36 machine types, 6 sectors), MQTT, Apache Flink stream processing, InfluxDB 3 Core time-series, 13 Grafana dashboards, 48-tool Claude AI analyst, CBAM carbon engine, factory MES (NestJS), DataOps orchestrator, edge pilot kit, and Kubernetes deployment with 53 manifests.
2. Architecture
Monorepo Structure
C:\Users\21260\IdeaProjects\smartex/
├── apps/ 18 applications
│ ├── analyst-service/ Python FastAPI — 48-tool NL Q&A, SSE, multi-sector
│ ├── anomaly-service/ Python FastAPI — 96 rules, MQTT consumer, Redis cache
│ ├── state-service/ Python FastAPI — digital twin, sub-ms reads
│ ├── factory-api/ NestJS + Prisma — MES/MOM (batches, materials, quality, planning)
│ ├── factory-app/ React + Vite — customer dashboard (i18n FR/EN/AR, AI Assistant)
│ ├── forge-api/ NestJS — provisioner management, plugin registry
│ ├── forge-app/ React — internal ops console
│ ├── mcp-server/ TypeScript — MCP proxy (120+ factory tools)
│ ├── orchestrate-service/ Python — DataOps engine (40+ connectors, 29 pipeline configs)
│ ├── ingestion-service/ Python — pluggable OT adapters (OPC UA, Modbus, S7, Sparkplug)
│ ├── provisioner-service/ TypeScript/Python — auto-provision droplet in ~5 min
│ ├── site-simulator/ Python — per-customer site simulation
│ └── ...
├── services/ 10 notqin-* services
│ ├── notqin-mcp-server/ Python MCP (stdio transport done, SSE deferred)
│ ├── notqin-spb-validator/ Rust — Sparkplug B validator + SIEM
│ │ └── ... (context-graph, cra-attest, edge-updater, euro-map-bridge, etc.)
├── packages/ 13 shared packages
│ ├── cbam-engine/ CBAM Phases 1–7, EF resolver, CN-code resolver
│ ├── agent-core/ AI agent infrastructure
│ ├── sector-packs/ ~28 sector packs (aeronautics, automotive, cement, steel, textile, agri, pharma, mining)
│ ├── knowledge-spine/ Per-customer pgvector RAG
│ └── ...
└── k8s/ 53 Kubernetes manifests (Kustomize, RBAC, Loki, AlertManager, cert-manager)
Data Pipeline (Main)
ESP32 Sensors / S7 PLC / OPC UA / Modbus TCP
↓ MQTT (Mosquitto TLS 8883 or EMQX HA cluster)
Apache NiFi 2.8 (route/filter/transform)
↓
Apache Flink 2.2.1 (BearingAnomalyJob, 10s tumbling window, EWMA)
↓
InfluxDB 3 Core (multi-DB: telemetry / telemetry_1m / telemetry_1h, SQL queries, Python downsampling jobs)
↓
Grafana 12.3 (13 dashboards + Unified Alerting rules)
↓
Claude AI Analyst (48 tools: telemetry trends, incident investigation, evidence graph, AAS, energy)
Supporting Services
| Service | Stack | Purpose |
|---|---|---|
| Anomaly Service | Python FastAPI | 96 rules across 23 machine types, MQTT consumer, 60s cooldown |
| State Service | Python FastAPI + Redis 8.8 | Digital twin, sub-ms fleet status |
| Analyst Service | Python FastAPI + Claude API | 48 tools, SSE streaming, incident investigation |
| ML Shadow | Python Random Forest | Shadow inference pipeline, MQTT → InfluxDB |
| Telegraf 1.33 | Go | MQTT → InfluxDB + Kafka bridge |
| InfluxDB Jobs | Python 3.12 | Downsampling (1m/1h), OEE computation |
3. Current Status
Last commit: Jun 20, 2026 (8 days ago) — fix(deploy): complete authenticated evidence bridge
Active branch: master
Total commits: 436
Scale
| Metric | Value |
|---|---|
| Apps | 18 |
| Services | 10 |
| Packages | 13 |
| Machine types (code) | 36 across 6 sectors |
| Machine types (deployed in compose) | 23 across 4 sectors |
| Sectors in compose | 4 (aeronautics, textile, agri-food, cement) |
| Sectors in code | 6 (+ steel, automotive) |
| Anomaly rules | 96 |
| Analyst tools | 48 |
| Grafana dashboards | 13 + alerting rules |
| Kubernetes manifests | 53 |
| Docker Compose files | 14 |
| Pipeline configs | 29 |
| Test files | 268 |
Version Changes (since Apr 2026 vault note)
| Component | Old | New |
|---|---|---|
| InfluxDB | 2.7 | 3 Core (major upgrade — Flux replaced by SQL + Python jobs) |
| Grafana | 11.3 | 12.3 |
| Redis | 7 | 8.8 |
| Flink | — | 2.2.1 |
| NiFi | — | 2.8.0 |
| Prometheus | — | 3.9.0 |
| Telegraf | — | 1.33 |
4. What Is Built
Core Infrastructure
- ✅ Docker Compose full stack (22 services, health checks)
- ✅ MQTT pub/sub with TLS (Mosquitto 8883 + WS 8084)
- ✅ EMQX HA overlay (3-node cluster + HAProxy)
- ✅ Kafka 4.3 KRaft overlay (dual-write Telegraf, Kafka UI)
- ✅ InfluxDB 3 Core (3 databases, Python downsampling jobs, OEE)
- ✅ Grafana provisioning (13 dashboards, alerting rules, datasources)
- ✅ Prometheus scraping (Telegraf, Flink, anomaly, state, analyst)
- ✅ Kubernetes manifests (53 files, Kustomize, HPA, Loki, AlertManager)
- ✅ NiFi canvas (MQTT → route → filter → publish)
Application Services
- ✅ Analyst Service: 48 tools, Dockerfile deployed, SSE streaming
- ✅ Anomaly Service: 96 rules, MQTT subscriber, Prometheus metrics
- ✅ State Service: Redis digital twin, FastAPI, sub-ms lookups
- ✅ ML Shadow: Random Forest inference, MQTT → InfluxDB
- ✅ Flow-server: Directed graph execution engine
- ✅ Provisioner Service: auto-deploy droplet in ~4 min
- ✅ Factory API: NestJS MES/MOM (42 Prisma models)
- ✅ Factory App: React customer dashboard (i18n FR/EN/AR)
- ✅ MCP Server: 120+ factory tools
- ✅ Ingestion Service: 5 adapters with tests (OPC UA, Modbus TCP, Sparkplug B, CSV/DB, retrofit)
Simulator
- ✅ 6 sectors, 36 machine types in code
- ✅ 4 sectors deployed in main compose
- ✅ 1Hz realistic telemetry per machine
- ✅ Steel + Automotive sectors: code complete, not yet in main compose
Edge & Field
- ✅
notqin-edge-pilot: Siemens S7 + Raspberry Pi edge kit - ✅
notqin-workbench: Team-facing web app (React/FastAPI/Keycloak) - ✅
smartex-grid: Smart Grid energy forecasting - ✅
temasa-twin: TEMASA digital twin plant simulator
5. Known Gaps (2026-06-28)
| Gap | Status |
|---|---|
| InfluxDB backup/DR strategy | ✅ Documented — docs/influxdb-backup-dr.md (rclone, RPO/RTO, recovery scenarios). Implementation pending. |
| 10,000 msg/sec load test | ❌ Not run |
| MQTT TLS for internal traffic (simulator ↔ broker still plain) | ❌ Still a gap |
| OT write-back (INV-01) | ❌ Intentionally fenced (NASSAA research) |
| MCP server SSE transport | 🟡 stdio done, SSE deferred |
| Steel + Automotive sectors in main compose | 🟡 Code exists, not wired |
| Some notqin-* services (cra-attest, edge-updater, euromap-bridge) | 🟡 Partial scaffolds |
6. Next Actions
- Run and document load test at 10,000 msg/sec
- Document InfluxDB backup + disaster recovery strategy
- Fix MQTT TLS for internal traffic (simulator → broker)
- Wire Steel + Automotive sectors into main compose
- Complete MCP server SSE transport
- Close remaining notqin-* service scaffolds