Inspiration

Lab reports are one of the few places people actually get hard numbers about their health, and most of us glance at them once, feel confused, and shove them in a drawer. By the next appointment, nobody remembers what changed. We wanted something that sits between "raw PDF" and "see a doctor": not a diagnosis app, just a way to turn those numbers into a score, a small daily plan, and a one-page summary you can bring back.

Wellness isn't only meditation apps. For a lot of people it's "I got bloodwork and I don't know what to do until my follow-up." That's the gap we aimed at for the CS Girlies Technology For Wellness hackathon (Health track).

What it does

BetaHealth is a browser app where you:

  1. Upload a lab report (PDF or photo)
  2. Confirm every extracted value in an editable table (or enter them by hand if extraction fails)
  3. Get a Health Score from clinical reference ranges (AHA, ADA, NCEP, WHO) with a per-metric breakdown
  4. Get a daily plan: tasks and foods tied to specific out-of-range metrics, with the reason shown
  5. Check off tasks, keep streaks/points/badges, and watch score trends over re-tests
  6. Export a doctor summary: score history, metric trends, tasks completed, notes

Saved reports, scores, and plans live in IndexedDB in your browser. No accounts. The report file is sent only for extraction (Gemma 4 via Google AI Studio) and isn't stored on our servers. Not medical advice. It prepares you for your doctor; it doesn't replace them.

How we built it

  • Frontend: Astro 5 + React islands + Tailwind (clinical calm UI: warm off-white, teal accent, Sora / Plus Jakarta Sans)
  • Storage: IndexedDB via idb for reports, scores, plans, streak/points/badges
  • Scoring & plan: deterministic TypeScript (scoring.ts, plan.ts), not LLM-generated
  • Extraction: Astro API route /api/extract calls Gemma 4 (gemma-4-31b-it) through Google AI Studio with a free-tier GEMINI_API_KEY. Vision on the upload -> structured metrics -> whitelist of known keys only -> user confirm before save. If the model returns prose, we run a repair pass; if that fails, manual entry uses the same table
  • Deploy: Vercel

AI is scoped to one job: reading the report. The score and plan stay rule-based so the model can't invent clinical numbers.

Challenges we ran into

  • Gemma doesn't do constrained JSON. We had to prompt carefully, parse defensively (brace-depth walk over candidate objects), and add a second "repair" pass when the first answer was prose wrapped around JSON.
  • Unit and naming mess. Labs use different units and synonyms. We pinned conversion factors in the prompt and filtered responses to a fixed set of metric keys so names/IDs can't leak back.
  • Honest privacy copy. The file does leave the browser briefly for extraction, but saved health history stays in IndexedDB. Getting that wording right (without sounding like "nothing ever leaves your device") took more care than expected.
  • Empty states over fake demos. No seeded "sample patient." Before the first report, the dashboard is just "add your first report."

Accomplishments that we're proud of

  • A full loop that works end-to-end: upload -> confirm -> score -> plan -> streaks -> doctor summary
  • Keeping AI narrow and the medical math deterministic
  • Manual entry fallback so a bad extract doesn't brick the product
  • Shipping a live demo on Vercel with a sample report people can try
  • Designing for the Health track: real lab metrics, reference ranges, and browser-stored health data, not a vibe chatbot

What we learned

  • Vision models are great at "read this PDF," terrible at being a clinical authority, so don't let them set the score
  • Confirm-before-save is non-negotiable when AI touches health numbers
  • IndexedDB is enough for a serious privacy posture in a hackathon MVP (no auth, no database of patient rows)
  • Clear product boundaries ("prepare for your doctor") build more trust than overclaiming

What's next for BetaHealth

  • Better multi-report trend charts and printable/PDF doctor export polish
  • Optional encrypted backup / export so switching devices doesn't wipe history
  • More metrics and plan rules as people upload real reports
  • Accessibility pass (screen readers, high contrast) and clearer unit handling in the confirm table
  • Stay firmly out of diagnosis territory. Deepen the "bring this to your appointment" side instead

Built With

  • gemma
  • ts
Share this project:

Updates