-
Clone the repository
-
Install dependencies:
just setup
-
Run the development server:
just dev
Or with a custom SyftBox config:
just dev /path/to/syftbox/config.json
The app will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
Both frontend and backend have hot-reload enabled during development.
To run multiple dashboards simultaneously (e.g., for testing with different SyftBox clients):
# Terminal 1 - Instance 1
just dev "/path/to/client1.config.json"
# → Frontend: :3000, Backend: :8000
# Terminal 2 - Instance 2
just dev "/path/to/client2.config.json"
# → Frontend: :3001, Backend: :8001 (auto-incremented)Each instance automatically gets its own ports. The backend port is always calculated as: backend_port = frontend_port + 5000. The frontend auto-detects the correct API URL based on the DEBUG environment variable (same as the backend).
Debug: Check API configuration in browser console:
window.apiConfig.log() // Show current config
window.apiConfig.reset() // Reset if neededRun just prod to export the frontend into a static build and start the FastAPI backend server.
frontend/out/ directory is intentionally committed to git.
This is required for SyftBox app installation:
-
When users install via:
syftbox app install https://github.com/OpenMined/rds-dashboard- SyftBox clones this repository
- Executes
run.shwhich only sets up Python environment (no frontend build step) - FastAPI serves pre-built static files from
frontend/out/ - SyftUI embeds the app (dashboard) in an iframe
-
Deployment models:
- SyftBox Install: Requires pre-built
frontend/out/in git ✅ - Docker: Builds frontend during image creation (doesn't need committed build, but harmless)
- SyftBox Install: Requires pre-built
Before committing frontend changes, always rebuild:
bun run --cwd frontend buildThis ensures users installing via SyftBox get the latest frontend.