Project Info
CareLink - Post-Discharge Patient Monitoring System
An AI-powered patient monitoring and triage system for post-discharge care, featuring automated voice check-ins, intelligent risk assessment, and real-time alerts.
Features
- Automated Voice Check-ins: Daily phone calls to patients via Vapi
- AI-Powered Triage: Claude AI analyzes check-ins and assesses patient risk levels
- Smart Alerts: Multi-channel notifications (Slack, SMS, Email, Calendar) via Composio
- Video Escalation: LiveKit video rooms for urgent cases requiring immediate attention
- Patient Memory: Letta integration for contextual, long-term patient memory
- RAG System: Chroma vector database for discharge instructions and medical context
- Analytics Dashboard: Elastic Cloud + Kibana for insights and monitoring
Tech Stack
Frontend
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
Backend
- Supabase - PostgreSQL database with real-time subscriptions
- Anthropic Claude - AI triage and analysis
- Vapi - Voice AI for patient calls
- Chroma - Vector database for RAG
- Letta - Patient memory management
- Composio - Workflow automation (Slack, SMS, Calendar, Gmail)
- LiveKit - Video call infrastructure
- Elastic Cloud - Logging and analytics
Getting Started
Prerequisites
- Node.js 18+ and npm
- Supabase account and project
- API keys for all services (see .env.example)
Installation
- Clone and install dependencies:
cd CareLink
npm install
- Set up environment variables:
cp .env.example .env
-
Fill in all required API keys in .env:
- Supabase credentials
- Anthropic API key
- Vapi API key
- Letta API key
- Composio API key
- LiveKit credentials
- Elastic Cloud credentials
-
Set up Supabase database:
Run the migration to create all tables:
# In your Supabase dashboard SQL editor, run: supabase/migrations/00001_initial_schema.sqlOr use Supabase CLI:
supabase db push -
Start Chroma (optional for local development):
docker run -p 8000:8000 chromadb/chroma
- Run the development server:
npm run dev
Open http://localhost:3000 to view the dashboard.
Project Structure
CareLink/
├── src/
│ ├── app/ # Next.js App Router pages
│ │ ├── api/ # API routes
│ │ │ ├── ingest/ # Vapi webhook handler
│ │ │ └── triage/ # AI triage endpoint
│ │ ├── dashboard/ # Main dashboard
│ │ ├── patients/ # Patient management
│ │ └── alerts/ # Alert management
│ ├── components/ # React components
│ ├── lib/ # Utilities and integrations
│ │ ├── supabase.ts # Supabase client
│ │ ├── chroma/ # RAG system
│ │ ├── letta/ # Patient memory
│ │ ├── composio/ # Workflow automation
│ │ └── livekit/ # Video calls
│ └── types/ # TypeScript types
├── supabase/
│ └── migrations/ # Database schema
└── .env.example # Environment variables template
How It Works
1. Patient Enrollment
- Hospital staff adds patient to system with discharge details
- Discharge instructions are embedded into Chroma vector database
- Letta creates a memory profile for the patient
2. Daily Check-ins
- Vapi calls patient at preferred time
- Conversation is transcribed and analyzed
- Data sent to
/api/ingestwebhook
3. AI Triage
Claude analyzes check-in data with context from:
- Discharge instructions (RAG via Chroma)
- Patient history (Letta memory)
- Previous check-ins
Assigns risk score (0-100) and level (low/medium/high/critical) Identifies red flags and recommends actions
4. Alert Generation
- High/Critical Risk: Slack alert to care team
- Critical + Immediate Attention:
- SMS to caregivers
- Calendar event for care team
- LiveKit video room creation
- Email notification
5. Care Team Response
- Dashboard shows real-time alerts
- Can view patient details, check-in history
- Initiate video calls for urgent cases
- Track outcomes in Elastic/Kibana
API Endpoints
POST /api/ingest
Webhook receiver for Vapi call completions.
Request:
{
"call": {
"id": "call_123",
"startedAt": "2025-01-25T14:30:00Z",
"endedAt": "2025-01-25T14:35:00Z",
"transcript": "...",
"summary": "..."
},
"phoneNumber": "+15551234567"
}
POST /api/triage
AI triage assessment endpoint.
Request:
{
"checkin_id": "uuid",
"patient_id": "uuid"
}
Response:
{
"success": true,
"assessment_id": "uuid",
"risk_level": "high",
"requires_immediate_attention": true
}
Database Schema
See supabase/migrations/00001_initial_schema.sql for complete schema.
Main Tables:
patients- Patient demographics and discharge infocaregivers- Emergency contactsmedications- Current prescriptionscheckins- Voice call data and transcriptstriage_assessments- AI risk assessmentsalerts- Notifications sent to care teamdischarge_instructions- Care instructions (with RAG)livekit_rooms- Video call sessions
Development
Running Tests
npm test
Building for Production
npm run build
npm start
Linting
npm run lint
Deployment
Vercel (Recommended)
vercel deploy
Note: Make sure to set all environment variables in your deployment platform.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
License
MIT License - see LICENSE file for details
Support
For issues or questions, please open a GitHub issue or contact the development team.
Analysis
View
Metric
- 8
- 5
- 2
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- CSSIn code
- HTMLIn code
- JavaScriptIn code
- ReactIn code
- SupabaseIn code
- Tailwind CSSIn code
- TypeScriptIn code
8 of 8 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
217 KB
Source files
81
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
adithyagundlapalli/CareLinkv2
93 files · 714 KB · @ b643705
Structure
Interface
63 files · 68%Screens, components and styles rendered to the user.
Application logic
14 files · 15%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript90%
- Markdown7%
- CSS1%
- JavaScript1%
- HTML1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 75- @anthropic-ai/sdk
- @composio/core
- @elastic/elasticsearch
- @hookform/resolvers
- @letta-ai/letta-client
- @radix-ui/react-accordion
- @radix-ui/react-alert-dialog
- @radix-ui/react-aspect-ratio
- @radix-ui/react-avatar
- @radix-ui/react-checkbox
- @radix-ui/react-collapsible
- @radix-ui/react-context-menu
- @radix-ui/react-dialog
- @radix-ui/react-dropdown-menu
- @radix-ui/react-hover-card
- @radix-ui/react-label
- @radix-ui/react-menubar
- @radix-ui/react-navigation-menu
- +57 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.