dropthejase builds the meter before the gate

This fork now tracks what each user spends on the AI every month - but stops just short of actually capping anyone.

analyticsmulti-tenant

Most Mike forks worry about what the AI does. dropthejase is worrying about what it costs. This thread adds per-user, per-month usage tracking, so the fork now knows how much each person is consuming - and a tier label like "Free Tier" shows up next to your name in the sidebar and on the account page.

The first attempt simply counted requests, then got corrected to count actual tokens - the unit cloud AI providers really bill on. A nice touch: a failed request doesn't run up your tab. What's missing is the part that stops you. There's no limit enforcement yet, so hitting your cap doesn't block anything. The meter is in; the gate isn't.

So what If you're watching which Mike forks are heading toward paid tiers or real cost controls, this is the groundwork going in first.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

5 commits from dropthejase/louis, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
ce16fcd1 Add per-user monthly credits tracking (DynamoDB, 429 enforcement, frontend modal) Jason Lee 2026-05-08 ↗ GitHub
commit body
- 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
5969976c chore: remove dead credits enforcement UI (never wired) Jason Lee 2026-05-09 ↗ GitHub
5af54ade fix(agents): track totalTokens in credits_used instead of call count Jason Lee 2026-05-11 ↗ GitHub
7265ee79 feat: expose and display tier from user_profiles Jason Lee 2026-05-12 ↗ GitHub
Add tier column to user_profiles schema (default 'Free').
GET /user/profile now returns tier; UserProfileContext maps it.
AppSidebar and AccountPage display as '${tier} Tier' instead of hardcoded 'Free'.
7ccf1157 fix: account settings dropdown nav, profile PUT content-type, tier display Jason Lee 2026-05-12 ↗ GitHub
commit body
- stopPropagation on sidebar dropdown toggle and Account Settings button
  so outside-click listener doesn't race and swallow the navigation
- Add Content-Type: application/json to all three profile PUT calls in
  UserProfileContext - body was arriving as Buffer, UPDATE never executed
- Rename 'Models & API Keys' tab to 'Models' (no API keys with Bedrock)
- Add request + error logging middleware to Express app for CloudWatch

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-339.md from inside the repo you want the changes in.

⬇ Download capture-thread-339.md