Inspiration

The idea for Handoff came from a painfully simple observation: when a patient leaves the hospital, the most critical information about their care gets buried in a 20-page discharge summary full of medical jargon. All this is handed to a family member who may not speak English, has no medical training, and is already overwhelmed.

The numbers are stark: 20% of patients experience adverse events within 30 days of discharge, and 79% of those are preventable. The root cause isn't bad medicine, but bad communication.

I wanted to build the tool that should already exist: something that takes the paperwork and turns it into a care plan that any family can actually understand, in their own language, read aloud if needed, and shared with everyone involved.

What it does

Handoff transforms hospital discharge documents into living, multilingual, voice-enabled care plans that keep the entire care team — coordinators, caregivers, and family members — on the same page.

For Coordinators (nurses, social workers, discharge planners):

  • Upload a discharge PDF or photo — Gemini 2.5 Flash extracts medications, care instructions, red flags, and contact info into structured data
  • Every AI extraction is tagged with a confidence level (High / Medium / Low) so uncertain items are flagged immediately
  • Share access via a simple 6-character invite code: no email exchange required
  • Edit plans, respond to caregiver questions, and monitor linked caregivers from a central dashboard

For Caregivers (family members, home aides):

  • View the care plan in any of 6 languages: English, Spanish, Chinese, Korean, Hindi, and Russian
  • Listen to a conversational audio briefing read aloud by ElevenLabs in their native language
  • Tap "Explain" on any section to get plain-language breakdowns of medical jargon
  • Export medications as calendar reminders (.ics) to Google Calendar, Apple Calendar, or Outlook
  • Message the coordinator directly, with automatic translation built in

The entire platform is localized end-to-end: the UI, care plan content, audio, messaging, and even the Auth0 login/signup page all render in the user's chosen language.

How we built it

Framework & Deployment: Next.js 16 with the App Router and React 19, deployed to Cloudflare Workers via the OpenNext adapter.

AI Pipeline: Google Gemini 2.5 Flash handles three distinct jobs:

  1. PDF parsing — extracting structured medical data (medications, dosages, red flags) from unstructured discharge documents, with confidence scoring
  2. Translation — converting care plans into the caregiver's language while preserving medical accuracy
  3. Script generation — transforming structured data into warm, conversational briefings for audio playback

Voice: ElevenLabs Multilingual v2 converts Gemini's scripts into natural-sounding audio in all 6 supported languages.

Auth: Auth0 handles authentication with role-based access (Coordinator vs. Caregiver). I extended it with ui_locales injection in our middleware so the login page itself renders in the user's language.

Database: MongoDB Atlas stores users, care plans (with embedded translation and audio caches), and messages.

Challenges we ran into

Auth0 login page localization. There was full i18n coverage across the entire app except for the Auth0 Universal Login page, which is hosted by Auth0. I dug into the SDK v4 source code and discovered that the handleLogin method automatically forwards all URL query parameters as OIDC authorization parameters. So Iwrote middleware that reads the user's language cookie, maps it to a BCP 47 locale code, and injects ?ui_locales=es-419 (or zh-CN, ko, hi, ru) into the login redirect; one small middleware change that closed the last i18n gap.

AI confidence and trust. Getting Gemini to reliably tag extraction confidence was tricky. A medication parsed from blurry handwriting needs to be flagged as uncertain, not presented with the same weight as a clearly typed prescription. So, I built uncertainty resolution flows. when confidence is Medium or Low, the UI immediately surfaces a modal explaining the uncertainty and offers a direct message input to contact the Coordinator.

Accomplishments that we're proud of

  • True end-to-end localization in 6 languages.

  • The confidence scoring system. AI-generated medical information is high-stakes. Rather than presenting everything as equally trustworthy, I built a pipeline that grades each extraction and surfaces uncertainty immediately, with a direct path to human resolution via messaging.

  • Client-side calendar export. Medications and reminders export as .ics files with daily recurring events and alarm reminders, generated entirely in the browser from already-extracted plan data. No additional API call needed.

  • Cross-browser compatibility through pure inline styles. Converting an entire Next.js app from Tailwind to inline styles was painful, but the result is a UI that renders identically on Chrome, Safari and Firefox with zero CSS parsing issues.

  • Caching strategy. Translations, audio briefings, and section explanations are all cached at the document level in MongoDB, keyed by content hash. The app only calls Gemini or ElevenLabs when the underlying data actually changes, keeping costs low and response times fast.

What we learned

  • Auth SDKs have hidden extension points. Reading the actual source code of @auth0/nextjs-auth0 v4 revealed that query parameters on /auth/login are automatically forwarded as OIDC authorization parameters, an undocumented but reliable path to customizing the hosted login experience.

  • AI confidence matters more than AI accuracy. A wrong extraction that's flagged as uncertain is far less dangerous than a wrong extraction presented confidently. Building trust indicators into AI outputs should be a first-class design concern, not an afterthought.

What's next for Handoff

  • Real-time messaging — Replace the current polling-based chat with WebSocket or Server-Sent Events for instant message delivery
  • Push notifications — Medication reminders and coordinator messages via browser push notifications and SMS (Twilio)
  • Care plan templates — Pre-built templates for common procedures (hip replacement, cardiac surgery, diabetes management) so coordinators can start with structure rather than a blank PDF
  • Multi-patient dashboards — Let coordinators manage dozens of patients with filtered views, status indicators, and bulk actions
  • Family sharing — Multiple caregivers with different roles and permissions on a single care plan (primary caregiver, backup, family member)
  • HIPAA compliance path — Encrypted document storage, audit logging, BAA with cloud providers, and formal security review for production healthcare deployment

Built With

Share this project:

Updates