Back to Ruview

wifi-densepose-api

rust-port/wifi-densepose-rs/crates/wifi-densepose-api/README.md

0.7.02.7 KB
Original Source

wifi-densepose-api

REST and WebSocket API layer for the WiFi-DensePose pose estimation system.

Overview

wifi-densepose-api provides the HTTP service boundary for WiFi-DensePose. Built on axum, it exposes REST endpoints for pose queries, CSI frame ingestion, and model management, plus a WebSocket feed for real-time pose streaming to frontend clients.

Status: This crate is currently a stub. The intended API surface is documented below.

Planned Features

  • REST endpoints -- CRUD for scan zones, pose queries, model configuration, and health checks.
  • WebSocket streaming -- Real-time pose estimate broadcasts with per-client subscription filters.
  • Authentication -- Token-based auth middleware via tower layers.
  • Rate limiting -- Configurable per-route limits to protect hardware-constrained deployments.
  • OpenAPI spec -- Auto-generated documentation via utoipa.
  • CORS -- Configurable cross-origin support for browser-based dashboards.
  • Graceful shutdown -- Clean connection draining on SIGTERM.

Quick Start

rust
// Intended usage (not yet implemented)
use wifi_densepose_api::Server;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let server = Server::builder()
        .bind("0.0.0.0:3000")
        .with_websocket("/ws/poses")
        .build()
        .await?;

    server.run().await
}

Planned Endpoints

MethodPathDescription
GET/api/v1/healthLiveness and readiness probes
GET/api/v1/posesLatest pose estimates
POST/api/v1/csiIngest raw CSI frames
GET/api/v1/zonesList scan zones
POST/api/v1/zonesCreate a scan zone
WS/ws/posesReal-time pose stream
WS/ws/vitalsReal-time vital sign stream
CrateRole
wifi-densepose-coreShared types and traits
wifi-densepose-configConfiguration loading
wifi-densepose-dbDatabase persistence
wifi-densepose-nnNeural network inference
wifi-densepose-signalCSI signal processing
wifi-densepose-sensing-serverLightweight sensing UI server

License

MIT OR Apache-2.0