Why:
- Dashboard needs system health, Qdrant management, chunk preview, questions, and cost estimation endpoints
Changes:
- Add admin router with 11 endpoints (health, Qdrant CRUD, chunk preview, questions management, cost estimation)
- Add delete_experiment to SQLite storage
- Mount admin router and dashboard static files at /app
Impact:
- New /admin/* API routes available
- Dashboard served at /app/ via StaticFiles
Why:
- Need visibility into API usage and performance
- Need to track request method, path, status, and duration
- Helps debugging production issues
Changes:
- Added RequestLoggingMiddleware class
- Logs at appropriate level (INFO/WARNING/ERROR)
- Non-invasive, no logic changes
Why:
- Need structured logging for debugging query pipeline
- Need to mount benchmarking router
Changes:
- Added logging.basicConfig() with INFO level
- Mounted benchmarking router
- Registered QueryError exception handler
Why:
- App factory needs to mount document routes and initialize SQLite at startup
Changes:
- Import and mount documents_router
- Call init_db() on app creation