CareCompanion - DevPost Submission
Inspiration
Navigating healthcare is hard. When you're feeling unwell, the last thing you want is to spend 30 minutes searching for clinics, calling multiple numbers, and explaining your symptoms over and over. We asked ourselves: What if an AI could handle that entire journey - from understanding your symptoms to booking the appointment?
We were inspired by the gap between telehealth chatbots (which just give advice) and real-world action (actually getting you into a clinic). CareCompanion bridges that gap.
What it does
CareCompanion is a full-stack AI health assistant that:
- Understands your symptoms through natural conversation and calculates a Care Confidence Score (0-100) to help you decide if you need to see a doctor.
- Detects emergencies in real time - if you mention chest pain or suicidal thoughts, it immediately provides crisis resources and 911 guidance.
- Finds nearby clinics using Google Places, ranked by distance, rating, and estimated wait time.
- Makes phone calls for you via Twilio - the AI calls the clinic and attempts to book your appointment.
- Adapts to your age - the assistant uses simpler language for children (e.g., "tummy" instead of "stomach") and professional language for adults.
- Remembers your health profile - conditions, allergies, medications - so you don't have to repeat yourself.
How we built it
- Frontend: Next.js 14 + React 18 + TypeScript, styled with Tailwind CSS and Framer Motion for animations. Zustand for state management. Google Maps integration with @react-google-maps/api.
- Backend: Fastify (Node.js) with a multi-agent architecture orchestrating specialized AI agents (Health Reasoning, Risk Escalation, Clinic Ops, Telephony, Empathy, Fatigue Detection).
- LLM: Google Gemini 2.0 Flash for conversational AI. Structured system prompts calculate the Care Score and guide age-appropriate responses.
- Telephony: Twilio Voice API for outbound clinic calls with TwiML scripting.
- Database: PostgreSQL with Prisma ORM for users, sessions, health memory, bookings, and call logs.
- Maps: Google Places API for clinic discovery and details.
- Real-time Communication: Socket.IO for WebRTC signaling (browser-to-browser voice calls).
The entire codebase is TypeScript end-to-end with mock mode fallbacks for demos without API keys.
Challenges we ran into
- Telephony integration: Making Twilio calls required webhook handling and TwiML scripting for interactive conversations with clinic receptionists.
- Age-aware language: Building a system that adapts vocabulary for children (ages 5-8) vs. tweens (9-12) vs. teens vs. adults required prompt engineering and post-processing vocabulary swaps.
- Emergency detection without false positives: Balancing sensitivity (catching real emergencies) with specificity (not alarming users unnecessarily) required weighted keyword detection and category-specific responses.
- State machine complexity: The conversation can branch into booking flows, emergency flows, or back to chat - managing this cleanly required a robust orchestrator pattern.
Accomplishments that we're proud of
- End-to-end clinic calling: The AI doesn't just suggest a clinic - it initiates a Twilio call and speaks to the receptionist.
- Care Confidence Score: A transparent, explainable metric (0-100) that helps users understand urgency without diagnosing.
- Age-aware empathy: A 7-year-old sees "Your tummy might be upset" while an adult sees "You may be experiencing gastrointestinal discomfort."
- Comprehensive safety layer: Emergency keywords trigger immediate 911 guidance and crisis hotlines (988), with specialized scripts for cardiac, neurological, and mental health emergencies.
What we learned
- LLMs need guardrails - we combined keyword detection, scoring heuristics, and structured prompts to keep responses safe and useful.
- Telephony UX is hard - call flow scripting and webhook handling are entirely different from chat UX.
- Healthcare AI requires humility - we're explicit that CareCompanion is not a doctor and cannot diagnose.
What's next
- Insurance integration: Pre-verify coverage before booking.
- Multi-language support: French, Spanish, Mandarin.
- Wearable integration: Pull heart rate and sleep data from Apple Health / Google Fit.
- Clinic availability API: Partner with clinics for real-time wait time data.
- HIPAA-compliant deployment: Move from hackathon prototype to production-grade infrastructure.
Safety & Privacy Disclaimer
CareCompanion is a hackathon prototype and is not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider for medical concerns. In an emergency, call 911.
User data is stored locally in a PostgreSQL database during demo. No PHI is transmitted to third parties except as required by the APIs (LLM, Twilio, Google Places) to provide the service. Consent is collected before storing health memory.
Built With
- anthropic
- css
- docker
- fastify
- framermotion
- gemini
- google-maps
- google-places
- html
- next.js
- node.js
- pnpm
- postgresql
- prisma
- react
- socket.io
- tailwind
- twilio
- typescript
- zod
- zustand
Log in or sign up for Devpost to join the conversation.