A modern, full-stack dashboard for managing Sorachain federated learning projects with direct integration to the NVFlare CLI provisioning tool.
source ~/FL/bin/activate && python3 run_dashboard.py --host 0.0.0.0 --port 8443 --debug &
cd /home/franky/nvflare-provisioning-dashboard/frontend && npm start
or cd /home/franky/nvflare-provisioning-dashboard && ./start_frontend.sh
pkill -f "npm start" pkill -f "python3 run_dashboard.py" && sleep 3
- User Authentication: Secure JWT-based login/registration system
- Project Management: Create, edit, and manage Sorachain FL projects
- Server Configuration: Configure FL servers with ports and security settings
- Client Management: Manage FL clients with GPU specifications
- Admin Roles: Assign and manage project administrators
- NVFlare Integration: Direct integration with
nvflare provisionCLI tool - Startup Kits: Generate and download server/client/admin startup kits
- Backend: Flask-based REST API with SQLAlchemy ORM
- Frontend: Modern React 18 application with Material-UI
- Database: SQLite database with automatic schema management
- Authentication: JWT-based security with role-based access control
- Provisioning: Direct CLI integration for accurate configuration generation
nvflare-provisioning-dashboard/
βββ application/ # Flask backend application
β βββ __init__.py # App factory and configuration
β βββ models.py # Database models (User, Project, Server, Client, Admin)
β βββ views.py # API endpoints and routes
β βββ provisioning.py # NVFlare CLI integration service
βββ frontend/ # React frontend application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ services/ # API service modules
β β βββ App.js # Main application component
β βββ package.json # Frontend dependencies
β βββ README.md # Frontend documentation
βββ run_dashboard.py # Backend entry point
βββ start_dashboard.sh # Complete startup script
βββ start_frontend.sh # Frontend-only startup script
βββ check_status.sh # Status monitoring script
βββ requirements.txt # Python dependencies
βββ README.md # This file
- Python 3.8+
- Node.js 16+ (recommended) or 14+
- NVFlare CLI tool installed
- Virtual environment (recommended)
-
Clone and Setup
cd /home/franky git clone <repository-url> nvflare-provisioning-dashboard cd nvflare-provisioning-dashboard
-
Activate Virtual Environment
source ~/FL/bin/activate
-
Install Backend Dependencies
pip install -r requirements.txt
-
Install Frontend Dependencies
cd frontend npm install cd ..
# This starts both backend and frontend
./start_dashboard.sh# Start backend only
python3 run_dashboard.py --host 0.0.0.0 --port 8443 --debug
# Start frontend only
./start_frontend.sh./check_status.shAfter starting the dashboard:
- Frontend Dashboard: http://localhost:3000
- Backend API: http://localhost:8443
- Backend Dashboard: http://localhost:8443
- Email: admin@example.com
- Password: admin123
- Project statistics and metrics
- Quick action buttons
- Recent projects list
- System status overview
- Create and edit projects
- Configure communication schemes (gRPC, HTTP, TCP)
- Set overseer agent paths and arguments
- Manage project metadata
- Servers: Add/edit servers with port configurations
- Clients: Configure clients with GPU specifications
- Admins: Assign project administrators with roles
- Generate startup kits using NVFlare CLI
- Download server/client/admin kits
- Monitor provisioning status
- View workspace information
POST /api/v1/login- User authenticationPOST /api/v1/users- User registration
GET /api/v1/projects- List all projectsPOST /api/v1/projects- Create new projectGET /api/v1/projects/{id}- Get project detailsPUT /api/v1/projects/{id}- Update projectDELETE /api/v1/projects/{id}- Delete project
POST /api/v1/projects/{id}/servers- Add serverPUT /api/v1/projects/{id}/servers/{server_id}- Update serverDELETE /api/v1/projects/{id}/servers/{server_id}- Delete server- Similar endpoints for clients and admins
POST /api/v1/provision/{id}- Provision projectGET /api/v1/download/{type}/{id}- Download startup kitGET /api/v1/status/{id}- Get project status
- User authentication and profile information
- Role-based access control
- Organization management
- Project configuration and metadata
- Communication scheme settings
- Overseer agent configuration
- Server specifications and ports
- Connection security settings
- Organization information
- Client specifications and GPU details
- Organization and description
- Resource requirements
- Project administrator assignments
- Role definitions
- Organization information
- JWT-based authentication
- Password hashing with Werkzeug
- Role-based access control
- Secure API endpoints
- CORS configuration
- Flask debug logging
- Database operation logs
- NVFlare CLI execution logs
- Error tracking and reporting
- API response monitoring
- User interaction tracking
- Error boundary handling
- Performance metrics
cd application
# Edit models, views, or provisioning logic
# Restart backend to apply changescd frontend
npm start
# Edit React components
# Changes auto-reload in development# Database is auto-created on first run
# Models are defined in application/models.py
# Schema changes require database recreation-
Port Conflicts
./check_status.sh # Kill conflicting processes if needed -
Dependency Issues
# Backend pip install -r requirements.txt --force-reinstall # Frontend cd frontend rm -rf node_modules package-lock.json npm install
-
Database Issues
# Remove database file to recreate rm provisioning_dashboard.db # Restart backend
# Backend logs
tail -f /var/log/syslog | grep python
# Frontend logs
# Check browser console and network tab
# Database inspection
sqlite3 provisioning_dashboard.db
.tables
.schema users- SQLAlchemy query optimization
- Database connection pooling
- Efficient file handling
- Background task processing
- React component optimization
- API request caching
- Lazy loading for large datasets
- Efficient state management
- Database cleanup and optimization
- Log rotation and management
- Dependency updates
- Security patches
- Database backup procedures
- Configuration backup
- Workspace data management
- Disaster recovery planning
- Follow the existing code style
- Add proper error handling
- Ensure responsive design
- Test on multiple devices
- Update documentation
- Add unit tests for new features
This project follows the same licensing terms as NVFlare.
For issues and questions:
- Check the troubleshooting section
- Review API documentation
- Check backend and frontend logs
- Verify NVFlare installation
- Create an issue in the project repository
- Enhanced error handling
- User management improvements
- Project templates
- Bulk operations
- Multi-tenant support
- Advanced monitoring
- Integration with other FL frameworks
- Cloud deployment support
Happy Federated Learning! π