mirror of
https://github.com/ruvnet/RuView
synced 2026-07-24 17:43:20 +00:00
f49c722764
The Rust port lived two directories deep (rust-port/wifi-densepose-rs/) without any sibling under rust-port/ that warranted the extra level. Move the whole workspace up to v2/ to match v1/ (Python) at the same depth and shorten every cd / build command across the repo. git mv preserves history for all tracked files. 60 files updated for path references (CI workflows, ADRs, docs, scripts, READMEs, internal .claude-flow state). Two manual fixes for relative-cd paths in CLAUDE.md and ADR-043 that became wrong after the depth change (cd ../.. → cd ..). Validated: - cargo check --workspace --no-default-features → clean (after target/ nuke; the gitignored target/ was carried by the OS rename and had hard-coded old paths in build scripts) - cargo test --workspace --no-default-features → 1,539 passed, 0 failed, 8 ignored (same totals as pre-rename) - ESP32-S3 on COM7 → still streaming live CSI (cb #40300, RSSI -64 dBm) After-merge follow-up: contributors should `rm -rf v2/target` once and let cargo regenerate from the new path.
72 lines
2.7 KiB
Markdown
72 lines
2.7 KiB
Markdown
# wifi-densepose-api
|
|
|
|
[](https://crates.io/crates/wifi-densepose-api)
|
|
[](https://docs.rs/wifi-densepose-api)
|
|
[](LICENSE)
|
|
|
|
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](https://github.com/tokio-rs/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
|
|
|
|
| Method | Path | Description |
|
|
|--------|------|-------------|
|
|
| `GET` | `/api/v1/health` | Liveness and readiness probes |
|
|
| `GET` | `/api/v1/poses` | Latest pose estimates |
|
|
| `POST` | `/api/v1/csi` | Ingest raw CSI frames |
|
|
| `GET` | `/api/v1/zones` | List scan zones |
|
|
| `POST` | `/api/v1/zones` | Create a scan zone |
|
|
| `WS` | `/ws/poses` | Real-time pose stream |
|
|
| `WS` | `/ws/vitals` | Real-time vital sign stream |
|
|
|
|
## Related Crates
|
|
|
|
| Crate | Role |
|
|
|-------|------|
|
|
| [`wifi-densepose-core`](../wifi-densepose-core) | Shared types and traits |
|
|
| [`wifi-densepose-config`](../wifi-densepose-config) | Configuration loading |
|
|
| [`wifi-densepose-db`](../wifi-densepose-db) | Database persistence |
|
|
| [`wifi-densepose-nn`](../wifi-densepose-nn) | Neural network inference |
|
|
| [`wifi-densepose-signal`](../wifi-densepose-signal) | CSI signal processing |
|
|
| [`wifi-densepose-sensing-server`](../wifi-densepose-sensing-server) | Lightweight sensing UI server |
|
|
|
|
## License
|
|
|
|
MIT OR Apache-2.0
|