# Backend Aesthetic Photo Planner Backend FastAPI pour stocker les patients et envoyer les photos vers Immich. ## Installation ```powershell cd backend python -m venv .venv .\.venv\Scripts\Activate.ps1 pip install -r requirements.txt copy .env.example .env notepad .env uvicorn app.main:app --reload --host 0.0.0.0 --port 8000 ``` ## Variables importantes - `IMMICH_BASE_URL` : exemple `http://192.168.1.50:2283` - `IMMICH_API_KEY` : clé créée dans Immich Web > User Settings > API Keys - `DATABASE_URL` : SQLite pour V0, PostgreSQL plus tard ## Test rapide ```powershell curl http://127.0.0.1:8000/health ``` Créer patient : ```powershell curl -X POST http://127.0.0.1:8000/patients ` -H "Content-Type: application/json" ` -d '{"first_name":"Test","last_name":"Patient","notes":"demo"}' ``` Uploader photo : ```powershell curl -X POST http://127.0.0.1:8000/patients/1/photos ` -F "kind=original" ` -F "notes=photo de face" ` -F "file=@C:\\Users\\Public\\Pictures\\sample.jpg" ```