Description
Enforce the usage limit of 10 analyses per day for users on the "free" tier. When a user reaches this limit, block further uploads and prompt them to upgrade to the "pro" tier.
User Story
As a LexGuard administrator,
I want the system to count daily scans for free users,
So that we prevent API abuse and incentivize Pro tier conversions.
Technical Tasks
Description
Enforce the usage limit of 10 analyses per day for users on the
"free"tier. When a user reaches this limit, block further uploads and prompt them to upgrade to the"pro"tier.User Story
Technical Tasks
app/api/analyze/route.tsto check ifuser.plan === 'free'and total scans today >= 10.403 Forbiddenresponse:{ error: "Daily limit reached. Upgrade to Pro for unlimited analyses." }.app/(app)/upload/page.tsx) showing a progress bar of scans remaining today (e.g. "3 of 10 scans remaining today").