How lithishkanna/grannus works
Grannus is a multilingual, voice-first healthcare triage platform. A patient records or uploads symptoms; the frontend submits audio to FastAPI, whose pipeline preprocesses it, transcribes and translates it, extracts a structured clinical summary, screens for safety risks, analyzes acoustic biomarkers, and assigns priority. Results feed a doctor dashboard; doctors can return translated spoken advice, and export triage data as an ABDM-ready FHIR bundle. The graph reflects the documented workflow and sampled source references; some frontend wiring and backend stages are described by the README rather than inspected source.
Main entry points: pipeline.py Triage orchestration · main.py FastAPI endpoints · api.ts API client · priority.py Priority assessment
Components 27
Patient intake
- Voice capture
frontend/src/components/voice/audio-recorder.tsx - Audio upload
frontend/src/components/voice/file-uploader.tsx
Triage pipeline
- FastAPI endpoints
backend/app/main.py - Triage orchestration
backend/app/pipeline.py - Audio preprocessing
backend/app/audio_preprocessing.py - Acoustic analysis
backend/app/acoustic_biomarkers.py - Clinical data contracts
backend/app/schemas.py - Safety screening
backend/app/safety.py - Missing information
backend/app/missing_info.py - Feature extraction
backend/app/feature_extraction.py - Priority assessment
backend/app/priority.py - ML classifier
backend/app/ml_model.py
Language services
- Speech transcription
backend/app/services/sarvam_stt.py - Medical extraction
backend/app/services/gemini_extract.py - Translation
backend/app/services/translation.py - Self-care guidance
backend/app/services/gemini_home_remedies.py - Speech synthesis
backend/app/services/sarvam_tts.py
Doctor workflow
- Doctor dashboard
frontend/src/app/dashboard/page.tsx - Voice reply
frontend/src/components/dashboard/voice-reply-recorder.tsx - FHIR bundle export
backend/app/fhir_bundle.py
Frontend and data
- API client
frontend/src/lib/api.ts - Result persistence
frontend/src/lib/store-result.ts - Consultation database
frontend/src/lib/supabase.ts
Other components
- Patient
- Doctor
- Sarvam AI
- Gemini API
Connections 35
- Patient → Voice capture: records audio
- Patient → Audio upload: provides audio
- Voice capture → API client: submits audio
- Audio upload → API client: submits audio
- API client → FastAPI endpoints: calls API
- FastAPI endpoints → Triage orchestration: runs triage
backend/app/main.py - Triage orchestration → Audio preprocessing: preprocesses audio
backend/app/pipeline.py - Triage orchestration → Acoustic analysis: analyzes audio
backend/app/pipeline.py - Triage orchestration → Speech transcription: transcribes audio
backend/app/pipeline.py - Speech transcription → Sarvam AI: requests transcription
backend/app/services/sarvam_stt.py - Triage orchestration → Medical extraction: extracts summary
backend/app/pipeline.py - Medical extraction → Gemini API: requests extraction
backend/app/services/gemini_extract.py - Triage orchestration → Safety screening: screens risks
backend/app/pipeline.py - Triage orchestration → Missing information: detects gaps
backend/app/pipeline.py - Triage orchestration → Feature extraction: derives features
backend/app/pipeline.py - Triage orchestration → Priority assessment: assesses priority
backend/app/pipeline.py - Priority assessment → Feature extraction: extracts features
backend/app/priority.py - Priority assessment → ML classifier: classifies priority
backend/app/priority.py - Triage orchestration → Clinical data contracts: produces structured result
backend/app/pipeline.py - FastAPI endpoints → FHIR bundle export: generates bundle
backend/app/main.py - Triage orchestration → Self-care guidance: generates low-priority guidance
backend/app/services/gemini_home_remedies.py - Self-care guidance → Gemini API: requests guidance
backend/app/services/gemini_home_remedies.py - Triage orchestration → Translation: translates follow-ups
backend/app/pipeline.py - Translation → Sarvam AI: requests translation
backend/app/services/translation.py - FastAPI endpoints → Speech transcription: transcribes doctor audio
backend/app/main.py - FastAPI endpoints → Translation: translates doctor advice
backend/app/main.py - FastAPI endpoints → Speech synthesis: generates voice note
backend/app/main.py - Speech synthesis → Sarvam AI: requests speech synthesis
- API client → Result persistence: provides API results
frontend/src/lib/store-result.ts - Result persistence → Consultation database: stores consultation
frontend/src/lib/store-result.ts - Result persistence → API client: reads API client
frontend/src/lib/store-result.ts - Doctor dashboard → Consultation database: loads consultations
- Doctor → Doctor dashboard: reviews triage
- Doctor → Voice reply: records advice
- Doctor → FHIR bundle export: exports record