No description
- analytics_service now queries usage_events (not usage_rollups) so data appears immediately without waiting for nightly rollup - match on ts datetime range (was string 'date' field — broken) - correct units field names: token_input/token_output/char - rollup_daily.py: same field name fix for historical aggregation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .claude | ||
| backend | ||
| frontend | ||
| infra | ||
| sdk | ||
| .env.example | ||
| .gitignore | ||
| README.md | ||
AI Cost Tracker
Shared AI cost tracking service for Oliver Agency projects.
Tracks LLM usage costs across workspaces, teams, and projects. Provides a REST API for recording AI calls and an admin dashboard for analytics.
Stack
- Backend: FastAPI, MongoDB, Redis, Celery
- Frontend: React, Vite, TypeScript
- Auth: Azure AD SSO (+ dev login for local testing)
- Deploy: Docker Compose on optical-dev
Quick start
cp .env.example .env
# Fill in Azure AD credentials and secrets
docker compose -f infra/docker-compose.yml up -d
Admin UI: http://localhost:5174
API docs: http://localhost:8001/docs