A comprehensive AI agent training platform featuring university management, curriculum systems, and competition arenas. This is a complete, self-contained version of the university system designed for distributed deployment.
- University Management: Create and manage multiple university institutions
- Curriculum System: Design learning paths and skill trees for agents
- Competition Arenas: Organize agent competitions with leaderboards
- Real-time Communication: WebSocket-based real-time updates
- RESTful API: Complete API for integration and automation
- JWT Authentication: Secure user authentication system
- Multi-machine Deployment: Distributed architecture across 5 backend machines
- FastAPI application with SQLite database
- WebSocket support for real-time communication
- JWT Authentication for secure API access
- Systemd service for automatic startup
- SQLAlchemy ORM for database operations
- React/Vite based university UI with TypeScript
- Tailwind CSS for modern styling
- Real-time updates via WebSocket
- Authentication Provider for user management
For Backend Machines:
- Arch Linux (recommended) or any Linux distribution
- Python 3.8+
- Root access for service installation
- Network connectivity
For Frontend Machine:
- Windows 10/11 or any OS with Node.js support
- Node.js 18+
- Modern web browser
git clone https://github.com/your-username/uni0.git
cd uni0# Install Python dependencies
pip install -r requirements.txt
# Set up environment
cp .env.example .env
# Edit .env with your configuration
# Run the backend
cd src
python main.pycd dryad-university-ui
# Install dependencies
npm install
# Start development server
npm run devThe application will be available at:
- Backend API: http://localhost:8000
- Frontend UI: http://localhost:3000
- API Documentation: http://localhost:8000/docs
uni0/
โโโ src/ # Backend source code
โ โโโ main.py # FastAPI application entry point
โ โโโ api/v1/ # API endpoints (version 1)
โ โ โโโ auth.py # Authentication endpoints
โ โ โโโ universities.py # University management
โ โ โโโ curriculum.py # Curriculum operations
โ โ โโโ competitions.py # Competition management
โ โ โโโ enhanced_university.py # Enhanced university features
โ โ โโโ websocket.py # WebSocket connections
โ โ โโโ health.py # Health checks
โ โโโ services/ # Business logic services
โ โ โโโ enhanced_university_service.py
โ โ โโโ curriculum_engine.py # Curriculum management engine
โ โ โโโ competition_engine.py # Competition management engine
โ โโโ database/ # Database layer
โ โ โโโ database.py # Database connection setup
โ โ โโโ models_university.py # SQLAlchemy models
โ โโโ core/ # Core configuration
โ โโโ config.py # Application configuration
โโโ dryad-university-ui/ # Frontend React application (will be moved to separate repo)
โ โโโ src/
โ โ โโโ App.tsx # Main application component
โ โ โโโ main.tsx # Application entry point
โ โ โโโ pages/ # Page components
โ โ โ โโโ Dashboard.tsx # Main dashboard
โ โ โ โโโ Universities.tsx # University management
โ โ โ โโโ Curriculum.tsx # Curriculum view
โ โ โ โโโ Competitions.tsx # Competition arena
โ โ โ โโโ Login.tsx # Login page
โ โ โ โโโ Register.tsx # Registration page
โ โ โโโ components/ # Reusable components
โ โ โ โโโ layout/ # Layout components
โ โ โ โโโ ui/ # UI components
โ โ โโโ providers/ # Context providers
โ โ โ โโโ AuthenticationProvider.tsx
โ โ โโโ services/ # API services
โ โ โ โโโ api.ts
โ โ โโโ types/ # TypeScript definitions
โ โ โโโ index.ts
โ โโโ package.json # Node.js dependencies
โ โโโ vite.config.ts # Vite configuration
โ โโโ tailwind.config.js # Tailwind CSS configuration
โโโ scripts/ # Deployment scripts
โ โโโ setup-arch-linux.sh # Arch Linux installation
โ โโโ setup-windows-ui.ps1 # Windows UI setup
โ โโโ deploy-university-system.sh # Full deployment
โโโ requirements.txt # Python dependencies
โโโ .env.example # Environment template
โโโ README.md # This file
Copy .env.example to .env and configure:
# Basic configuration
APP_NAME="Uni0 University System"
DEBUG=False
# Security
SECRET_KEY="your-secure-secret-key-here"
ACCESS_TOKEN_EXPIRE_MINUTES=30
# Database
DATABASE_URL="sqlite:///./uni0.db"
# CORS (for frontend access)
BACKEND_CORS_ORIGINS=["http://localhost:3000","http://127.0.0.1:3000"]The frontend automatically connects to the backend API. For custom configuration, edit dryad-university-ui/.env:
VITE_API_BASE_URL=http://localhost:8000/api/v1Backend:
cd src
python main.pyFrontend: (will be in separate repository)
cd dryad-university-ui
npm run dev- API Documentation: http://localhost:8000/docs
- Health Check: http://localhost:8000/health
- University UI: http://localhost:3000
- WebSocket: ws://localhost:8000/api/v1/ws
# Health check
curl http://localhost:8000/health
# Login and get token
curl -X POST http://localhost:8000/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "password"}'
# List universities (with token)
curl -H "Authorization: Bearer YOUR_TOKEN" http://localhost:8000/api/v1/universitiesPOST /api/v1/auth/login- Login and get tokenPOST /api/v1/auth/refresh- Refresh tokenGET /api/v1/auth/me- Get current user info
GET /api/v1/universities- List all universitiesPOST /api/v1/universities- Create a universityGET /api/v1/universities/{id}- Get university detailsPUT /api/v1/universities/{id}- Update universityDELETE /api/v1/universities/{id}- Delete university
GET /api/v1/curriculum- List curriculaPOST /api/v1/curriculum- Create curriculumGET /api/v1/curriculum/{id}- Get curriculum detailsPUT /api/v1/curriculum/{id}- Update curriculum
GET /api/v1/competitions- List competitionsPOST /api/v1/competitions- Create competitionGET /api/v1/competitions/{id}/leaderboard- Get leaderboard
GET /api/v1/ws/{client_id}- WebSocket connection- Real-time updates for agent status, competitions, and curriculum progress
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run development server
cd src
uvicorn main:app --reload --host 0.0.0.0 --port 8000cd dryad-university-ui
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run buildBackend not starting:
# Check service status
systemctl status uni0
# View logs for errors
journalctl -u uni0.service --no-pager -n 50
# Check port availability
netstat -tulpn | grep 8000Frontend connection issues:
- Verify backend is running and accessible
- Check CORS configuration in backend
- Ensure firewall allows port 3000 on Windows
Database issues:
# Check database file permissions
ls -la /opt/uni0/data/
# Test database connection
python -c "from src.database.database import engine; engine.connect()"Backend health check:
curl http://localhost:8000/health
curl http://localhost:8000/api/v1/health/performanceWebSocket connections:
curl http://localhost:8000/api/v1/ws/statsBackend logs:
journalctl -u uni0.service -fFrontend logs:
- Check browser developer console
- Check terminal where npm run dev is running
- JWT-based authentication with configurable expiration
- CORS configuration for controlled access
- SQLite database with file permissions
- Systemd service running as non-root user (recommended)
- Firewall configuration for port access
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built on FastAPI for high-performance APIs
- React/Vite for modern frontend development
- Tailwind CSS for styling
- Inspired by educational and training platform requirements
Uni0 University System - A comprehensive AI agent training platform.