1 pointby reshevyas7 hours ago1 comment
  • reshevyas7 hours ago
    We run Claude across several departments — Legal, Engineering, Sales, etc. Anthropic's console shows total spend, but not who spent it, on which model, or whether the usage is even productive. Once the monthly bill crossed a threshold that made finance ask questions, we needed answers nobody could give.

    Prism is a FastAPI proxy that sits between your app and Anthropic's API. You swap out base_url and everything else stays the same. Every request gets logged: model, token counts, calculated cost, latency, status code, and department. A React dashboard breaks it all down.

    Your App ──> Prism Proxy (FastAPI) ──> Anthropic API | v PostgreSQL (logs) ──> React Dashboard Setup is one command: docker compose up --build

    Run python seed.py for 5,700 realistic requests across 6 departments over 90 days if you want to see the dashboard immediately.

    Key details: streaming SSE pass-through with <10ms overhead, API keys encrypted at rest (Fernet/AES-256), JWT auth, department color coding. Stack is Python 3.12, PostgreSQL 16, React 19, TypeScript, Tailwind v4.

    Roadmap: Slack/email alerts on budget thresholds, per-user attribution, multi-provider support (OpenAI, Google).

    Apache 2.0 licensed. Would appreciate feedback — especially from anyone managing LLM spend across teams. What's missing? What would make this actually useful for your org?