How variablepotato/microland_hackathon works
MediCare is a hybrid medication companion for patients and caregivers. The user signs in, then the routed app presents the dashboard and medicine, schedule, history, refill, caregiver, and AI workflows. Medication and dose services combine Supabase with an offline cache; scheduling also sets local reminders, while adherence summarizes dose logs. The AI assistant proposes safety-aware schedule actions for explicit approval. The README documents biometric access, caregiver push alerts, and native Android support; their implementation paths are included, but unsampled wiring is not asserted.
Main entry points: App.tsx Routed application · aiService.ts AI agent service · scheduleService.ts Scheduling service · medicationService.ts Medication service
Components 25
App and access
- Routed application
src/App.tsx - Authentication
src/contexts/AuthContext.tsx
Medication care
- Dashboard
src/pages/Dashboard.tsx - Medicine cabinet
src/pages/Medicines.tsx - Medication service
src/features/medication/medicationService.ts - Dose schedule
src/pages/Schedule.tsx - Scheduling service
src/features/scheduling/scheduleService.ts - Adherence analytics
src/features/adherence/adherenceService.ts - History view
src/pages/History.tsx - Refill alerts
src/pages/Refills.tsx - Caregiver links
src/features/caregiver/caregiverService.ts
AI assistance
- AI assistant UI
src/pages/AIAssistant.tsx - AI agent service
src/features/ai-assistant/aiService.ts - AI edge function
supabase/functions/ai-assistant/index.ts
Platform services
- Biometric lock
src/services/biometric.ts - Offline cache
src/services/offline.ts - Sync queue
src/services/sync.ts - Local reminders
src/services/notifications.ts - Caregiver push
src/services/fcm.ts - Android shell
android/app/src/main/java/com/medicare/app/MainActivity.java
Backend integrations
- Push edge function
supabase/functions/notification-service/index.ts - Supabase client
src/services/supabase.ts
Other components
- Patient or caregiver
- Gemini API
- Firebase messaging
Connections 39
- Patient or caregiver → Routed application: opens
src/App.tsx - Routed application → Authentication: checks session
src/App.tsx - Routed application → Dashboard: routes
src/App.tsx - Routed application → Medicine cabinet: routes
src/App.tsx - Routed application → Dose schedule: routes
src/App.tsx - Routed application → History view: routes
src/App.tsx - Routed application → Refill alerts: routes
src/App.tsx - Routed application → AI assistant UI: routes
src/App.tsx - Routed application → Caregiver links: routes
src/App.tsx - Authentication → Supabase client: authenticates
src/contexts/AuthContext.tsx - Authentication → Biometric lock: uses lock
src/components/ProtectedRoute.tsx - Dashboard → Scheduling service: loads doses
src/pages/Dashboard.tsx - Dashboard → Medication service: loads medicines
src/pages/Dashboard.tsx - Dashboard → Adherence analytics: loads metrics
src/pages/Dashboard.tsx - Medicine cabinet → Medication service: manages
src/pages/Medicines.tsx - Dose schedule → Scheduling service: marks doses
src/pages/Schedule.tsx - Scheduling service → Medication service: updates stock
src/features/scheduling/scheduleService.ts - Scheduling service → Local reminders: schedules reminders
src/features/scheduling/scheduleService.ts - Medication service → Offline cache: caches records
src/features/medication/medicationService.ts - Scheduling service → Offline cache: caches doses
src/features/scheduling/scheduleService.ts - Adherence analytics → Offline cache: reads dose logs
src/features/adherence/adherenceService.ts - History view → Adherence analytics: shows trends
src/pages/History.tsx - Refill alerts → Medication service: checks stock
src/pages/Refills.tsx - Caregiver links → Supabase client: stores links
src/features/caregiver/caregiverService.ts - AI assistant UI → AI agent service: sends chat
src/pages/AIAssistant.tsx - AI agent service → Medication service: reads medicines
src/features/ai-assistant/aiService.ts - AI agent service → Scheduling service: reads or saves schedules
src/features/ai-assistant/aiService.ts - AI agent service → Adherence analytics: reads adherence
src/features/ai-assistant/aiService.ts - AI agent service → Offline cache: uses fallback data
src/features/ai-assistant/aiService.ts - AI agent service → Local reminders: sets approved reminders
src/features/ai-assistant/aiService.ts - AI agent service → Gemini API: requests generation
src/features/ai-assistant/aiService.ts - AI edge function → Gemini API: calls model
- Routed application → Offline cache: initializes
src/App.tsx - Sync queue → Offline cache: reads queue
src/services/sync.ts - Sync queue → Supabase client: syncs records
src/services/sync.ts - Routed application → Caregiver push: registers device
src/App.tsx - Push edge function → Firebase messaging: sends alerts
- Android shell → Routed application: hosts WebView
- Caregiver push → Firebase messaging: uses messaging