Add dd0c/route Dashboard API: analytics, routing rules CRUD, API keys, providers

- GET /api/v1/analytics/summary — 7-day cost savings, latency, routing breakdown
- GET /api/v1/analytics/timeseries — hourly/daily rollups from TimescaleDB continuous aggregates
- GET /api/v1/analytics/models — per-model cost and token breakdown
- CRUD /api/v1/rules — routing rules with priority, match conditions, strategies
- CRUD /api/v1/keys — API key generation (dd0c_ prefix), bcrypt hashing, revocation
- CRUD /api/v1/providers — provider config upsert with encrypted key storage
- GET /api/v1/org — org info
- Role-based access: Owner required for mutations
This commit is contained in:
2026-03-01 02:31:28 +00:00
parent 311a834228
commit e234f66b9b
7 changed files with 651 additions and 11 deletions

View File

@@ -68,6 +68,10 @@ serde_yaml = "0.9"
chrono = { version = "0.4", features = ["serde"] }
thiserror = "1"
anyhow = "1"
getrandom = "0.2"
regex = "1"
async-trait = "0.1"
rand = "0.8"
[dev-dependencies]
# Testing