feat(admin): add admin backend endpoints and service layer

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
This commit is contained in:
2026-07-29 17:53:43 +03:30
parent 754da323ff
commit a309e64841
5 changed files with 379 additions and 0 deletions

View File

@@ -311,6 +311,17 @@ def list_experiments(
conn.close()
def delete_experiment(experiment_id: str) -> bool:
"""Delete an experiment by ID."""
conn = _connect()
try:
cur = conn.execute("DELETE FROM experiments WHERE id = ?", (experiment_id,))
conn.commit()
return cur.rowcount > 0
finally:
conn.close()
# ── Internal helpers ───────────────────────────────────────────────
_JSON_FIELDS = {"chunk_counts", "retrieved_chunks", "latency_breakdown",