wifi-densepose/ui
arsen e53a2e1f5c feat(adr-121): mmWave radar pill in raw.html top bar
Adds a hidden-by-default ๐Ÿ“ก mmWave pill next to the global badge + CV
stat. Polls /api/v1/mmwave/latest at 5 Hz (~200 ms) โ€” well above the
HLK-LD2402's 6 Hz native cadence so no information is lost. Pill shows:

  ๐Ÿ“ก mmWave 152 cm ยท 60 ms

Distance + age (ms since last reading). Fades to 50% opacity when age
>1.5 s, hides entirely when the server reports `available: false`
(port absent or stale >2 s).

Synced both copies โ€” ui/raw.html (deploy mirror) + static/raw.html
(canonical source referenced by ADR-104 / ADR-107).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 11:54:54 +07:00
..
components feat(adr-121): HLK-LD2402 mmWave radar live readout in UI 2026-05-18 11:27:28 +07:00
config fix(ui): WebSocket protocol matches page protocol, not hostname (#272) 2026-03-16 11:35:11 -04:00
mobile deploy(esp32s3): fix DSP, OTA, discovery, mobile WS for room01/room02 2026-05-14 18:56:04 +07:00
observatory fix: brighten ambient light color and increase multiplier for room brightness slider 2026-03-05 10:56:37 -05:00
pose-fusion brand: rename DensePose to RuView in pose-fusion UI 2026-03-12 21:55:09 -04:00
services feat: dynamic classifier classes, per-node UI, XSS fix, RSSI fix 2026-03-27 21:21:15 -07:00
tests updates 2025-06-07 13:55:28 +00:00
utils feat: cross-node fusion + DynamicMinCut + RSSI tracking (v0.5.3) 2026-03-30 21:55:44 -04:00
README.md chore(repo): rename rust-port/wifi-densepose-rs โ†’ v2/ (flatten to one level) (#427) 2026-04-25 21:28:13 -04:00
TEST_REPORT.md I've successfully completed a full review of the WiFi-DensePose system, testing all functionality across every major 2025-06-09 17:13:35 +00:00
app.js fix: complete sensing server API, WebSocket connectivity, and mobile tests (#125) 2026-03-03 13:27:03 -05:00
index.html feat(adr-117): process hygiene + pose path honesty + audit sweep 2026-05-17 19:24:04 +07:00
observatory.html docs: update README with ADR-045โ€“048, Observatory, adaptive classifier, AMOLED display 2026-03-05 10:20:48 -05:00
pose-fusion.html brand: rename DensePose to RuView in pose-fusion UI 2026-03-12 21:55:09 -04:00
raw.html feat(adr-121): mmWave radar pill in raw.html top bar 2026-05-18 11:54:54 +07:00
start-ui.sh docs: Revamp README and UI documentation; enhance CLI usage instructions and API configuration details 2025-06-07 13:40:52 +00:00
style.css docs: CHECKLIST sweep + .gitignore session artifacts + UI CSS catchup 2026-05-18 10:32:39 +07:00
viz.html feat: Add Three.js visualization entry point and data processor 2026-02-28 06:29:28 +00:00

README.md

WiFi DensePose UI

A modular, modern web interface for the WiFi DensePose human tracking system. Provides real-time monitoring, WiFi sensing visualization, and pose estimation from CSI (Channel State Information).

Architecture

The UI follows a modular architecture with clear separation of concerns:

ui/
โ”œโ”€โ”€ app.js                    # Main application entry point
โ”œโ”€โ”€ index.html                # HTML shell with tab structure
โ”œโ”€โ”€ style.css                 # Complete CSS design system
โ”œโ”€โ”€ config/
โ”‚   โ””โ”€โ”€ api.config.js         # API endpoints and configuration
โ”œโ”€โ”€ services/
โ”‚   โ”œโ”€โ”€ api.service.js        # HTTP API client
โ”‚   โ”œโ”€โ”€ websocket.service.js  # WebSocket connection manager
โ”‚   โ”œโ”€โ”€ websocket-client.js   # Low-level WebSocket client
โ”‚   โ”œโ”€โ”€ pose.service.js       # Pose estimation API wrapper
โ”‚   โ”œโ”€โ”€ sensing.service.js    # WiFi sensing data service (live + simulation fallback)
โ”‚   โ”œโ”€โ”€ health.service.js     # Health monitoring API wrapper
โ”‚   โ”œโ”€โ”€ stream.service.js     # Streaming API wrapper
โ”‚   โ””โ”€โ”€ data-processor.js     # Signal data processing utilities
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ TabManager.js         # Tab navigation component
โ”‚   โ”œโ”€โ”€ DashboardTab.js       # Dashboard with live system metrics
โ”‚   โ”œโ”€โ”€ SensingTab.js         # WiFi sensing visualization (3D signal field, metrics)
โ”‚   โ”œโ”€โ”€ LiveDemoTab.js        # Live pose detection with setup guide
โ”‚   โ”œโ”€โ”€ HardwareTab.js        # Hardware configuration
โ”‚   โ”œโ”€โ”€ SettingsPanel.js      # Settings panel
โ”‚   โ”œโ”€โ”€ PoseDetectionCanvas.js # Canvas-based pose skeleton renderer
โ”‚   โ”œโ”€โ”€ gaussian-splats.js    # 3D Gaussian splat signal field renderer (Three.js)
โ”‚   โ”œโ”€โ”€ body-model.js         # 3D body model
โ”‚   โ”œโ”€โ”€ scene.js              # Three.js scene management
โ”‚   โ”œโ”€โ”€ signal-viz.js         # Signal visualization utilities
โ”‚   โ”œโ”€โ”€ environment.js        # Environment/room visualization
โ”‚   โ””โ”€โ”€ dashboard-hud.js      # Dashboard heads-up display
โ”œโ”€โ”€ utils/
โ”‚   โ”œโ”€โ”€ backend-detector.js   # Auto-detect backend availability
โ”‚   โ”œโ”€โ”€ mock-server.js        # Mock server for testing
โ”‚   โ””โ”€โ”€ pose-renderer.js      # Pose rendering utilities
โ””โ”€โ”€ tests/
    โ”œโ”€โ”€ test-runner.html       # Test runner UI
    โ”œโ”€โ”€ test-runner.js         # Test framework and cases
    โ””โ”€โ”€ integration-test.html  # Integration testing page

Features

WiFi Sensing Tab

  • 3D Gaussian-splat signal field visualization (Three.js)
  • Real-time RSSI, variance, motion band, breathing band metrics
  • Presence/motion classification with confidence scores
  • Data source banner: green "LIVE - ESP32", yellow "RECONNECTING...", or red "SIMULATED DATA"
  • Sparkline RSSI history graph
  • "About This Data" card explaining CSI capabilities per sensor count

Live Demo Tab

  • WebSocket-based real-time pose skeleton rendering
  • Estimation Mode badge: green "Signal-Derived" or blue "Model Inference"
  • Setup Guide panel showing what each ESP32 count provides:
    • 1 ESP32: presence, breathing, gross motion
    • 2-3 ESP32s: body localization, motion direction
    • 4+ ESP32s + trained model: individual limb tracking, full pose
  • Debug mode with log export
  • Zone selection and force-reconnect controls
  • Performance metrics sidebar (frames, uptime, errors)

Dashboard

  • Live system health monitoring
  • Real-time pose detection statistics
  • Zone occupancy tracking
  • System metrics (CPU, memory, disk)
  • API status indicators

Hardware Configuration

  • Interactive antenna array visualization
  • Real-time CSI data display
  • Configuration panels
  • Hardware status monitoring

Data Sources

The sensing service (sensing.service.js) supports three connection states:

State Banner Color Description
LIVE - ESP32 Green Connected to the Rust sensing server receiving real CSI data
RECONNECTING Yellow (pulsing) WebSocket disconnected, retrying (up to 20 attempts)
SIMULATED DATA Red Fallback to client-side simulation after 5+ failed reconnects

Simulated frames include a _simulated: true marker so code can detect synthetic data.

Backends

Rust Sensing Server (primary)

The Rust-based wifi-densepose-sensing-server serves the UI and provides:

  • GET /health โ€” server health
  • GET /api/v1/sensing/latest โ€” latest sensing features
  • GET /api/v1/vital-signs โ€” vital sign estimates (HR/RR)
  • GET /api/v1/model/info โ€” RVF model container info
  • WS /ws/sensing โ€” real-time sensing data stream
  • WS /api/v1/stream/pose โ€” real-time pose keypoint stream

Python FastAPI (legacy)

The original Python backend on port 8000 is still supported. The UI auto-detects which backend is available via backend-detector.js.

Quick Start

cd docker/

# Default: auto-detects ESP32 on UDP 5005, falls back to simulation
docker-compose up

# Force real ESP32 data
CSI_SOURCE=esp32 docker-compose up

# Force simulation (no hardware needed)
CSI_SOURCE=simulated docker-compose up

Open http://localhost:3000/ui/index.html

With local Rust binary

cd v2
cargo build -p wifi-densepose-sensing-server --no-default-features

# Run with simulated data
../../target/debug/sensing-server --source simulated --tick-ms 100 --ui-path ../../ui --http-port 3000

# Run with real ESP32
../../target/debug/sensing-server --source esp32 --tick-ms 100 --ui-path ../../ui --http-port 3000

Open http://localhost:3000/ui/index.html

With Python HTTP server (legacy)

# Start FastAPI backend on port 8000
wifi-densepose start

# Serve the UI on port 3000
cd ui/
python -m http.server 3000

Open http://localhost:3000

Pose Estimation Modes

Mode Badge Requirements Accuracy
Signal-Derived Green 1+ ESP32, no model needed Presence, breathing, gross motion
Model Inference Blue 4+ ESP32s + trained .rvf model Full 17-keypoint COCO pose

To use model inference, start the server with a trained model:

sensing-server --source esp32 --model path/to/model.rvf --ui-path ./ui

Configuration

API Configuration

Edit config/api.config.js:

export const API_CONFIG = {
  BASE_URL: window.location.origin,
  API_VERSION: '/api/v1',
  WS_CONFIG: {
    RECONNECT_DELAY: 5000,
    MAX_RECONNECT_ATTEMPTS: 20,
    PING_INTERVAL: 30000
  }
};

Testing

Open tests/test-runner.html to run the test suite:

cd ui/
python -m http.server 3000
# Open http://localhost:3000/tests/test-runner.html

Test categories: API configuration, API service, WebSocket, pose service, health service, UI components, integration.

Styling

Uses a CSS design system with custom properties, dark/light mode, responsive layout, and component-based styling. Key variables in :root of style.css.

License

Part of the WiFi-DensePose system. See the main project LICENSE file.