Live demo: https://preview-chat-901879f1-7697-4adc-b18c-6276eb184231.space.zhipuaidemo.cn/ Code: https://github.com/43aquarius/care-pilot
Judges: click "Try the demo" on the landing page — a one-click judge account ([email protected]) is pre-seeded with medications, symptom-check history, and a sample lab report.
Inspiration
Healthcare isn't only what happens in the clinic. It's the 2 a.m. "should I be worried about this?" search, the pill you're not sure you already took, the lab PDF that says "out of range" with no further explanation, and the doctor visit where your best-described symptom becomes "uh, my stomach, kind of, since last week?". Every one of those moments is a decision the health system hands to patients with no tooling at all. CarePilot is the copilot for that 99% of healthcare that happens between visits.
What it does
CarePilot connects the whole journey of an everyday health worry, in four modules that feed each other:
- Symptom Navigator — describe what you feel in plain words. The AI asks one round of focused follow-up questions, checks for red flags, and returns a structured assessment: likely patterns (framed as possibilities, never a diagnosis), red flags, concrete self-care steps, when to seek care — and an explicit machine-readable care level:
SELF_CARE/SEE_DOCTOR/URGENT_CARE/EMERGENCY. - Medications — your schedule with doses, times and notes; log each dose as taken or skipped; a 7-day adherence score shows how you're really doing.
- Lab Reports, translated — paste raw lab results and get a marker-by-marker plain-language table (✓ / ⚠️ / ✗ status), what each marker does, lifestyle steps that actually move those numbers, and the exact questions to ask your doctor.
- Visit Prep — one click pulls your symptom-check history and current medications into a one-page, first-person summary a doctor can absorb in 60 seconds — so your 15 minutes actually count.
Safety is architectural, not decorative: emergency red flags (chest pain, stroke signs, severe bleeding, anaphylaxis, suicidal ideation) trigger an immediate "call emergency services" response at any point in the conversation, and every output carries an "educational tool, not a diagnosis" reminder.
How I built it
- Next.js 16 (App Router) + TypeScript strict, Tailwind CSS 4 + shadcn/ui (New York), Lucide icons.
- Streaming AI, provider-portable. The triage chat streams token-by-token via Server-Sent Events. A single abstraction layer (
src/lib/ai.ts) runs in two modes — the bundled sandbox SDK here, or any OpenAI-compatible endpoint (GLM, OpenAI, DeepSeek, Ollama) via three environment variables — so the same code deploys anywhere. - Safety-first prompt engineering. The care level is emitted as a machine-readable line (
[URGENCY_LEVEL: …]) parsed server-side to badge and log every session; follow-up questions are capped at one round so the assessment always arrives. - Prisma + SQLite for users, sessions, medications, dose logs, triage sessions, and lab reports; custom session auth with scrypt hashing and HTTP-only cookies.
- Accessibility as a feature — a built-in panel with high-contrast, larger-text and reduced-motion modes; landmark semantics, skip-to-content, labeled controls, 44px touch targets, and full keyboard operability.
Challenges I ran into
- Making streaming work identically across two AI providers whose SSE frames differ subtly — solved by re-framing every provider's stream into plain UTF-8 text deltas in one place, so the UI never knows which provider answered.
- Designing the triage conversation so it always terminates in a decision: one bounded round of follow-ups, then the structured assessment — no endless chit-chat from a chatty model.
- Keeping a single-page dashboard app keyboard-navigable and screen-reader-labeled while still looking warm and modern — accessibility and polish are usually presented as a trade-off; I refused both halves of that framing.
Accomplishments that I'm proud of
- A full loop that works end-to-end: symptom check → saved to history → lab report explained → both feed Visit Prep → a printable one-page summary.
- The judge demo experience: one click, zero signup, realistic seeded data (adherence at ~85%, a prediabetes-range metabolic panel, two prior symptom checks) so every module shows something real on first open.
- Accessibility panel + keyboard flows verified by scripted browser walkthroughs (mobile 390px through desktop 1440px).
What I learned
- The hardest part of a health AI product is deciding what the AI is not allowed to do — and making those limits visible in the UI, not just in the prompt.
- Session-auth + streaming + SQLite is a complete, deployable backend with zero managed services.
- A care level badge ("Self-care" vs "See a doctor within 24h") communicates more in one glance than three paragraphs of hedging.
What's next for CarePilot
Photo-based lab extraction (vision model), medication reminders, medication-interaction checks, clinician-shareable visit summaries, FHIR import, and i18n.
Built With
- accessibility
- ai
- health-tech
- healthcare
- next.js
- typescript

Log in or sign up for Devpost to join the conversation.