Add per-user monthly credits tracking (DynamoDB, 429 enforcement, frontend modal)

↗ view on GitHub · Jason Lee · 2026-05-08 · ce16fcd1

- CDK: add CreditsTable (DynamoDB PAY_PER_REQUEST) with lambdaRole + agentCoreRole grants, CREDITS_TABLE_NAME env var on Lambda, and CreditsTableName/Arn outputs
- Backend: new credits.ts lib with checkCredits/incrementCredits using @aws-sdk/client-dynamodb; wire 429 credits_exhausted guard at top of POST /chat and POST /projects/:id/chat handlers
- Frontend: detect 429 credits_exhausted in useAssistantChat streamChat error path; surface CreditsExhaustedModal (already existed) with resetDate in ChatView, assistant page, chat/[id] page, and project assistant chat page
Repository dropthejase/louis
Author Jason Lee <12leeejk2@gmail.com>
Authored
Parents 5e6962d9
Stats 11 files changed , +301 , -142
Part of Per-user monthly credits (DynamoDB-backed) and tier display

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-ce16fcd1.md from inside the repo you want the change in.

⬇ Download capture-commit-ce16fcd1.md