Skip to content

Repository files navigation

IndustryFlow

Real-time industrial IoT platform for sensor-data processing, anomaly detection, and predictive maintenance.

Unit tests DB tenant isolation Helm License: AGPL-3.0 Python 3.14 React 19

IndustryFlow

IndustryFlow ingests high-velocity sensor streams, processes them through Kafka and Spark into TimescaleDB, detects anomalies with ML models, and surfaces real-time alerts — with a full Prometheus / Grafana / Loki observability stack. It is multi-tenant by design (schema-per-tenant isolation) and is the platform that the IndustryGrow cultivation project is built on.

Where IndustryGrow is the tree, IndustryFlow is the ground it grows from — the gateway core at the centre, where every sensor stream converges.

Features

  • Real-time stream processing — Kafka + Apache Spark (at-least-once, idempotent writes)
  • Multi-tenant — schema-per-tenant isolation; tenants are provisioned at runtime, never hardcoded
  • ML-powered anomaly detection — pluggable detectors over engineered features
  • Time-series storage — TimescaleDB hypertables with compression
  • Configurable alerting — threshold, ML-based, and statistical model-drift rules (ADR-0021)
  • Secure by design — HTTPS everywhere, httpOnly-cookie + CSRF browser auth, and device ingestion over mutual TLS with an internal device CA
  • Extensible — domains add feature transforms and anomaly detectors as plugins without forking the core
  • Deployabledocker compose for local dev, a Helm chart for Kubernetes (self-hosted or managed datastores)
  • Full observability — Prometheus, Grafana, Loki

Quick start

git clone https://github.com/IIchukissII/industryflow
cd industryflow
cp .env.example .env          # configure secrets and ports
docker compose up -d
curl http://localhost:8000/health

# Provision your first tenant + admin (nothing is hardcoded), then sign in
scripts/create-tenant.sh "Your Company"   # prints a company_id
#   set ADMIN_USER_1_* in .env, then:  python3 scripts/seed_users.py

The frontend is served over HTTPS by its built-in TLS edge. The full setup — TLS, the first tenant/admin, API examples, and troubleshooting — is in docs/getting-started.md.

Documentation

Full index: docs/.

Interactive API docs are served at http://localhost:8000/docs when the stack is running.

Technology

Python 3.14 · FastAPI · Apache Spark 3.5 · Apache Kafka · MLflow · PostgreSQL 15 + TimescaleDB · Redis · MinIO · React 19 (Vite) · Prometheus / Grafana / Loki.

Every service image runs Python 3.14. One does not: the MLflow image is pinned to 3.11, because MLflow's server imports a stdlib name 3.14 removed (#222). It is pure-python, so its whole dependency closure resolves perfectly on 3.14 and only starting the server finds it — which is why main requires a check that boots the stack rather than one that merely builds it (ADR-0026).

Contributing

  1. Branch from main.
  2. Make changes following the existing code style (Python: ruff, configured in ruff.toml and gated in CI).
  3. Record architectural decisions as ADRs (see ADR/ADR-0000).
  4. Add tests and update the relevant docs.
  5. Open a pull request.

License

AGPL-3.0-or-later © 2026 The IndustryFlow contributors

About

Real-time Industrial IoT Platform: Sensor Data Processing, Anomaly Detection, and Predictive Maintenance

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages