# ruvnet/ruview architecture

> Architecture diagram of the GitHub repository ruvnet/ruview, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ruvnet/ruview
- Repository: https://github.com/ruvnet/ruview
- Video tour (about a minute): https://gitdiagram.com/ruvnet/ruview/video

## Overview

RuView is a WiFi-based spatial sensing platform: ESP32 nodes capture CSI, sensing pipelines infer occupancy, motion, pose and vital signs, and user interfaces or smart-home integrations expose results. The repository also documents model training/loading, governed evidence, local automation, a multi-sensor world model, and an AI operator. The graph preserves those major branches alongside the sampled firmware, dashboard and processing modules. Some subsystems are represented by their enclosing source directories because their implementation files were not sampled; unsampled internal connections are not asserted.

Main entry points: [`v2/crates/wifi-densepose-pointcloud/src/csi_pipeline.rs`](https://github.com/ruvnet/ruview/blob/main/v2/crates/wifi-densepose-pointcloud/src/csi_pipeline.rs) (CSI processing), [`firmware/esp32-csi-node/main`](https://github.com/ruvnet/ruview/tree/main/firmware/esp32-csi-node/main) (ESP32 CSI nodes), [`ui/app.js`](https://github.com/ruvnet/ruview/blob/main/ui/app.js) (RuView dashboard), [`firmware/esp32-csi-node/main/adaptive_controller.c`](https://github.com/ruvnet/ruview/blob/main/firmware/esp32-csi-node/main/adaptive_controller.c) (Adaptive controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_edge["Edge sensing"]
  node_sensor["ESP32 CSI nodes"]
  node_adaptive["Adaptive controller"]
  node_radio["Radio operations<br/>[rv_radio_ops.h]"]
  node_feature["Feature state<br/>[rv_feature_state.h]"]
  node_privacy["Privacy shield<br/>[veil_shield.h]"]
  node_ris["RIS controller"]
end

subgraph group_processing["Sensing and inference"]
  node_csi["CSI processing<br/>[csi_pipeline.rs]"]
  node_physics["Pose refinement<br/>[engine.rs]"]
  node_server["Sensing server<br/>[rvf_pipeline.rs]"]
  node_multisensor["Unified RF world model"]
  node_evidence["Governed evidence"]
end

subgraph group_interfaces["User interfaces"]
  node_dashboard["RuView dashboard<br/>[app.js]"]
  node_live["Live sensing view<br/>[LiveDemoTab.js]"]
  node_sensingui["Sensing service<br/>[sensing.service.js]"]
  node_wsui["WebSocket service"]
  node_nvapp["Spatial workspace<br/>[nv-app.ts]"]
  node_runtimes["App runtimes<br/>[appRuntimes.ts]"]
  node_nvtransport["Simulation transport<br/>[NvsimClient.ts]"]
end

subgraph group_models["Models and automation"]
  node_rvf["RVF model container"]
  node_training["Model workflow<br/>[TrainingPanel.js]"]
  node_automation["HOMECORE automation<br/>[engine.rs]"]
end

subgraph group_operator["Operator toolkit"]
  node_metaharness["RuView MetaHarness"]
end

node_person(("Room occupants"))
node_ha["Smart-home ecosystems"]

node_person -->|"disturbs radio"| node_sensor
node_sensor -->|"provides CSI"| node_csi
node_csi -.->|"estimates pose"| node_physics
node_csi -.->|"sends sensing data"| node_server
node_server -->|"builds model data"| node_rvf
node_training -->|"loads model files"| node_rvf
node_sensor -->|"adapts capture"| node_adaptive
node_adaptive -->|"sets capture profile"| node_radio
node_adaptive -->|"reads node state"| node_feature
node_csi -.->|"supplies sensing results"| node_sensingui
node_sensingui -.->|"streams updates"| node_wsui
node_dashboard -->|"initializes view"| node_live
node_dashboard -->|"initializes service"| node_sensingui
node_dashboard -->|"uses service"| node_wsui
node_nvapp -.->|"manages workspace"| node_runtimes
node_runtimes -->|"uses client"| node_nvtransport
node_server -->|"attaches provenance"| node_evidence
node_csi -->|"contributes RF sensing"| node_multisensor
node_automation -->|"exposes automation"| node_ha
node_metaharness -->|"accesses devices"| node_sensor
node_metaharness -->|"guides training"| node_training
node_privacy -.->|"controls obfuscation"| node_ris

click node_sensor "https://github.com/ruvnet/ruview/tree/main/firmware/esp32-csi-node/main"
click node_adaptive "https://github.com/ruvnet/ruview/blob/main/firmware/esp32-csi-node/main/adaptive_controller.c"
click node_radio "https://github.com/ruvnet/ruview/blob/main/firmware/esp32-csi-node/main/rv_radio_ops.h"
click node_feature "https://github.com/ruvnet/ruview/blob/main/firmware/esp32-csi-node/main/rv_feature_state.h"
click node_csi "https://github.com/ruvnet/ruview/blob/main/v2/crates/wifi-densepose-pointcloud/src/csi_pipeline.rs"
click node_physics "https://github.com/ruvnet/ruview/blob/main/v2/crates/wifi-densepose-physics/src/engine.rs"
click node_server "https://github.com/ruvnet/ruview/blob/main/v2/crates/wifi-densepose-sensing-server/src/rvf_pipeline.rs"
click node_rvf "https://github.com/ruvnet/ruview/tree/main/v2/crates/wifi-densepose-sensing-server/src"
click node_training "https://github.com/ruvnet/ruview/blob/main/ui/components/TrainingPanel.js"
click node_automation "https://github.com/ruvnet/ruview/blob/main/v2/crates/homecore-automation/src/engine.rs"
click node_dashboard "https://github.com/ruvnet/ruview/blob/main/ui/app.js"
click node_live "https://github.com/ruvnet/ruview/blob/main/ui/components/LiveDemoTab.js"
click node_sensingui "https://github.com/ruvnet/ruview/blob/main/ui/services/sensing.service.js"
click node_wsui "https://github.com/ruvnet/ruview/blob/main/ui/services/websocket.service.js"
click node_nvapp "https://github.com/ruvnet/ruview/blob/main/dashboard/src/components/nv-app.ts"
click node_runtimes "https://github.com/ruvnet/ruview/blob/main/dashboard/src/store/appRuntimes.ts"
click node_nvtransport "https://github.com/ruvnet/ruview/blob/main/dashboard/src/transport/NvsimClient.ts"
click node_metaharness "https://github.com/ruvnet/ruview/tree/main/harness/ruview/src"
click node_multisensor "https://github.com/ruvnet/ruview/tree/main/v2/crates"
click node_evidence "https://github.com/ruvnet/ruview/tree/main/v2/crates/wifi-densepose-sensing-server/src"
click node_privacy "https://github.com/ruvnet/ruview/blob/main/wifi-veil/firmware/core/veil_shield.h"
click node_ris "https://github.com/ruvnet/ruview/blob/main/wifi-veil/firmware/esp32/veil_ris_controller/veil_ris_controller.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_sensor,node_adaptive,node_radio,node_feature,node_privacy,node_ris toneBlue
class node_csi,node_physics,node_server,node_multisensor,node_evidence toneAmber
class node_dashboard,node_live,node_sensingui,node_wsui,node_nvapp,node_runtimes,node_nvtransport toneMint
class node_rvf,node_training,node_automation toneRose
class node_metaharness,node_person,node_ha toneIndigo
```

## Components

### Edge sensing

- [ESP32 CSI nodes](https://github.com/ruvnet/ruview/tree/main/firmware/esp32-csi-node/main): `firmware/esp32-csi-node/main`
- [Adaptive controller](https://github.com/ruvnet/ruview/blob/main/firmware/esp32-csi-node/main/adaptive_controller.c): `firmware/esp32-csi-node/main/adaptive_controller.c`
- [Radio operations](https://github.com/ruvnet/ruview/blob/main/firmware/esp32-csi-node/main/rv_radio_ops.h): `firmware/esp32-csi-node/main/rv_radio_ops.h`
- [Feature state](https://github.com/ruvnet/ruview/blob/main/firmware/esp32-csi-node/main/rv_feature_state.h): `firmware/esp32-csi-node/main/rv_feature_state.h`
- [Privacy shield](https://github.com/ruvnet/ruview/blob/main/wifi-veil/firmware/core/veil_shield.h): `wifi-veil/firmware/core/veil_shield.h`
- [RIS controller](https://github.com/ruvnet/ruview/blob/main/wifi-veil/firmware/esp32/veil_ris_controller/veil_ris_controller.c): `wifi-veil/firmware/esp32/veil_ris_controller/veil_ris_controller.c`

### Sensing and inference

- [CSI processing](https://github.com/ruvnet/ruview/blob/main/v2/crates/wifi-densepose-pointcloud/src/csi_pipeline.rs): `v2/crates/wifi-densepose-pointcloud/src/csi_pipeline.rs`
- [Pose refinement](https://github.com/ruvnet/ruview/blob/main/v2/crates/wifi-densepose-physics/src/engine.rs): `v2/crates/wifi-densepose-physics/src/engine.rs`
- [Sensing server](https://github.com/ruvnet/ruview/blob/main/v2/crates/wifi-densepose-sensing-server/src/rvf_pipeline.rs): `v2/crates/wifi-densepose-sensing-server/src/rvf_pipeline.rs`
- [Unified RF world model](https://github.com/ruvnet/ruview/tree/main/v2/crates): `v2/crates`
- [Governed evidence](https://github.com/ruvnet/ruview/tree/main/v2/crates/wifi-densepose-sensing-server/src): `v2/crates/wifi-densepose-sensing-server/src`

### User interfaces

- [RuView dashboard](https://github.com/ruvnet/ruview/blob/main/ui/app.js): `ui/app.js`
- [Live sensing view](https://github.com/ruvnet/ruview/blob/main/ui/components/LiveDemoTab.js): `ui/components/LiveDemoTab.js`
- [Sensing service](https://github.com/ruvnet/ruview/blob/main/ui/services/sensing.service.js): `ui/services/sensing.service.js`
- [WebSocket service](https://github.com/ruvnet/ruview/blob/main/ui/services/websocket.service.js): `ui/services/websocket.service.js`
- [Spatial workspace](https://github.com/ruvnet/ruview/blob/main/dashboard/src/components/nv-app.ts): `dashboard/src/components/nv-app.ts`
- [App runtimes](https://github.com/ruvnet/ruview/blob/main/dashboard/src/store/appRuntimes.ts): `dashboard/src/store/appRuntimes.ts`
- [Simulation transport](https://github.com/ruvnet/ruview/blob/main/dashboard/src/transport/NvsimClient.ts): `dashboard/src/transport/NvsimClient.ts`

### Models and automation

- [RVF model container](https://github.com/ruvnet/ruview/tree/main/v2/crates/wifi-densepose-sensing-server/src): `v2/crates/wifi-densepose-sensing-server/src`
- [Model workflow](https://github.com/ruvnet/ruview/blob/main/ui/components/TrainingPanel.js): `ui/components/TrainingPanel.js`
- [HOMECORE automation](https://github.com/ruvnet/ruview/blob/main/v2/crates/homecore-automation/src/engine.rs): `v2/crates/homecore-automation/src/engine.rs`

### Operator toolkit

- [RuView MetaHarness](https://github.com/ruvnet/ruview/tree/main/harness/ruview/src): `harness/ruview/src`

### Other components

- **Room occupants**
- **Smart-home ecosystems**

## Connections

- Room occupants → ESP32 CSI nodes: disturbs radio
- ESP32 CSI nodes → CSI processing: provides CSI
- CSI processing → Pose refinement: estimates pose
- CSI processing → Sensing server: sends sensing data
- Sensing server → RVF model container: builds model data (evidence: `v2/crates/wifi-densepose-sensing-server/src/rvf_pipeline.rs`)
- Model workflow → RVF model container: loads model files
- ESP32 CSI nodes → Adaptive controller: adapts capture (evidence: `firmware/esp32-csi-node/main/adaptive_controller.c`)
- Adaptive controller → Radio operations: sets capture profile (evidence: `firmware/esp32-csi-node/main/adaptive_controller.c`)
- Adaptive controller → Feature state: reads node state (evidence: `firmware/esp32-csi-node/main/adaptive_controller.c`)
- CSI processing → Sensing service: supplies sensing results
- Sensing service → WebSocket service: streams updates
- RuView dashboard → Live sensing view: initializes view (evidence: `ui/app.js`)
- RuView dashboard → Sensing service: initializes service (evidence: `ui/app.js`)
- RuView dashboard → WebSocket service: uses service (evidence: `ui/app.js`)
- Spatial workspace → App runtimes: manages workspace
- App runtimes → Simulation transport: uses client (evidence: `dashboard/src/store/appRuntimes.ts`)
- Sensing server → Governed evidence: attaches provenance (evidence: `v2/crates/wifi-densepose-sensing-server/src/rvf_pipeline.rs`)
- CSI processing → Unified RF world model: contributes RF sensing (evidence: `v2/crates/wifi-densepose-pointcloud/src/csi_pipeline.rs`)
- HOMECORE automation → Smart-home ecosystems: exposes automation
- RuView MetaHarness → ESP32 CSI nodes: accesses devices
- RuView MetaHarness → Model workflow: guides training
- Privacy shield → RIS controller: controls obfuscation (evidence: `wifi-veil/firmware/esp32/veil_ris_controller/veil_ris_controller.c`)
