# Annotation Platform Backend FastAPI-based backend for the annotation platform. ## Setup 1. Install dependencies: ```bash pip install -r requirements.txt ``` 2. Configure environment variables (optional): ```bash cp .env.example .env # Edit .env with your configuration ``` ## Running the Server Development mode: ```bash python main.py ``` Or with uvicorn directly: ```bash uvicorn main:app --reload --host 0.0.0.0 --port 8000 ``` ## API Documentation Once the server is running, visit: - Swagger UI: http://localhost:8000/docs - ReDoc: http://localhost:8000/redoc ## Project Structure ``` backend/ ├── main.py # FastAPI application entry point ├── database.py # Database connection and initialization ├── models.py # Database models ├── requirements.txt # Python dependencies ├── routers/ # API route handlers ├── services/ # Business logic └── schemas/ # Pydantic schemas for validation ``` ## Database The application uses SQLite for data storage. The database file is created automatically on first run. Default location: `annotation_platform.db` To use a custom location, set the `DATABASE_PATH` environment variable. ## Testing Run tests with pytest: ```bash pytest ```