A web-based AI Voice Assistant for personalized healthcare and emotional connectivity for elderly users and caregivers.
CareConnect is a full-stack web application built for a university software engineering course. It provides:
- Voice-based daily health check-ins using browser speech APIs
- Medication reminder system with browser notifications
- Automated daily health summaries (rule-based analysis)
- Two-way voice messaging between elderly users and caregivers
- Comprehensive caregiver dashboard with advanced monitoring
- Real-time alerts & notifications for caregivers
- Medication adherence tracking with weekly/monthly reports
- Privacy & security with Supabase Row Level Security
✅ All 10 caregiver features are fully implemented!
- ✅ Account & Authentication (Email + Google OAuth)
- ✅ User Linking & Access Control
- ✅ Daily Health Monitoring (7-day summaries)
- ✅ Medication Monitoring & Supervision (adherence reports)
- ✅ Alerts & Notifications (low stock, skipped meds, health concerns)
- ✅ Two-Way Voice Communication
- ✅ Voice Message History
- ✅ Time-Aware Coordination
- ✅ Privacy & Security (RLS policies)
- ✅ Health Oversight & Decision Support
See CAREGIVER_FEATURES.md for complete documentation.
- Next.js 14 (App Router)
- TypeScript
- Tailwind CSS
- Next.js API Routes (serverless functions)
- Supabase (PostgreSQL + Authentication + Storage)
- Browser SpeechRecognition API (speech-to-text)
- Browser SpeechSynthesis API (text-to-speech)
- MediaRecorder API (audio recording)
- Browser Notification API
- Node.js 18+ and npm/yarn
- Supabase account (free tier)
- Modern browser (Chrome, Edge, or Safari recommended for voice features)
git clone <your-repo-url>
cd care-connectnpm install- Go to supabase.com and create a new project
- Wait for the database to initialize (takes ~2 minutes)
- Go to SQL Editor in your Supabase dashboard
- Run these SQL scripts in order:
supabase/schema.sql- Creates all tables and basic RLS policiessupabase/fix-caregiver-links.sql- Adds caregiver linking policies ✅ REQUIREDsupabase/caregiver-alerts-rls.sql- Adds alert monitoring policies ✅ REQUIRED
- Go to Storage → Create new bucket:
- Name:
voice-messages - Public: ✅ YES
- Click Create bucket
- Name:
- Copy the example env file:
cp .env.local.example .env.local- Edit
.env.localand add your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_keyWhere to find these values:
- Go to your Supabase project dashboard
- Click on Settings (gear icon) → API
- Copy Project URL →
NEXT_PUBLIC_SUPABASE_URL - Copy anon public key →
NEXT_PUBLIC_SUPABASE_ANON_KEY
npm run devOpen http://localhost:3000 in your browser.
Sign Up:
- Go to
/auth/signup - Choose role: Elderly User or Caregiver
- Enter email, password, and full name
- Create account
Sign In:
- Go to
/auth/signin - Enter credentials
- Access your dashboard
- Navigate to Check-In from the dashboard
- Click "Start Daily Check-In"
- App will speak: "Hello, how are you feeling today?"
- Speak your response (mention any symptoms, pain, mood, etc.)
- Click "Stop & Submit"
- Your check-in is saved and analyzed for keywords like:
- Pain, tired, headache, dizzy, fever
- Sad, anxious, depressed, lonely
- And more health-related terms
Add Medication:
- Go to Medications
- Click "+ Add Medication"
- Fill in:
- Name (e.g., "Aspirin")
- Dosage (e.g., "100mg")
- Time (24-hour format, e.g., "09:00")
- Total stock (number of doses)
- Low stock threshold
- Submit
Medication Reminders:
- Browser notifications appear at scheduled times
- Click notification to go to medications page
Log Medication:
- Click "✓ Taken" when you take it
- Click "Skip" if you skip it
- Stock automatically decreases when marked as taken
- Low stock alerts trigger automatically
Send a Voice Message:
- Go to Messages
- Click "🎤 New Message"
- Select recipient
- Click "🎤 Start Recording"
- Speak your message
- Click "⏹️ Stop Recording"
- Review and click "Send Message"
Listen to Messages:
- Messages appear in the messages page
- Click play on the audio player
- Message is automatically marked as read
Caregivers can:
- View linked elderly users
- See daily health summaries
- Check medication adherence
- Send and receive voice messages
Link an Elderly User:
- Contact administrator or use API endpoint:
POST /api/caregiver/links
Body: { "elderly_user_id": "uuid-of-elderly-user" }Daily summaries are generated automatically after each check-in and include:
- Mood analysis (good, bad, neutral)
- Detected symptoms (health keywords)
- Medication adherence rate (percentage)
- Total check-ins for the day
Caregivers can view summaries of their linked users.
- users - User profiles with roles
- caregiver_links - Links between caregivers and elderly users
- health_checkins - Daily voice check-in records
- medications - Medication schedules and stock
- medication_logs - Medication adherence logs
- voice_messages - Two-way audio messages
- stock_alerts - Low medication stock alerts
- daily_summaries - Automated health summaries
All tables have RLS policies to ensure:
- Users can only access their own data
- Caregivers can only access data of linked users
- Secure audio file access in Supabase Storage
- Clean, modern design with Tailwind CSS
- Responsive layout for desktop and mobile
- Large buttons optimized for elderly users
- Clear visual feedback for voice recording
- Color-coded alerts for important information
- Accessible navigation with clear labels
- Supabase Authentication with JWT tokens
- Row Level Security (RLS) policies on all tables
- Secure audio file storage with access policies
- HTTPS for all API communications
- Client-side validation for form inputs
- Server-side validation in API routes
Authentication:
- Sign up as elderly user
- Sign up as caregiver
- Sign in with valid credentials
- Sign out
Check-In (Elderly User):
- Start daily check-in
- Speak and verify transcript appears
- Submit check-in
- Verify keywords detected
- Check daily summary generated
Medications (Elderly User):
- Add new medication
- View medication list
- Log medication as taken
- Verify stock decreases
- Test low stock alert
Voice Messages:
- Record voice message
- Send to recipient
- Play received message
- Verify read status updates
Caregiver Dashboard:
- Link elderly user
- View user summaries
- Check medication adherence
- Send/receive messages
✅ Chrome/Edge - Full support
✅ Safari - Full support
-
Speech Recognition:
- Requires internet connection
- Quality depends on microphone and accent
- May not work in Firefox
-
Browser Notifications:
- User must grant permission
- May not work on mobile browsers
- Requires app to be open in background
-
Audio Storage:
- Audio files in WebM format
- May not play on all browsers
- Storage limited by Supabase free tier (1GB)
care-connect/
├── app/
│ ├── api/ # API routes
│ │ ├── auth/
│ │ ├── checkin/
│ │ ├── medications/
│ │ ├── messages/
│ │ ├── summary/
│ │ └── caregiver/
│ ├── auth/ # Authentication pages
│ ├── dashboard/ # Dashboard page
│ ├── checkin/ # Check-in page
│ ├── medications/ # Medications page
│ └── messages/ # Messages page
├── components/ # Reusable UI components
├── hooks/ # Custom React hooks
│ ├── useAudioRecorder.ts
│ ├── useSpeechRecognition.ts
│ └── useSpeechSynthesis.ts
├── lib/ # Library code
│ ├── supabase/ # Supabase clients
│ ├── types.ts # TypeScript types
│ └── constants.ts # App constants
├── utils/ # Utility functions
│ ├── healthAnalysis.ts
│ └── notifications.ts
├── supabase/
│ └── schema.sql # Database schema
└── README.md
This project was built for a university software engineering course to demonstrate:
- Full-stack web development
- Database design and RLS
- API design and implementation
- Voice interface development
- Security best practices
- Clean code and architecture
- User-centered design for accessibility
- Advanced AI integration (sentiment analysis)
- Video calling
- Emergency alert system
- Integration with wearable devices
- Multi-language support
- Mobile app (React Native)
- Analytics dashboard
- Export health reports (PDF)
This is an academic project, but suggestions and improvements are welcome!
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is for educational purposes only.
For questions or issues:
- Check the Known Limitations section
- Review the Supabase SQL setup
- Verify environment variables are correct
- Check browser console for errors
This project is fully functional and demo-ready. Simply:
- Set up Supabase
- Configure environment variables
- Run
npm install && npm run dev - Create test users and demonstrate features
Built with ❤️ for elderly healthcare and emotional connectivity