⚖️ Caseworker, your AI advocate for impossible paperwork
Live demo: https://caseworker-eta.vercel.app · Code: https://github.com/ssamalsamir/caseworker (MIT)
Snap a photo of the letter that's ruining your week, a denied insurance claim, a SNAP benefits cut, a surprise ER bill, a thin financial-aid offer, or paste the text, and Caseworker:
- Explains it in plain English (8th-grade reading level, no jargon).
- Surfaces your rights in that specific situation.
- Extracts every deadline into a live days-left countdown so you never miss the appeal window.
- Gives ordered next steps.
- Drafts the response that gets it reversed, ready to copy, sign, and send.
- Reads the whole plan aloud in a calm voice (accessibility-first).
💡 Inspiration
About 1 in 7 health-insurance claims is denied, and fewer than 1% of denials are ever appealed, yet roughly half of filed appeals succeed. 70M+ people in the US rely on benefits programs governed by letters that are deliberately hard to read. The barrier isn't eligibility, it's the paperwork. Caseworker removes the paperwork.
🛠️ What it does
One reasoning core, three surfaces:
- Web app, upload a photo/PDF or paste text, pick the case type (benefits, insurance, medical billing, financial aid, small-business licensing), and get a structured advocacy plan: plain-language summary, key facts, your rights, deadline countdown, ordered actions, and a complete drafted appeal letter.
- HTTP API,
POST /api/analyzereturns the full structured analysis as JSON. - MCP server,
mcp/server.tsexposesanalyze_document,draft_appeal, andlist_domainsas Model Context Protocol tools over stdio, so any agent (Claude Desktop, Cursor, an agent harness) can use Caseworker as a capability, it's a reusable agent tool, not just an app.
🏗️ How we built it
- Next.js (App Router) on Vercel, the UI, the API routes, and a branded OG image, deployed as Vercel Functions.
- A provider-cascading reasoning core (
lib/caseworker.ts): Claude (forced tool call for clean structured output) → Gemini (structured JSON schema, free tier, the live demo runs ongemini-2.5-flash-lite) → a deterministic demo mode that does real regex extraction (dates, amounts, case numbers) so the product works with zero API keys and never dies on stage. - Vision-native document reading, photos and PDFs go straight to the model (Claude
image/documentblocks, Geminiinline_data); no separate OCR step. Phone photos are downscaled client-side to keep uploads fast. - Deadline trust layer, models don't reliably know "today," so the server re-parses every extracted date and recomputes the days-left countdown itself; severity escalates automatically when a deadline is within 30 days.
- Voice, ElevenLabs TTS when a key is configured, with a built-in browser speech-synthesis fallback so the Listen button always works.
- Hardening, per-IP rate limiting on the API routes, payload caps, and graceful clipboard/audio fallbacks in the UI.
😤 Challenges we ran into
- Bureaucratic letters are adversarial: the deadline is buried mid-paragraph ("must be received no later than…"), so we built cue-based deadline extraction plus a future-date fallback, and never trust the model's arithmetic.
- Making the demo undestroyable: every layer has a fallback (Claude → Gemini → deterministic demo; ElevenLabs → browser voice), because a hackathon demo that depends on one API key is a demo that dies.
🏆 Accomplishments we're proud of
- The full flow, photo in, spoken advocacy plan + ready-to-send appeal out, works on a phone, with no login and no setup.
- Real accessibility: labels and live regions for screen readers, an everything-read-aloud mode, and 8th-grade-level output by design.
- Unit-tested deterministic core (
node --test, no extra deps) covering date parsing, deadline extraction, and the demo analyzer.
📚 What we learned
Structured output (forced tool calls / JSON schemas) turns an LLM from a chatbot into a dependable component: the same schema powers the UI, the API, and the MCP tools.
🚀 What's next
Mail/fax integration to file the appeal directly, saved cases with deadline reminders, Spanish-language support, and a phone-call interface for people without smartphones.
⚖️ Disclaimer
Caseworker provides information and drafting help, not legal advice. It never invents facts, flags what to verify, and always tells users to confirm deadlines against their own documents.
Built With
- anthropic-claude
- css
- elevenlabs
- google-gemini
- javascript
- model-context-protocol
- next.js
- react
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.