1006 B
1006 B
Backend Aesthetic Photo Planner
Backend FastAPI pour stocker les patients et envoyer les photos vers Immich.
Installation
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: exemplehttp://192.168.1.50:2283IMMICH_API_KEY: clé créée dans Immich Web > User Settings > API KeysDATABASE_URL: SQLite pour V0, PostgreSQL plus tard
Test rapide
curl http://127.0.0.1:8000/health
Créer patient :
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 :
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"