Compass 🧭

AI-Powered Care Coordination for Family Caregivers

Compass is a comprehensive platform that helps the 53 million family caregivers in the US coordinate care for their aging loved ones. It uses AI to generate personalized care plans, track medications and appointments, find community resources, and facilitate family collaboration.

πŸš€ The Problem

Family caregivers face overwhelming complexity:

  • 53M unpaid family caregivers in the US
  • 78% manage medications for loved ones
  • 40+ hrs/week average care commitment
  • 65% report high stress levels
  • Fragmented healthcare and social service systems
  • No central place to coordinate care

πŸ’‘ The Solution

Compass provides an all-in-one platform that:

  • Generates AI care plans tailored to each individual's conditions and needs
  • Tracks medications with dosage, schedule, and refill reminders
  • Manages appointments across multiple providers
  • Coordinates family members with shared access
  • Finds community resources using AI matching
  • Explains medical information in plain language
  • Provides AI assistance for caregiving questions

πŸ› οΈ Tech Stack

Category Technology
Frontend Next.js 14, React, TypeScript, Tailwind CSS
UI shadcn/ui (Radix primitives)
Auth Clerk
Database PostgreSQL + Prisma ORM
AI OpenAI GPT-4o-mini (Structured Outputs)
Deployment Vercel / Docker
Monitoring Sentry (recommended)

✨ Features

πŸ€– AI-Powered Care Planning

Generate comprehensive, personalized care plans instantly. AI analyzes medical conditions, medications, allergies, and needs to create daily routines, goals, recommendations, and emergency protocols.

πŸ’Š Medication Management

Track all medications with dosages, schedules, and refill reminders. Never miss a dose or forget a refill.

πŸ“… Appointment Coordination

Manage healthcare appointments in one place. Keep track of providers, locations, and preparation notes.

🏠 Community Resource Finder

AI-powered matching helps you find local resources β€” food assistance, home care, financial aid, transportation, and more.

πŸ’¬ AI Caregiving Assistant

Ask questions about care, get plain-language medical explanations, and receive practical caregiving advice.

πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Family Collaboration

Invite family members to share care responsibilities, assign tasks, and stay informed.

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Next.js App (Vercel)                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ Landing  β”‚  β”‚Dashboard β”‚  β”‚  Care    β”‚  β”‚  AI Features β”‚ β”‚
β”‚  β”‚  Page    β”‚  β”‚  Layout  β”‚  β”‚Recipientsβ”‚  β”‚  (Chat,Plan) β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚  β”‚                   API Routes                             β”‚β”‚
β”‚  β”‚  /api/care-recipients  /api/medications  /api/tasks      β”‚β”‚
β”‚  β”‚  /api/appointments    /api/resources    /api/ai/*        β”‚β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚             β”‚             β”‚
         β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
         β”‚PostgreSQLβ”‚  β”‚  Clerk  β”‚  β”‚ OpenAI  β”‚
         β”‚ + Prisma β”‚  β”‚  Auth   β”‚  β”‚   API   β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🚦 Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • Clerk account (free tier available)
  • OpenAI API key

1. Clone and Install

git clone https://github.com/yourusername/compass.git
cd compass
npm install

2. Set Up Environment Variables

cp .env.example .env

Fill in your .env file:

# Database
DATABASE_URL="postgresql://user:password@localhost:5432/compass?schema=public"

# Clerk (https://dashboard.clerk.com)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_..."
CLERK_SECRET_KEY="sk_test_..."

# Clerk URLs
NEXT_PUBLIC_CLERK_SIGN_IN_URL="/sign-in"
NEXT_PUBLIC_CLERK_SIGN_UP_URL="/sign-up"
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL="/dashboard"
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL="/dashboard"

# OpenAI (https://platform.openai.com/api-keys)
OPENAI_API_KEY="sk-..."

# App URL
NEXT_PUBLIC_APP_URL="http://localhost:3000"

3. Set Up Database

# Run migrations
npx prisma migrate dev --name init

# Seed sample data (community resources)
node scripts/seed.js

4. Run the App

npm run dev

Visit http://localhost:3000

5. Set Up Clerk Webhook (Optional)

To automatically sync users, set up a Clerk webhook:

  1. Go to Clerk Dashboard > Webhooks
  2. Add endpoint: https://your-domain.com/api/webhooks/clerk
  3. Subscribe to user.created and user.updated events
  4. Copy the webhook secret to your .env as CLERK_WEBHOOK_SECRET

🐳 Docker Deployment

# Set environment variables
export NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
export CLERK_SECRET_KEY=sk_test_...
export OPENAI_API_KEY=sk-...

# Build and run
docker-compose up -d

πŸš€ One-Click Vercel Deploy

Deploy with Vercel

Prerequisites

Before deploying, you'll need accounts with these services (all have free tiers):

Service Purpose Sign Up
Vercel Hosting vercel.com
Neon (or any PostgreSQL) Database neon.tech
Clerk Authentication dashboard.clerk.com
OpenAI AI Features platform.openai.com

Step-by-Step Deployment

1. Set Up PostgreSQL Database

Create a free PostgreSQL database:

  • Option A: Neon (Recommended) β€” Go to neon.tech, sign up, create a project, and copy your connection string.
  • Option B: Supabase β€” Go to supabase.com, create a project, and get your PostgreSQL connection string from Settings > Database.
  • Option C: Vercel Postgres β€” If deploying on Vercel Pro, you can use Vercel's integrated Postgres storage.

2. Set Up Clerk Authentication

  1. Go to dashboard.clerk.com and sign up
  2. Create a new application
  3. Enable Email + Google (or your preferred) sign-in methods
  4. Copy your Publishable Key and Secret Key from the API Keys page

3. Get OpenAI API Key

  1. Go to platform.openai.com/api-keys
  2. Create a new secret key
  3. Copy the key (starts with sk-...)

4. Deploy to Vercel

Option A: One-Click Deploy

Deploy with Vercel

Option B: Manual Deploy

# 1. Push your code to GitHub
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/yourusername/compass.git
git push -u origin main

# 2. Import in Vercel
# Go to https://vercel.com/new and import your GitHub repository

5. Configure Environment Variables

In the Vercel dashboard, add these environment variables:

Variable Value
DATABASE_URL Your PostgreSQL connection string from Neon/Supabase
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY From Clerk Dashboard > API Keys
CLERK_SECRET_KEY From Clerk Dashboard > API Keys
OPENAI_API_KEY From OpenAI Platform > API Keys
NEXT_PUBLIC_CLERK_SIGN_IN_URL /sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL /sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL /dashboard
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL /dashboard
NEXT_PUBLIC_APP_URL Your Vercel domain (e.g., https://compass.vercel.app)

6. Run Database Migrations

After deploying, open the Vercel CLI or run:

npx prisma migrate deploy

Or if using Neon, you can run from your local machine pointing to the production database:

DATABASE_URL="your-production-url" npx prisma migrate deploy

7. Seed Community Resources

DATABASE_URL="your-production-url" node scripts/seed.js

8. Set Up Clerk Webhook (Recommended)

  1. In Clerk Dashboard, go to Webhooks
  2. Add endpoint: https://your-domain.vercel.app/api/webhooks/clerk
  3. Subscribe to user.created and user.updated events
  4. Copy the Signing Secret
  5. Add CLERK_WEBHOOK_SECRET to your Vercel environment variables

Post-Deployment Checklist

  • [ ] Landing page loads and is responsive
  • [ ] Sign up / Sign in flow works
  • [ ] Can add a care recipient
  • [ ] Can add medications
  • [ ] Can schedule appointments
  • [ ] Can create tasks
  • [ ] AI care plan generation works
  • [ ] AI assistant chat works
  • [ ] Community resources load
  • [ ] Dark mode toggle works
  • [ ] Mobile responsive layout is correct

πŸ“Š Database Schema

Key models:

  • User - Caregivers and family members (synced with Clerk)
  • CareRecipient - People receiving care
  • Medication - Medications with dosages and schedules
  • Appointment - Healthcare appointments
  • CareTask - To-dos and care activities
  • CarePlan - AI-generated care plans with goals and routines
  • CommunityResource - Local resources and services
  • AIConversation - AI assistant chat history

πŸ€– AI Features

Compass uses OpenAI's GPT-4o-mini with structured outputs for:

  1. Care Plan Generation - Creates comprehensive care plans with goals, daily routines, recommendations, and emergency info
  2. Caregiving Assistant - Conversational AI that answers caregiving questions with context about the patient
  3. Medical Text Explainer - Translates medical jargon into plain language
  4. Resource Matching - Matches user needs to community resources with relevance scoring

πŸ”’ Security

  • Authentication via Clerk (secure, SOC 2 compliant)
  • Row-level security via Prisma (users can only access their own data)
  • API route protection with Clerk middleware
  • Input validation with Zod schemas
  • Rate limiting recommended via Vercel WAF
  • No sensitive data in client-side code

πŸ§ͺ Testing

# Run unit tests
npm test

# Run E2E tests
npx playwright test

πŸ“ License

MIT


Built with ❀️ for family caregivers everywhere.

Built With

Share this project:

Updates