2 KiB
2 KiB
Dashboard
Admin dashboard for the didiAI platform. Tracks search provider usage, costs, request history, and exposes runtime configuration.
What it does
- Live quota & billing — pulls real-time data from SerpAPI, Tavily, Brave, OpenRouter
- Health monitoring — SearXNG, web-api, vLLM, llama.cpp servers
- Request history — 30-day rolling log of every gather/search/fetch request with drill-down
- Cost tracking — per-provider spend, projections, cost per tier
- Future: runtime config (toggle providers, change strategies, manage tier caps)
Prerequisites
- Docker 24+ with Compose V2
- PostgreSQL 16 (provided by compose)
- Internal network access to web-api, SearXNG, LLM servers
Quick start
cd deploy
cp ../.env.example .env # edit with your secrets
./deploy.sh up
Dashboard is now running at http://localhost:51300
Endpoints
Web UI
/— overview with KPIs and provider grid/providers— detailed provider cards + raw table/history— filterable request history/history/{request_id}— full request detail with stages
JSON API
GET /health— livenessGET /api/stats/providers— live provider statsGET /api/stats/summary?hours=24— aggregated countersGET /api/stats/timeline?hours=24— hourly buckets for chartsGET /api/history?limit=50&tier=premium— filtered historyGET /api/history/{request_id}— single request with full payloadPOST /api/ingest/event— receives events from web-api middleware
Architecture
web-api ────► POST /api/ingest/event ────► dashboard-api ────► PostgreSQL
│
├─ reads provider APIs live
└─ serves UI via Jinja2+HTMX
Tech stack
- FastAPI + Pydantic
- SQLAlchemy 2.0 async + asyncpg
- Jinja2 + HTMX + Alpine.js + Tailwind (zero build step)
- PostgreSQL 16