- Rust 54.1%
- TypeScript 39.1%
- CSS 2.6%
- Makefile 2.4%
- Dockerfile 1%
- Other 0.8%
|
All checks were successful
Build and Deploy / deploy (push) Successful in 2m37s
|
||
|---|---|---|
| .forgejo/workflows | ||
| k8s | ||
| src | ||
| web | ||
| .dockerignore | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Dockerfile | ||
| Makefile | ||
| README.md | ||
🪐 MARSHIAN GALAXY HOMELAB DASHBOARD
A high-performance, real-time multi-node cluster telemetry client for home labs. It provides both a premium Ratatui Terminal UI (TUI) and a remote-friendly, self-contained Vite + React + Tailwind CSS Web UI served directly from the compiled binary.
Features
- Dual Modes: Run interactively in the terminal (TUI) or start a background API/WebSocket server to view telemetry on mobile devices or tablets.
- Single-File Executable: The compiled Rust binary embeds the entire web client static assets (using
rust-embed), making it a zero-dependency, single-file deployment. - Local Network Auto-Detection & QR Pairing: Displays a scannable QR code on server start. Scanning this with your tablet/phone logs you in instantly with a pre-filled authorization token (no typing required!).
- High-Density Compact Layout: Includes a "Compact" mode toggle that replaces graphical host cards with a space-efficient TUI-style table, optimized for tablet displays (like the Google Pixel Tablet).
- Keep Awake Button: Prevents your tablet or browser from entering sleep mode or dimming while displaying telemetry using the browser's native Screen Wake Lock API.
- Fullscreen Mode: Toggles full-screen display using the HTML5 Fullscreen API to hide browser tabs and address bars, providing a native app experience.
- Catppuccin Styling: Sleek, curated color schemes supporting both Mocha (Dark) and Latte (Light) themes.
- Live Metrics Streaming: Real-time update broadcasts to all connected WebSockets clients.
- Kubernetes Telemetry: Integrated
kubectlquerying showing cluster nodes status, namespace pod counts, unhealthy container details, and container restarts. - NFS / Storage mount tracking: Dedicated partition tracking for hosts configured with custom storage disks.
Installation & Build
A build.rs script is included in the project, which automatically runs npm run build inside the web/ directory whenever cargo compiles or builds the Rust project (provided any frontend source files changed).
Build & Install via Makefile (Recommended)
A Makefile is provided in the root directory to simplify common workflows:
- Build project in release mode:
make build - Install executable globally to
~/.cargo/bin/:make install - Manage the systemd user service:
make start # Start background service make stop # Stop background service make restart # Restart background service make status # Check status of service make logs # Tail background service logs - Local development:
make dev-web # Start Vite frontend dev server make dev-server # Run Rust server locally
Manual Cargo build
If you prefer building manually, simply run standard cargo commands. The frontend will compile automatically:
cargo install --path .
Configuration
The dashboard reads configuration from ~/.config/dashboard/config.toml (or a local config.toml in the working directory).
Edit your configuration to add a port and secret token under the [settings] block:
[settings]
refresh_rate_secs = 10
title = "🪐 MARSHIAN GALAXY HOMELAB DASHBOARD"
secret_token = "your-secure-secret-token"
port = 8080
[hosts.k8s0]
name = "k8s0"
address = "k8s0"
host_type = "CP"
shell = "nu"
[hosts.srv2]
name = "srv2"
address = "srv2"
host_type = "Alpine"
shell = "nu"
data_disk = "/data"
[hosts.localhost]
name = "localhost"
address = "localhost"
host_type = "Local"
is_local = true
shell = "sh"
Usage
Interactive TUI Mode
To start the standard terminal user interface:
dashboard
API & Web UI Server Mode
To start the HTTP API / WebSockets server and host the remote web client:
dashboard serve
Tip: On startup, scan the rendered terminal QR code with your tablet/phone to connect instantly.
Running as a Background Systemd Service
To run the remote dashboard server persistently in the background as a user service:
-
Copy the provided systemd service file:
mkdir -p ~/.config/systemd/user/ cp dashboard.service ~/.config/systemd/user/dashboard.service -
Reload the systemd user daemon and start the service:
systemctl --user daemon-reload systemctl --user enable --now dashboard.service -
View server logs or status:
systemctl --user status dashboard.service journalctl --user -u dashboard.service -f -
Enable lingering to ensure the service runs on system boot before interactive login:
loginctl enable-linger