How nethras314/memora works
MEMORA supports patient and caregiver cognitive and daily-life assistance through web and mobile clients, with FastAPI services for patient records, memories, routines, cognitive exercises, voice, and caregiver insights. Clients authenticate, select a patient, and use those domain features; caregivers can review cognitive stability. The backend uses Supabase for persistence and Sarvam AI for regional speech. The README documents the overall integrations; several client and route implementations were not sampled, so their internal call paths are not inferred.
Main entry points: main.py FastAPI application · database.py Supabase connection · voice.py Voice endpoints · schemas.py Domain schemas
Components 27
Patient and caregiver apps
- Web application
frontend/src/App.jsx - Web authentication
frontend/src/context/AuthContext.jsx - Web care features
frontend/src/pages - Web voice assistant
frontend/src/components/VoiceAssistantModal.jsx - Web API client
frontend/src/services/api.js - Mobile application
mobile/App.js - Mobile authentication
mobile/src/lib/auth.js - Mobile care screens
mobile/src/screens - Mobile API client
mobile/src/lib/api.js
Backend domain API
- FastAPI application
backend/app/main.py - Authentication routes
backend/app/api/routes/auth.py - Patient records
backend/app/api/routes/patients.py - Memory bank
backend/app/api/routes/memories.py - Routines and reminders
backend/app/api/routes/routines.py - Cognitive exercises
backend/app/api/routes/cognitive.py - Voice endpoints
backend/app/api/routes/voice.py - Caregiver insights
backend/app/api/routes/caregiver.py
Backend services
- Domain schemas
backend/app/models/schemas.py - Difficulty and stability engine
backend/app/services/dda_engine.py - Question bank
backend/app/services/question_bank.py - Regional voice service
backend/app/services/sarvam_service.py
Identity and persistence
- Patient access control
backend/app/core/access.py - Authentication and roles
backend/app/core/security.py - Supabase connection
backend/app/core/database.py
Other components
- Patient or caregiver
- Supabase
- Sarvam AI
Connections 45
- Patient or caregiver → Web application: uses
README.md - Patient or caregiver → Mobile application: uses
README.md - Web application → Web authentication: provides auth
frontend/src/App.jsx - Web application → Web care features: renders
frontend/src/App.jsx - Web application → Web voice assistant: opens
frontend/src/App.jsx - Web application → Web API client: uses
frontend/src/App.jsx - Web authentication → Web API client: calls
frontend/src/context/AuthContext.jsx - Web voice assistant → Web API client: calls
frontend/src/components/VoiceAssistantModal.jsx - Mobile application → Mobile authentication: provides auth
mobile/App.js - Mobile application → Mobile care screens: routes screens
mobile/App.js - Mobile authentication → Mobile API client: calls
mobile/src/lib/auth.js - Web API client → FastAPI application: sends REST requests
frontend/src/services/api.js - Mobile API client → FastAPI application: sends API requests
- FastAPI application → Authentication routes: registers routes
backend/app/main.py - FastAPI application → Patient records: registers routes
backend/app/main.py - FastAPI application → Memory bank: registers routes
backend/app/main.py - FastAPI application → Routines and reminders: registers routes
backend/app/main.py - FastAPI application → Cognitive exercises: registers routes
backend/app/main.py - FastAPI application → Voice endpoints: registers routes
backend/app/main.py - FastAPI application → Caregiver insights: registers routes
backend/app/main.py - Authentication routes → Authentication and roles: uses auth
backend/app/api/routes/auth.py - Authentication routes → Supabase connection: reads and writes
backend/app/api/routes/auth.py - Patient records → Patient access control: checks access
backend/app/api/routes/patients.py - Patient records → Supabase connection: reads and writes
backend/app/api/routes/patients.py - Memory bank → Supabase connection: reads and writes
backend/app/api/routes/memories.py - Routines and reminders → Supabase connection: reads and writes
backend/app/api/routes/routines.py - Cognitive exercises → Difficulty and stability engine: adapts difficulty
backend/app/api/routes/cognitive.py - Cognitive exercises → Question bank: loads questions
backend/app/api/routes/cognitive.py - Caregiver insights → Difficulty and stability engine: calculates stability
backend/app/api/routes/caregiver.py - Caregiver insights → Patient access control: checks access
backend/app/api/routes/caregiver.py - Voice endpoints → Regional voice service: uses voice service
backend/app/api/routes/voice.py - Voice endpoints → Routines and reminders: uses routine data
backend/app/api/routes/voice.py - Voice endpoints → Memory bank: uses memory data
backend/app/api/routes/voice.py - Voice endpoints → Patient records: uses patient data
backend/app/api/routes/voice.py - Regional voice service → Sarvam AI: connects to
README.md - Supabase connection → Supabase: connects to
backend/app/core/database.py - Authentication routes → Domain schemas: validates payloads
backend/app/api/routes/auth.py - Patient records → Domain schemas: validates payloads
backend/app/api/routes/patients.py - Memory bank → Domain schemas: validates payloads
backend/app/api/routes/memories.py - Routines and reminders → Domain schemas: validates payloads
backend/app/api/routes/routines.py - Cognitive exercises → Domain schemas: validates payloads
backend/app/api/routes/cognitive.py - Voice endpoints → Domain schemas: validates payloads
backend/app/api/routes/voice.py - Caregiver insights → Domain schemas: validates payloads
backend/app/api/routes/caregiver.py - Patient access control → Supabase connection: queries patients
backend/app/core/access.py - Authentication and roles → Supabase connection: checks Supabase identity
backend/app/core/security.py