Inspiration

Every year, billions of dollars in class-action settlement money goes unclaimed. Products we use without thinking, dry shampoo, baby powder, sunscreen, deodorant, end up in billion-dollar lawsuits over benzene, talc contamination, formaldehyde releasers, and PFAS. The money sits on administrator websites behind obscure claim forms that nobody knows about, nobody sees, and nobody files.

We kept running into the same pattern: a friend sees a news headline about a $3.6M Unilever dry shampoo benzene settlement, shrugs, and scrolls on. Not because they don't care, because proving they bought that product three years ago, tracking the deadline, and filing the claim feels like a part-time job. Meanwhile, major retailers, banks, and apps already hold SKU-level records of every purchase those people have ever made.

The mismatch felt absurd. The evidence already exists. It's just sitting on the wrong side of a login. We wanted to build the tool that bridges that gap, one that quietly watches purchase histories, flags exposure, and hands users a filing-ready packet the moment a settlement matches.

What it does

Aletheia turns purchase history into actionable legal claims in three moves:

  1. Link accounts. Users connect DoorDash, Amazon, Uber Eats, Shop Pay, and more through Knot's TransactionLink SDK. We pull down SKU-level transaction data, every product name, merchant, date, and line-item price.
  2. Scan for exposure. A Gemini-powered edge function (analyze-exposure) cross-references every purchased product against a curated list of carcinogens, endocrine disruptors, neurotoxins, and irritants (benzene, talc, parabens, phthalates, PFAS, oxybenzone, formaldehyde releasers, aluminum compounds). Users get an "exposure report" with a 0–100 score, a percentile, flagged products, and per-chemical risk breakdowns.
  3. Match to settlements. A second edge function (match-opportunities) takes the detected chemicals and matches them against an autonomous catalog of active class-action settlements scraped hourly from ClassAction.org and TopClassActions. Each match is tagged as either Product matched (the user actually bought the eligible product) or Chemical matched (only the ingredient overlaps). Expired settlements are filtered out; duplicates are collapsed at three layers.
  4. Aletheia generates the evidence packet. For every settlement the user matches, a "Help Me File a Claim" modal walks them through five concrete steps:

How we built it

Frontend: React + TypeScript + Vite, Tailwind with shadcn/Radix components, Framer Motion.

Transaction data: Knot TransactionLink. A Live / Demo toggle runs two paths. Live creates a session, opens the SDK, links a merchant (DoorDash at id 19), and pulls SKU-level purchases via cursor-paginated /transactions/sync. Demo seeds a deterministic catalog that maps cleanly to known active lawsuits.

Backend: Supabase Edge Functions (Deno)

  • knot-proxy signs Knot API calls.
  • analyze-exposure runs a Gemini toxicology scan → structured chemical JSON.
  • discover-settlements + enrich-settlements scrape ClassAction.org and TopClassActions, then fill in payouts, deadlines, claim URLs.
  • match-opportunities reads only enriched rows, filters past-deadline entries, dedupes on (claim_url | title+defendant), and classifies matches as product vs chemical.
  • send-receipt-email delivers the generated PDF via Resend.

Overall: Gemini Deep Research → PRD → Enter.Pro (MCPs + Skills) → Claude Code → Final Product

Challenges we ran into

LLMs hallucinate specifics: Our first pass let Gemini synthesize both the catalog and the match score; it invented settlement amounts and nonexistent lawsuits. Fix: split into a deterministic scrape-then-enrich pipeline with canonical data in Postgres, and constrain match-time prompts to cite only catalog IDs.

Duplicates everywhere: Scrapers ingested the same settlement under two IDs when URLs changed trivially, and Gemini sometimes repeated catalog entries. We added three de-dup layers (pre-prompt, post-parse, frontend) keyed on a normalized (claim_url | title + defendant) tuple.

Deadline handling. Scraped catalogs are full of expired settlements. We had to treat TBD/blank/unparseable as still-open while aggressively filtering real past dates — enforced both server-side and client-side.

Receipt authenticity. The PDF needed to look like something a claim administrator would accept. We iterated several layouts before landing on a merchant header + SKU autoTable + Knot verification footer.

What we learned

Multi-layer defense for LLM output. Check anything correctness-critical (deadlines, de-dup, schema) at the prompt, parse, and render layers. Financial-grade data needs product-grade UX. Users won't navigate a 14-field claim form even for $12,500. The leverage is compressing that friction into a 5-step modal with a PDF at step 3.

What's next for Aletheia

Webhook-driven alerts: notify users the moment a new purchase matches an existing settlement, no manual rescan. Auto-fill claim forms: pre-populate the standard six fields from Knot + exposure data, and submit on the user's behalf where administrators allow it. Historical lookback: extend past Knot's ~90-day sync window with bank-statement OCR, where the real long-tail settlement money lives (J&J talc, PFAS cookware). Real payout integration: accept ACH/Plaid on the Aletheia side and collect on behalf of users for a small success fee.

Built With

Share this project:

Updates