TalimBot Backend
FastAPI backend server for the TalimBot student grouping system.
Quick Start
# Install dependencies (one time only)
pip install -r requirements.txt
# Start the server
python main.py
Server will run on http://localhost:8000
API Endpoints
GET /- Health checkGET /api/students- Get all studentsGET /api/student/{id}- Get specific studentPUT /api/student/{id}- Update student infoPOST /api/grouping/perform- Perform AI groupingGET /api/grouping/status- Get grouping statisticsPOST /api/grouping/toggle-visibility- Show/hide results to studentsPOST /api/grouping/reset- Reset grouping
Configuration
OpenRouter API Key
Located in grouping_logic.py:
OPENROUTER_API_KEY = 'your-key-here'
Teacher Password
Located in main.py (SystemData model):
teacherPassword: str = "teacher123"
Data Storage
Student data is stored in data/students.json (auto-created on first run)
Dependencies
- fastapi - Web framework
- uvicorn - ASGI server
- pydantic - Data validation
- aiohttp - Async HTTP client for API calls
See requirements.txt for versions.