How sundaramkasera/medikiosk works
MediKiosk is a touchless clinical-intake and triage platform: a patient kiosk wakes on proximity, conducts a voice interview, and can hand off documents for OCR; clinicians review encounters, summaries, and documents in a real-time dashboard. The backend coordinates Socket.IO events, interview reasoning, document processing, and MongoDB persistence. The graph reflects excerpted calls and indexed imports; some features and wiring are documented in the README but their implementation was not sampled, so those links are marked as documented or unverified.
Main entry points: websocket_hub.py Realtime Event Hub · ocr_pipeline.py Document OCR & Structuring · src/App.jsx Kiosk App · src/App.jsx Dashboard App
Components 24
Patient Kiosk
- Kiosk App
kiosk_frontend/src/App.jsx - Camera Mirror
kiosk_frontend/src/components/Mirror.jsx - Face & Pose Vision
kiosk_frontend/src/core/VisionEngine.js - Wake Detection
kiosk_frontend/src/hooks/useFaceWakeup.js - Gesture Cursor
kiosk_frontend/src/hooks/useGestureCursor.js - Audio I/O
kiosk_frontend/src/hooks/useAudioIO.js
Backend Workflow
- FastAPI & Socket.IO
backend/main.py - Realtime Event Hub
backend/core/websocket_hub.py - SOCRATES Interview
backend/ai/interview_agent.py - Speech Transcription
backend/ai_engine/speech_client.py - Mobile Upload
backend/routes/mobile_routes.py - Document OCR & Structuring
backend/ai_engine/ocr_pipeline.py - Encounter API
backend/routes/encounter_routes.py
Clinical Data
- Clinical Models
backend/database/models.py - MongoDB
backend/database/db.py
Doctor Dashboard
- Dashboard App
doctor_dashboard/src/App.jsx - Triage Queue
doctor_dashboard/src/components/TriageQueue.jsx - Clinical Summary
doctor_dashboard/src/components/ClinicalSummary.jsx - Document Timeline
doctor_dashboard/src/components/DocumentTimeline.jsx
Other components
- Patient
- Clinician
- Groq Services
- Google Vision
- EasyOCR
Connections 29
- Patient → Kiosk App: starts intake
- Kiosk App → Camera Mirror: renders
kiosk_frontend/src/App.jsx - Camera Mirror → Face & Pose Vision: processes camera
kiosk_frontend/src/components/Mirror.jsx - Kiosk App → Wake Detection: detects arrival
kiosk_frontend/src/App.jsx - Kiosk App → Gesture Cursor: uses cursor
kiosk_frontend/src/App.jsx - Kiosk App → Audio I/O: uses audio
kiosk_frontend/src/App.jsx - Kiosk App → Realtime Event Hub: emits events
kiosk_frontend/src/App.jsx - FastAPI & Socket.IO → Realtime Event Hub: hosts
backend/main.py - FastAPI & Socket.IO → Mobile Upload: mounts router
backend/main.py - FastAPI & Socket.IO → Encounter API: mounts router
backend/main.py - Realtime Event Hub → Speech Transcription: transcribes audio
backend/core/websocket_hub.py - Realtime Event Hub → SOCRATES Interview: runs dialogue
backend/core/websocket_hub.py - Realtime Event Hub → MongoDB: persists encounter
backend/core/websocket_hub.py - Realtime Event Hub → Clinical Models: creates encounter
backend/core/websocket_hub.py - Mobile Upload → Document OCR & Structuring: queues processing
backend/routes/mobile_routes.py - Document OCR & Structuring → MongoDB: saves extracted data
backend/ai_engine/ocr_pipeline.py - Document OCR & Structuring → Realtime Event Hub: emits result
backend/ai_engine/ocr_pipeline.py - Document OCR & Structuring → Clinical Models: builds document model
backend/ai_engine/ocr_pipeline.py - Encounter API → MongoDB: reads and finalizes
backend/routes/encounter_routes.py - Dashboard App → Triage Queue: renders
doctor_dashboard/src/App.jsx - Dashboard App → Clinical Summary: renders
doctor_dashboard/src/App.jsx - Dashboard App → Document Timeline: renders
doctor_dashboard/src/App.jsx - Dashboard App → Encounter API: fetches and finalizes
doctor_dashboard/src/App.jsx - Dashboard App → Realtime Event Hub: joins and listens
doctor_dashboard/src/App.jsx - Clinician → Dashboard App: reviews cases
- Speech Transcription → Groq Services: transcribes with Whisper
backend/ai_engine/speech_client.py - Document OCR & Structuring → Google Vision: tries OCR first
backend/ai_engine/ocr_pipeline.py - Document OCR & Structuring → EasyOCR: falls back to
backend/ai_engine/ocr_pipeline.py - Document OCR & Structuring → Groq Services: structures extracted text
backend/ai_engine/ocr_pipeline.py