Back to Ruview

Domain Models

docs/ddd/README.md

0.7.02.8 KB
Original Source

Domain Models

This folder contains Domain-Driven Design (DDD) specifications for each major subsystem in RuView.

DDD organizes the codebase around the problem being solved — not around technical layers. Each bounded context owns its own data, rules, and language. Contexts communicate through domain events, not by sharing mutable state. This makes the system easier to reason about, test, and extend — whether you're a person or an AI agent.

Models

ModelWhat it coversBounded Contexts
RuvSenseMultistatic WiFi sensing, pose tracking, vital signs, edge intelligence7 contexts: Sensing, Coherence, Tracking, Field Model, Longitudinal, Spatial Identity, Edge Intelligence
Signal ProcessingSOTA signal processing: phase cleaning, feature extraction, motion analysis3 contexts: CSI Preprocessing, Feature Extraction, Motion Analysis
Training PipelineML training: datasets, model architecture, embeddings, domain generalization4 contexts: Dataset Management, Model Architecture, Training Orchestration, Embedding & Transfer
Hardware PlatformESP32 firmware, edge intelligence, WASM runtime, aggregation, provisioning5 contexts: Sensor Node, Edge Processing, WASM Runtime, Aggregation, Provisioning
Sensing ServerSingle-binary Axum server: CSI ingestion, model management, recording, training, visualization5 contexts: CSI Ingestion, Model Management, CSI Recording, Training Pipeline, Visualization
WiFi-MatDisaster response: survivor detection, START triage, mass casualty assessment3 contexts: Detection, Localization, Alerting
CHCICoherent Human Channel Imaging: sub-millimeter body surface reconstruction3 contexts: Sounding, Channel Estimation, Imaging

How to read these

Each model defines:

  • Ubiquitous Language — Terms with precise meanings used in both code and conversation
  • Bounded Contexts — Independent subsystems with clear responsibilities and boundaries
  • Aggregates — Clusters of objects that enforce business rules (e.g., a PoseTrack owns its keypoints)
  • Value Objects — Immutable data with meaning (e.g., a CoherenceScore is not just a float)
  • Domain Events — Things that happened that other contexts may care about
  • Invariants — Rules that must always be true (e.g., "drift alert requires >2sigma for >3 days")
  • Anti-Corruption Layers — Adapters that translate between contexts without leaking internals