A Real-time Streaming Dashboard built with Rust, which streams CPU/memory metrics over WebSockets + React frontend displaying live charts.
rt-stream-dashboard sends CPU/memory metrics through websockets using Rust. It uses (Axum + Tokio) and it exposes:
A WebSocket endpoint called "/ws" that emits streaming metric events ( in JSON format ) every 1s. A static-file handler to serve the frontend.
- 💬 Async programming: WebSocket handling.
- ⚡ Fast: Made in Rust 🦀 for performance.
- 👀 Basic observability: Allows to manage and examine the state of logs, metrics and traces over time.
- 🗒️ Machine-parsable serialization: Serialization with the (serde)[https://github.com/serde-rs/serde] library in JSON format, allowing a simpler data exchange.
- 🎨 Interactive UI: Integration of a modern frontend with real-time streaming and reactive UI. React frontend that connects to the WebSocket, receives the CPU metric events, and renders them in an updating chart. See the repo here.
- 😎 Backend: Rust, axum, tokio, serde, tracing (optional).
- 📊🌸 Frontend: React, Vite, TypeScript.
- 🦜💬 Communication: WebSockets (JSON messages).
Frontend? find it here -> https://github.com/jchavezlavalle/rt-dashboard-frontend aaaand...
This is a sneak-peak of what the frontend looks like:

- 🦀 Rust server that sends simulated metrics + React client charts.
- 🔑 Authentication (token on WS handshake).
- ✍️ Persistent ingestion: write metrics to SQLite or Append-only log.
- ♾️ Backpressure & rate limiting.
- 🚪 Multiple topics/rooms (e.g., per-host streams) and filtering.
- 👀 Improvements on observability: tracing, metrics, Prometheus exporter.
- 📈 Benchmark & optimize: CPU/latency tests.
cargo run
Make sure to have it installed first, otherwise run the following command:
npm i wscat
After this run on another terminal wscat:
wscat -c ws://127.0.0.1:3000/ws
You would see something pretty cool like this:
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
Created by jchavezlavalle

