An AI-first medication adherence platform for patients, caregivers, and doctors β combining real-time health monitoring, computer vision pill identification, predictive non-adherence detection, and a full family care ecosystem.
Medication non-adherence costs the healthcare system billions annually and is a leading cause of preventable hospitalizations. For elderly patients, chronic disease sufferers, and families managing care across distances β tracking medications, identifying pills, and catching missed doses before they become emergencies is brutally hard.
CareMate AI solves this end-to-end: from pill identification via camera to AI-predicted non-adherence before it happens.
| # | Feature | Model |
|---|---|---|
| 7 | Real-time Risk Score Engine | Groq Llama 3 |
| 8 | Predictive Non-Adherence Detection | Groq AI |
| 9 | Drug Interaction Checker | Groq JSON Mode |
| 11 | Weekly AI Health Narrative | Groq AI |
| 17 | Anomaly Explainer ("Why is my score low?") | Groq AI |
| 18 | Missed Dose Impact Simulator | Groq AI |
| 19 | Personalized Schedule Optimizer | Groq AI |
| 23 | Pill Photo Identification | Gemini 1.5 Flash Vision |
| 25 | Pre-Appointment Doctor Summary | Groq AI |
| 30 | Prescription OCR Scanner | Gemini 1.5 Flash Vision |
| 39 | Medication Encyclopedia | Groq AI |
| 42 | Brand β Generic β Composition Converter | Groq AI |
| 44 | Pill Verification from Photo | Gemini Vision |
- Real-time health & risk scores with animated progress rings
- Daily medication adherence streak tracking
- AI-generated daily briefings
- Smart refill alerts and low-stock warnings
- Emergency SOS with AI-generated paramedic summary
- Voice command mode (mark doses, query schedule)
- Family Circle β Invite caregivers & family members
- In-App Chat β Secure messaging between patient and caregiver
- Remote Medication Management β Caregivers can view/edit patient medications
- Live Alerts β Real-time missed dose notifications across the care network
- Video Call β Video link integration for patient-caregiver consultations
- Population-wide adherence analytics
- Patient risk score surveillance
- Critical intervention AI nudges
- Prescription management and editing
- Patient detail modals with embedded medical history
- Emergency QR Medical ID (offline-safe)
- AI-generated paramedic briefing on SOS trigger
- Emergency QR Lockscreen Wallpaper generator
- Public emergency profile URL (
/emergency-profile/:id)
- Full Progressive Web App with offline support
- Push notification reminders
- Elderly Mode β large fonts, simplified UI
- Multi-language support (English / Hindi)
- Dark mode with system preference detection
- PDF report export
| Layer | Technology |
|---|---|
| Frontend | React 19 + TypeScript + Vite |
| Styling | Tailwind CSS v4 + Custom Design System |
| Animations | Motion (Framer Motion) |
| Backend / Database | Firebase Firestore (real-time) |
| Auth | Firebase Authentication |
| Storage | Firebase Storage |
| AI β Vision | Google Gemini 1.5 Flash |
| AI β Logic / Chat | Groq Llama 3 70B (8192 ctx) |
| PWA | vite-plugin-pwa + Workbox |
| Charts | Recharts |
| jsPDF | |
| QR Codes | qrcode.react |
| Server | Express + tsx |
CareMate supports three distinct roles, each with tailored onboarding and a dedicated dashboard:
| Role | Description | Dashboard |
|---|---|---|
| Patient | Primary user managing their own medications | Home Dashboard |
| Caregiver | Family member or nurse monitoring a patient remotely | Care Network |
| Doctor | Healthcare provider with population-level analytics | Medical Command |
βββββββββββββββββββββββββββββββββββββββββββ
β CareMate PWA β
β (React + Vite + TSX) β
ββββββββββββββ¬βββββββββββββββββββββββββββββ
β
βββββββββ΄βββββββββ
β β
ββββββΌβββββ ββββββββΌβββββββ
βFirebase β β AI Layer β
βFirestoreβ β β
β Auth β β Gemini 1.5 β β Vision (Pill ID, OCR)
β Storage β β Flash β
βββββββββββ β β
β Groq Llama β β Logic (Risk, Chat, Drugs)
β 3 70B β
βββββββββββββββ
- Node.js 18+
- A Firebase project (free tier works)
- A Gemini API key β Get one free at Google AI Studio
- A Groq API key β Get one free at Groq Console
git clone https://github.com/YOUR_USERNAME/caremate-ai.git
cd caremate-ai
npm installcp .env.example .envEdit .env:
GEMINI_API_KEY=your_gemini_api_key
GROQ_API_KEY=your_groq_api_key
APP_URL=http://localhost:3000cp firebase-applet-config.example.json firebase-applet-config.jsonEdit firebase-applet-config.json with your Firebase project details:
{
"projectId": "your-project-id",
"appId": "your-app-id",
"apiKey": "your-firebase-web-api-key",
"authDomain": "your-project.firebaseapp.com",
"firestoreDatabaseId": "(default)",
"storageBucket": "your-project.firebasestorage.app",
"messagingSenderId": "your-sender-id",
"measurementId": ""
}npx firebase-tools deploy --only firestore:rulesnpm run dev
# App available at http://localhost:3000Gemini (Vision AI β pill identification & OCR)
- Go to Google AI Studio
- Click Create API Key
- Paste into
GEMINI_API_KEYin your.env
Groq (Fast text AI β risk scores, chat, drug interactions)
- Go to Groq Console
- Click Create API Key
- Paste into
GROQ_API_KEYin your.env
Firebase
- Go to Firebase Console
- Create a new project
- Enable Authentication β Email/Password
- Create a Firestore Database (start in test mode, then apply the included rules)
- Go to Project Settings β Web App and copy the config values
caremate-ai/
βββ public/ # PWA assets (icons, manifest)
βββ src/
β βββ components/ # Reusable UI components
β β βββ AddMedModal.tsx # Add medication with AI interaction check
β β βββ MainLayout.tsx # App shell with bottom navigation
β β βββ NotificationCenter.tsx # Real-time alert popover
β β βββ Onboarding.tsx # Multi-step registration (all 3 roles)
β β βββ PillReminderOverlay.tsx # Dose reminder push overlay
β βββ hooks/ # Firebase real-time data hooks
β β βββ useAuth.ts
β β βββ useMedications.ts
β β βββ useMedSchedule.ts
β β βββ useAlerts.ts
β β βββ useRiskScore.ts
β βββ lib/
β β βββ firebase.ts # Firebase initialization
β β βββ gemini.ts # All AI functions (Gemini + Groq)
β β βββ utils.ts # Utility helpers
β βββ pages/
β β βββ Home.tsx # Patient dashboard
β β βββ Meds.tsx # Medication management
β β βββ DoctorDashboard.tsx # Doctor command center
β β βββ CaregiverDashboard.tsx # Caregiver care network
β β βββ PillScanner.tsx # Vision AI pill identifier
β β βββ PrescriptionOCR.tsx # OCR prescription scanner
β β βββ DrugConverter.tsx # Brand-to-generic converter
β β βββ DoseSimulator.tsx # Missed dose impact simulator
β β βββ ScheduleOptimizer.tsx # AI schedule optimizer
β β βββ Encyclopedia.tsx # Medication encyclopedia
β β βββ FamilyCircle.tsx # Family monitoring
β β βββ FamilyChat.tsx # In-app messaging
β β βββ VoiceAssistant.tsx # Voice command interface
β β βββ EmergencyQR.tsx # Emergency QR Medical ID
β β βββ Profile.tsx # Settings & profile
β βββ services/
β βββ aiService.ts # Higher-level AI service layer
β βββ notificationService.ts # Push notification helpers
βββ functions/
β βββ src/index.ts # Firebase Cloud Functions (missed dose detection)
βββ firestore.rules # Firestore security rules
βββ .env.example # Environment variable template
βββ firebase-applet-config.example.json
βββ vite.config.ts # Vite + PWA configuration
- All Firestore reads/writes enforced by
firestore.rules - API keys are server-side only β never exposed to the client
- Firebase Authentication required for all data access
- Role-based access control for doctor/caregiver data queries
- Emergency QR profile is public but contains only non-sensitive summary data
npm run dev # Start development server (localhost:3000)
npm run build # Build for production
npm run start # Start production server
npm run lint # TypeScript type checking
npm run clean # Remove dist folder- Google Gemini β Vision AI for pill identification and OCR
- Groq β Ultra-fast LLM inference for real-time health analytics
- Firebase β Real-time database, auth, and cloud functions
- Lucide React β Icon library
- Motion β Animation library
MIT License β see LICENSE for details.
CareMate AI β Taking the guesswork out of health management.