How ace-ify/sahara-app works
Sahārā is a multilingual, voice-first healthcare companion for older adults, combining routine health support with emergency escalation. The main workflow runs from patient interaction in the mobile app through its voice/API services to the FastAPI agent, which classifies intent, executes companion tools, and can trigger emergency dispatch. The README also documents clinical scoring, medication scanning, care tracking, and voice-provider integrations. Some mobile and backend modules were not sampled; their links are included only where the README or source index supports them.
Main entry points: App.tsx Mobile app · emergency.py Dispatch ladder · server.py FastAPI service · voice.ts Voice services
Components 33
Mobile care app
- Mobile app
mobile/App.tsx - App context
mobile/src/context/AppContext.tsx - Voice conversation
mobile/src/screens/TalkScreen.tsx - Voice services
mobile/src/services/voice.ts - Speech recognition
mobile/src/services/stt.ts - Speech synthesis
mobile/src/services/tts.ts - Mobile API
mobile/src/services/api.ts - Persistent storage
mobile/src/services/storage.ts - Chat history
mobile/src/services/chatStorage.ts - Onboarding
mobile/src/screens/OnboardingScreen.tsx - Caregiver pairing
mobile/src/screens/CaregiverPairingScreen.tsx - Vitals tracking
mobile/src/screens/VitalsScreen.tsx - Prescription scanner
mobile/src/screens/PrescriptionScannerScreen.tsx - Medication care
mobile/src/screens/MedsScreen.tsx - Care history
mobile/src/screens/CareHistoryScreen.tsx - Doctor summary
mobile/src/screens/DoctorSummaryScreen.tsx - Patient profile
mobile/src/screens/ProfileScreen.tsx - Emergency screen
mobile/src/screens/EmergencyScreen.tsx
Agent backend
- FastAPI service
agent/server/src/server.py - Conversational agent
agent/server/src/agent.py - LLM reasoning
agent/server/src/brain.py - Healthcare tools
agent/server/src/tools.py
Clinical and emergency
- Intent and triage
agent/server/src/laya.py - Dispatch ladder
agent/server/src/emergency.py - Outbound calls
agent/server/src/outbound_call.py - WhatsApp alerts
agent/server/src/whatsapp.py
External integrations
- Agora voice platform
- STT and TTS providers
- Groq inference
- Health data services
Other components
- Patient
- Caregiver
- Emergency services
Connections 35
- Patient → Mobile app: uses
- Mobile app → App context: provides state
mobile/App.tsx - Mobile app → Voice conversation: routes to
mobile/App.tsx - Mobile app → Onboarding: routes to
mobile/App.tsx - Mobile app → Caregiver pairing: routes to
mobile/App.tsx - Mobile app → Vitals tracking: routes to
mobile/App.tsx - Mobile app → Prescription scanner: routes to
mobile/App.tsx - Mobile app → Medication care: routes to
mobile/App.tsx - Mobile app → Care history: routes to
mobile/App.tsx - Mobile app → Doctor summary: routes to
mobile/App.tsx - Mobile app → Patient profile: routes to
mobile/App.tsx - Mobile app → Emergency screen: routes to
mobile/App.tsx - App context → Persistent storage: reads and writes
mobile/src/context/AppContext.tsx - Voice conversation → Voice services: uses
- Voice services → Speech recognition: recognizes speech
- Voice services → Speech synthesis: speaks responses
- Voice conversation → Mobile API: sends requests
- Chat history → Persistent storage: persists sessions
mobile/src/services/chatStorage.ts - Prescription scanner → Mobile API: requests scan
mobile/src/screens/PrescriptionScannerScreen.tsx - Mobile app → FastAPI service: connects to agent
- Voice services → Agora voice platform: uses real-time voice
- Speech recognition → STT and TTS providers: transcribes speech
- Speech synthesis → STT and TTS providers: synthesizes speech
- FastAPI service → Conversational agent: invokes
agent/server/src/server.py - FastAPI service → Intent and triage: classifies intent
agent/server/src/server.py - FastAPI service → Healthcare tools: executes tools
agent/server/src/server.py - FastAPI service → Dispatch ladder: configures dispatch
agent/server/src/server.py - Conversational agent → LLM reasoning: uses reasoning
- Conversational agent → Groq inference: requests inference
- Intent and triage → Dispatch ladder: triggers escalation
- Healthcare tools → Health data services: looks up care data
- Dispatch ladder → Caregiver: alerts
- Dispatch ladder → Emergency services: dispatches
- Dispatch ladder → Outbound calls: initiates calls
- Dispatch ladder → WhatsApp alerts: sends alerts