File size: 1,236 Bytes
2fe573b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | # TalimBot Backend
FastAPI backend server for the TalimBot student grouping system.
## Quick Start
```bash
# 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 check
- `GET /api/students` - Get all students
- `GET /api/student/{id}` - Get specific student
- `PUT /api/student/{id}` - Update student info
- `POST /api/grouping/perform` - Perform AI grouping
- `GET /api/grouping/status` - Get grouping statistics
- `POST /api/grouping/toggle-visibility` - Show/hide results to students
- `POST /api/grouping/reset` - Reset grouping
## Configuration
### OpenRouter API Key
Located in `grouping_logic.py`:
```python
OPENROUTER_API_KEY = 'your-key-here'
```
### Teacher Password
Located in `main.py` (SystemData model):
```python
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.
|