Skip to content

Roadmap

Every system has a gap between what it knows and what it can do. RAPID AI’s gap is precisely documented: 451+ engineering rules, 320 failure modes, 100 IMS rows, 300 imperfection rules, 88 FRETTLSM factors — all defined as data. This chapter maps the path from current state to production deployment.


Where We Are (Current State — Session 9, 2026-03-26)

Section titled “Where We Are (Current State — Session 9, 2026-03-26)”
rapidai/
├── rapid/ ← RAPID AI Engine (:8000) — 1332 tests
├── horizon/ ← Horizon Dashboard (:5173) — SvelteKit canvas, bits-ui, SSR
├── sense/ ← RAPID Sense — sensor-agnostic data pipeline
│ ├── backend/ ← FastAPI (:8001) — 44 tests (ingest, DSP, bridge, pairing)
│ └── mobile/ ← SenseMobile PWA on CF Workers — 129 DSP tests
├── contracts/ ← OpenAPI SSOT chain (Pydantic → OpenAPI → TypeScript)
├── infra/ ← Docker + Dockerfiles
└── docs/ ← This documentation (30+ chapters)
ComponentStatusTestsDetail
Five-module pipeline (A→E)Complete1332Signal → Faults → Fusion → Prognostics → Maintenance
Rule evaluatorComplete263 active (126 component + 121 signal + 16 guard)
SEDL entropy + SSI fusionComplete22 BSR rules, 4 system states
AI diagnostician (DDE)CompleteGemini-powered narrative reports
Horizon canvas dashboardComplete0 errorsRoute-per-level SvelteFlow, edit lock, bits-ui
RAPID Sense backendComplete44Ingest, DSP, quality, bridge, pairing, sessions
SenseMobile PWALive129Dual-sensor capture, session flow, ISO gauge
Contract layer (SSOT)CompletePydantic → OpenAPI → TypeScript types
Auth + RBACCompletebetter-auth, 4 roles, admin-only creation
PostgreSQL + pgvectorComplete15 domain tables, Drizzle migrations
Docker ComposeComplete3-service stack with hot-reload

SenseMobile PWA — Live at rapid-sense.rdtect.workers.dev

Section titled “SenseMobile PWA — Live at rapid-sense.rdtect.workers.dev”
FeatureStatus
Accelerometer capture (60Hz)
Microphone capture (44.1kHz)
Dual-sensor mode (accel + mic)
Client-side DSP (RMS, peak, kurtosis, FFT, ISO)
Session-based multi-capture
IndexedDB offline buffer + sync
QR-based sensor pairing
bits-ui Dialog + Tabs
View transitions
iOS PWA meta tags + safe areas
CSP security headers
SPA deep-link fallback
Memory caps (5min accel, 2min mic)
Snapshot state preservation
prefers-reduced-motion
CF Workers ← SenseMobile PWA (static SPA, edge-distributed)
VPS (Coolify) ← RAPID Engine (:8000) + Sense Backend (:8001) + Horizon (:5173)
PostgreSQL ← Shared DB (pgvector, Drizzle migrations)

Phase 1: Sense Excellence (Current Sprint — Session 10)

Section titled “Phase 1: Sense Excellence (Current Sprint — Session 10)”

Goal: Make RAPID Sense impeccable — the best phone vibration tool in the market.

  • Fix @lucide/svelte path imports (dev performance)
  • Add rollup-plugin-visualizer (bundle analysis)
  • Wire make contracts-check to CI (prevent drift)
  • Evaluate Chart.js → uPlot (-160KB, faster signal rendering)
  • Expand Sense backend tests (44 → 80%+ coverage)
  • Consolidate 3 spectrum chart variants → 1 configurable component
  • Accessibility pass: ARIA on all canvas elements, labels on inputs
  • Component tests for capture flow (@testing-library/svelte)
  • Home page: show RMS/Zone/Duration instead of Samples/Hz
  • First-time onboarding (Pair → Capture → Sync, 3-step flow)
  • Add svelte-sonner for toast notifications
  • Move sensor ID from Home to Settings
  • Screening mode notice: move from Home to Capture page
  • PWABuilder → TWA wrapper for Google Play ($25 dev fee)
  • Verify Lighthouse score ≥ 80 (PWABuilder requirement)
  • Add maskable icon with proper padding

Goal: Client-side ML for instant fault classification without backend roundtrip.

Training (Python, server-side):
Labeled FFT spectra → train CNN classifier
→ bearing defect / imbalance / misalignment / looseness / normal
→ export SavedModel → tensorflowjs_converter → model.json
Inference (browser, Web Worker):
Phone capture → FFT → tf.loadLayersModel() → predict()
→ instant fault classification (no network needed)
→ cross-validate with RAPID Engine result when online
  • Collect labeled training data from RAPID Engine diagnoses
  • Train fault classifier (Python, ~5 classes)
  • Export to TensorFlow.js format
  • Load in Web Worker (off main thread)
  • Show instant diagnosis on capture screen
  • Sync with RAPID Engine for validation
  • 2-phase calibration: machine OFF (noise floor) → machine ON (signal)
  • Speech detection: formant analysis (F1=300-900Hz, F2=900-2500Hz)
  • Spectral subtraction: machine PSD - ambient PSD = diagnostic signal
  • Cross-validation: accel + mic agreement → confidence boost
  • Audio harmonic analysis → detect fundamental frequency
  • Map to RPM (f × 60)
  • Auto-position harmonic cursors on FFT spectrum
  • Verify against manual RPM input

Phase 3: Video Vibration — The Third Sensor

Section titled “Phase 3: Video Vibration — The Third Sensor”

Goal: Camera-based displacement measurement via Eulerian Video Magnification.

Accel (60Hz) → severity, low-freq faults
Mic (44.1kHz) → bearing defects, gear mesh, envelope
Camera (120fps) → visual displacement, sub-pixel tracking
Three-signal cross-validation → highest confidence diagnosis
  • Capture 5s video of machine surface (getUserMedia)
  • OpenCV.js (WASM) for frame extraction + optical flow
  • Phase-based motion extraction → displacement time series
  • FFT of displacement → vibration frequencies (0-60 Hz)
  • Cross-validate: camera displacement vs accelerometer at overlapping frequencies
  • Motion magnification visualization (show invisible vibration)
  • MIT Eulerian Video Magnification (Rubinstein et al.)
  • Real-time mobile motion amplification (arXiv:2206.08422)
  • OpenCV.js WASM compilation for browser

Goal: Support any vibration sensor, not just phones.

Tier 1: Phone built-in (free)
├── Accelerometer (60Hz) — screening
├── Microphone (44.1kHz) — contact vibration
├── Camera (30-120fps) — visual displacement
└── TensorFlow.js — on-device ML
Tier 2: USB-C External ($200-500)
├── Digiducer 333D01 — piezoelectric, 1Hz-20kHz
├── Any USB-C accelerometer — shows up as audio input
└── Same Web Audio API code path — zero additional code
Tier 3: BLE Wireless ($300-2500)
├── SKF QuickCollect — Web Bluetooth API
├── Custom MEMS (ADXL345 + nRF52) — DIY $50 sensor
└── New code path (Web Bluetooth)
Tier 4: Industrial Integration
├── MQTT → Sense Backend (RPi + MEMS agents)
├── OPC-UA → adapter service
├── CSV/WAV upload through Horizon UI
└── SCADA historian adapters
  • Capacitor wrapper for App Store + Play Store
  • CoreMotion access (100Hz vs browser 60Hz)
  • Background sensor recording
  • Push notifications for analysis results

Goal: Sense data visible on the factory canvas.

  • Machine nodes show connected sensors (green/yellow/red)
  • Latest reading sparkline on machine cards
  • Click → full analysis view (severity, FFT, trend)
  • SSE stream: real-time RMS updates from Sense backend
  • Session compose → POST to RAPID Engine → display diagnosis
  • Drill-down: machine → component → sensor → reading history

  • Fleet-level SSI overview: all assets across all plants
  • Comparative analysis: same equipment type across plants
  • Worst-first ranking by failure probability
  • Plant dependency graph visualization
  • Self-service tenant provisioning
  • Asset import wizard (CSV → registry → sensor mapping)
  • Guided IMS configuration
  • Onboarding validation with sample data
  • Package rules by industry vertical
  • Version-controlled rule packs
  • Install/upgrade/rollback workflow

LayerLanguageRationale
Engine (Ring 0)PythonNumPy/SciPy DSP, physics rules, ML training
Server (Ring 1)Python (FastAPI)Best REST framework, Pydantic validation
Frontend (Ring 2)TypeScript (SvelteKit)Svelte 5 runes, canvas-first UI
PWA (Ring 2)TypeScript (SvelteKit)Client-side DSP, TF.js inference
Contract bridgeOpenAPIPydantic → JSON → TypeScript types
ServicePlatformRationale
SenseMobile PWACF WorkersStatic SPA, edge, SPA fallback
RAPID EngineVPS (Coolify)PostgreSQL, long-running DSP
Sense BackendVPS (Coolify)DB writes, service-to-service calls
HorizonVPS (Coolify)SSR, SSE streams, better-auth
LibraryProductPurpose
fft.jsSense PWAClient-side FFT (phone data)
TensorFlow.jsSense PWA (future)On-device fault classification
OpenCV.jsSense PWA (future)Video-based vibration
bits-uiBoth frontendsHeadless UI primitives (a11y)
@xyflow/svelteHorizonFactory canvas
Chart.js → uPlotBoth (migration)Signal visualization
SvelteKitPWASense PWAService worker + manifest

  1. When to adopt SvelteKit remote functions? Experimental but powerful. Wait for stable release, then migrate Horizon BFF.
  2. uPlot vs Chart.js: Run bundle analysis first, then decide. uPlot is 4x smaller but less feature-rich.
  3. Shared UI package (@rapidai/ui): Trigger when SeverityGauge appears in both apps (Rule of Three).
  4. ARQ for swarm task queue: Only when /agent SSE endpoint goes live.
  5. Capacitor vs PWABuilder: PWABuilder first (free, zero code changes), Capacitor when CoreMotion needed.

StandardRelevance
ISO 13374Condition monitoring — full 6-level compliance target
ISO 55000/55001Asset management maturity model
ISO 10816-1Vibration severity classification (implemented in Sense PWA)
VersionDateAuthorChanges
3.0.02026-03-26Rick DComplete rewrite: added RAPID Sense, multi-sensor strategy, ML roadmap, video vibration, deployment architecture, technology decisions
2.1.02026-03-17Rick DAdded standards alignment, living doc metadata, changelog
2.0.02026-03-17Rick DEnriched with production codebase content
1.0.02026-03-17Rick DInitial chapter creation