What is wrong
The summarize endpoint can be called unlimited times by anonymous visitors.
Impact: A bot could burn through your API budget overnight.
Evidence (fixture)
src/server/summarize.ts:1–25 · commit a3f9c21
export const summarize = createServerFn()... // no auth, no limit (fixture)
Expected
Authenticated, rate-limited calls.Observed
Anonymous unlimited access.Recommended fix
Require auth and add per-user limits.
Repair prompt for your AI builder
Require authentication on summarize.ts and add a per-user daily limit stored in the database.
Paste it into Lovable, Claude Code, Cursor or Codex.