How laptopasus1282007-dotcom/elderly-healthcare works
AyuCare is an elderly-care and medication-management platform with a Next.js application and a parallel Streamlit/FastAPI implementation. The main user journey is role-based access, medication scheduling and safety checks, dose logging, and caregiver visibility through adherence, alerts, and reports; appointments, vitals, family management, prescription scanning, and SOS are supporting capabilities. The graph includes the documented UI-to-feature relationships and sampled route-to-service dependencies. Some README-described behavior and the Python app’s internal calls are not fully sampled, so those links are omitted or marked unverified.
Main entry points: db.ts JSON Data Store · ElderlyPortal.tsx Elderly Portal · CaregiverPortal.tsx Caregiver Portal · gemini.ts Gemini Services
Components 25
User Experience
- Elderly Portal
src/components/ElderlyPortal.tsx - Caregiver Portal
src/components/CaregiverPortal.tsx - Passcode Access
src/components/PasscodeModal.tsx - Application Entry
src/app/page.tsx
Care Workflows
- Medication Management
src/app/api/medications/route.ts - Dose Logging
src/app/api/medications/[id]/log/route.ts - Adherence Metrics
src/app/api/adherence/route.ts - Appointments
src/app/api/appointments/route.ts - Vitals Tracking
src/app/api/vitals/route.ts - Family Management
src/app/api/family/route.ts - Emergency Contacts
src/app/api/emergency/route.ts - Emergency SOS
src/app/api/alerts/emergency-sos/route.ts - Care Reports
src/app/api/reports/summary/route.ts - Notification Records
src/app/api/notifications/route.ts
Application Services
- PIN Verification
src/app/api/auth/verify-pin/route.ts - Prescription Scanner
src/app/api/ai/scan-prescription/route.ts - Drug Safety Check
src/app/api/ai/drug-interaction/route.ts - Gemini Services
src/lib/gemini.ts - Email Dispatch
src/lib/notifications.ts
Persistence
- JSON Data Store
src/lib/db.ts
Python Application
- Streamlit Interface
streamlit_app.py - FastAPI Routes
backend/main.py - Python Data Store
backend/database.py - Python AI Service
backend/gemini_service.py
Other components
- Care Team and Patient
Connections 31
- Care Team and Patient → Application Entry: uses
README.md - Application Entry → Elderly Portal: offers
- Application Entry → Caregiver Portal: offers
- Elderly Portal → Passcode Access: accesses
README.md - Caregiver Portal → Passcode Access: accesses
README.md - Passcode Access → PIN Verification: verifies access
README.md - Elderly Portal → Dose Logging: logs doses
README.md - Caregiver Portal → Medication Management: manages schedules
README.md - Caregiver Portal → Prescription Scanner: scans prescriptions
README.md - Elderly Portal → Gemini Services: uses voice prompts
README.md - Medication Management → JSON Data Store: reads and writes
src/app/api/medications/route.ts - Medication Management → Gemini Services: checks interactions
src/app/api/medications/route.ts - Dose Logging → JSON Data Store: records doses
src/app/api/medications/[id]/log/route.ts - Dose Logging → Email Dispatch: dispatches alerts
src/app/api/medications/[id]/log/route.ts - Adherence Metrics → JSON Data Store: reads metrics
src/app/api/adherence/route.ts - Appointments → JSON Data Store: reads and writes
src/app/api/appointments/route.ts - Vitals Tracking → JSON Data Store: reads and writes
src/app/api/vitals/route.ts - Family Management → JSON Data Store: reads and writes
src/app/api/family/route.ts - Emergency Contacts → JSON Data Store: reads and writes
src/app/api/emergency/route.ts - Emergency SOS → JSON Data Store: records SOS
src/app/api/alerts/emergency-sos/route.ts - Emergency SOS → Email Dispatch: dispatches alert
src/app/api/alerts/emergency-sos/route.ts - Care Reports → JSON Data Store: reads summary
src/app/api/reports/summary/route.ts - Notification Records → JSON Data Store: reads alerts
src/app/api/notifications/route.ts - Prescription Scanner → Gemini Services: extracts schedules
src/app/api/ai/scan-prescription/route.ts - Drug Safety Check → Gemini Services: checks safety
src/app/api/ai/drug-interaction/route.ts - Drug Safety Check → JSON Data Store: reads regimen
src/app/api/ai/drug-interaction/route.ts - Streamlit Interface → FastAPI Routes: uses API
- Streamlit Interface → Python Data Store: uses data services
streamlit_app.py - Streamlit Interface → Python AI Service: uses AI services
streamlit_app.py - FastAPI Routes → Python Data Store: routes data operations
backend/main.py - FastAPI Routes → Python AI Service: routes AI checks
backend/main.py