Dashboard
Leptos WASM web dashboard for monitoring and managing pipelines.
Setup
cargo install trunk
rustup target add wasm32-unknown-unknown
Run
# Terminal 1: API server
fungi server
# Terminal 2: dashboard
cd crates/fungi-dashboard
trunk serve --port 8082
Open http://localhost:8082.
Login
If FUNGI_AUTH_ENABLED=true, log in with the bootstrap admin credentials. The JWT is stored in localStorage and attached to every API call.
Pages
| Page | Shows |
|---|---|
| Dashboard | Status, version, uptime, JM/TM counts, recent jobs |
| Pipelines | All pipelines with status, throughput, errors |
| SQL IDE | Interactive query editor |
| Settings | Server info, API keys, tenants |
API Endpoints (consumed)
| Endpoint | Purpose |
|---|---|
GET /health | Status, version, uptime, cluster info |
GET /api/jobs | List jobs |
POST /api/sql | Run SQL |
POST /api/auth/login | Login |
Trunk Proxy
crates/fungi-dashboard/Trunk.toml forwards /api/* and /health to the backend (default localhost:8080).
[[proxy]]
backend = "http://localhost:8080/api"
[[proxy]]
backend = "http://localhost:8080/health"
For remote clusters:
[[proxy]]
backend = "http://101.200.74.232:30051/api"
Production Build
cd crates/fungi-dashboard
trunk build --release
# Static files in dist/ — serve via nginx, Axum, or any static server
Tech Stack
| Component | Purpose |
|---|---|
| Leptos 0.6 (CSR) | Reactive Rust UI |
| Trunk | WASM bundler / dev server |
| Tailwind CSS | Styling |
| reqwasm | HTTP client |
Customization
- API base — edit
Trunk.toml[[proxy]]blocks - Theme — edit
index.htmlTailwind config / classes - Pages —
src/pages/, components insrc/components/
Troubleshooting
| Symptom | Fix |
|---|---|
| Cannot reach server | curl http://localhost:8080/health then check Trunk.toml |
| 401 on every request | Token expired — log out and back in |
| Dashboard empty | Server has no jobs/pipelines yet — run fungi pipeline run |