Insurance claims intake helper — upload PDFs or paste FNOL / ACORD-style text, extract key fields in the browser, flag missing required info, and export a structured summary. Optional Cloudflare Workers AI for smarter field mapping and scan OCR.
Live: claimforge.jasonreis.dev (when deployed)
Source: github.com/jreis/claimforge
Brokers, small carriers, and freelancers still re-key claim docs by hand. ClaimForge is a local-first MVP that:
- Extracts text from PDFs (PDF.js) or plain text
- Heuristically maps labels → claim fields (policy #, DOL, carrier, etc.)
- Scores intake completeness (required fields weighted)
- Lets you edit fields and export Markdown / template / JSON
- Opt-in AI — Workers AI text extract + vision OCR (consent required)
Built as a portfolio product for senior SE / insurance-domain work — same craft bar as DJ Vault.
| Layer | Choice |
|---|---|
| UI | React 19 + TypeScript + Vite 8 |
| Styles | Tailwind CSS 4 |
| State | Zustand (theme only persisted — claim data stays session-local) |
pdfjs-dist in the browser |
|
| AI | Cloudflare Workers AI via Pages Functions |
| Host | Cloudflare Pages (wrangler.toml) |
Always free / local
- PDF +
.txtupload / drag-drop - Paste modal for email / form dumps
- Demo claim (synthetic commercial auto FNOL)
- Heuristic field extractors + editable grid
- Completeness panel + Markdown / template / JSON export
Opt-in AI (Workers AI Neurons)
- AI extract fields — text model maps messy docs → structured JSON
- OCR scan — vision model on up to 3 pages for image-only PDFs
- Explicit consent checkbox (not persisted across sessions)
- Soft rate limit (~20/hr/IP), text cap 24k chars, kill switch
AI_ENABLED=false
Not yet
- Risk flagging / coverage checks
- Accounts / freemium exports
- Multi-doc claim packaging
- Tesseract client-side OCR fallback
| Path | Where data goes |
|---|---|
| Heuristic extract | Browser only |
| Theme preference | localStorage only |
| Claim docs / fields | Session memory only (not persisted) |
| AI extract / OCR | Leaves browser → Cloudflare Workers AI (consent required) |
Do not upload regulated PHI/PII you cannot send to a cloud model. No BAA in this portfolio MVP.
npm install
npm run devAI routes in local Vite:
| Endpoint | Without CF credentials | With .env.local CF token |
|---|---|---|
POST /api/ai/extract |
Local heuristics fallback | Llama 3.2 3B via REST |
POST /api/ai/ocr |
503 | Llama 3.2 11B Vision |
GET /api/ai/status |
Reports mode | hasBinding: true |
Copy .env.example → .env.local and set CLOUDFLARE_ACCOUNT_ID + CLOUDFLARE_API_TOKEN (Workers AI Run) for real OCR/local model calls.
npm run build # tsc + vite → dist/
npm run preview # static only — Functions need Pages/wrangler
npm run lint- Connect repo jreis/claimforge
- Build:
npm run build· Output:dist - Ensure
wrangler.tomlAI binding ([ai] binding = "AI") is applied, or add Workers AI binding AI in Dashboard → Functions - Optional env:
AI_ENABLED=falseto hard-disable AI - Custom domain:
claimforge.jasonreis.dev
Pages deploys the functions/ directory automatically with the site.
public/_redirects SPA fallback: /* → /index.html (API routes are handled by Functions first).
- Free: 10,000 Neurons/day on Workers AI
- Overage: ~$0.011 / 1k Neurons; Paid Workers from $5/mo to exceed free AI allocation
- Text extract is cheap; OCR (vision per page) is the main cost driver — hard-capped at 3 pages
src/
components/ # UI including AiAssistPanel
lib/ # pdfExtract, pdfRender, fieldExtractors, aiApi, …
store/ # claim + toast stores
types.ts
functions/
api/ai/ # extract, ocr, status
_lib/ # shared AI config + parse + run
scripts/
ai-dev-api.ts # Vite middleware for local /api/ai/*
Identification, parties, loss details, financial, contacts, evidence — see FIELD_META in src/types.ts. Required fields drive most of the completeness score.
Private / portfolio unless noted otherwise.