Inspiration
Every time a family receives a diagnostic blood panel or discharge summary, the same anxious cycle unfolds:
- Deciphering Incomprehensible Jargon: Families are confronted with intimidating clinical terms like "elevated alkaline phosphatase," "toxic neutrophil granulation," or "microcytic hypochromasia."
- Panic-Inducing Web Searches: Frantic queries on public search engines routinely predict worst-case diagnoses, amplifying stress and emotional distress.
- Severe Privacy Risks: Uploading personal lab reports to commercial cloud AI platforms exposes sensitive Protected Health Information (PHI) to third-party corporate servers, persistent data logging, and potential biometric identity leakage.
We built ArogyaSutra (आरोग्यसूत्र) to solve both problems: a 100% air-gapped, privacy-first on-device clinical companion that translates complex diagnostic findings into calm, empathetic, and intuitive everyday language — ensuring sensitive medical data never leaves the patient's machine.
What It Does
- Layman Metaphor Engine: Rather than replacing jargon with more medical jargon, ArogyaSutra translates pathology into tangible everyday analogies:
- Hemoglobin $\rightarrow$ "Oxygen delivery vehicle / truck" carrying fuel to muscles.
- White Blood Cells (WBC) $\rightarrow$ "Immune defense soldiers" clearing temporary inflammation.
- Platelets $\rightarrow$ "Natural repair band-aids" sealing micro-vessels.
- Creatinine & eGFR $\rightarrow$ "Fine biological water filters" processing metabolic waste.
- Visual Anomaly Gauges: Color-coded range indicators immediately position biomarker values against clinical reference intervals (
LOW,NORMAL,HIGH) with non-alarmist contextual clarity. - Bilingual Vernacular Harmony (English & हिंदी): 1-click toggling between English and Hindi with custom Devanagari typography (Poppins), ensuring identical spacing, line height ($1.85$), and reading rhythm for regional patients.
- Empowered Doctor Consultations: Automatically analyzes flagged biomarkers to generate a prioritized checklist of actionable, evidence-based questions for the patient to ask their attending physician.
- Interactive Multi-Turn Copilot: An on-device conversational assistant that maintains session memory across tabs and language switches, allowing patients to ask follow-up questions in English, Hindi, or conversational Hinglish (e.g., "Khoon badhane ke liye kya khaye?").
- Longitudinal Health Tracking: Persists historical visits to a local, on-premise MongoDB instance, visualizing biomarker trajectories (e.g., HbA1c, Hemoglobin, Cholesterol) across 3- and 6-month intervals using interactive charts.
- 100% Air-Gapped Privacy Guarantee: $0$ bytes leave the host device. Text extraction, deterministic biomarker parsing, and quantized LLM inference execute entirely on-premises.
How We Built It
- Frontend Interface: Built with React 19, TypeScript, and Tailwind CSS v4 on Vite. Features a modern obsidian cyber-clinical theme with a slide-over ingestion drawer and a 6-tab workspace (Split View, Plain Summary, Copilot Chat, Doctor Checklist, Biomarker Gauges, Longitudinal Trends).
- Offline Typography Engine: Bundled local
@fontsourcepackages (Outfit, Lexend, and Poppins Devanagari) to eliminate external Google Fonts CDN calls, ensuring 100% offline rendering and reducing optical eye strain on dark OLED displays. - Deterministic Extraction Pipeline: Engineered a sub-5ms regex-based normalization engine in Node.js/Express that extracts $30+$ clinical biomarkers, units, and reference intervals directly from raw PDF buffers without requiring cloud OCR APIs.
- On-Device AI Engine: Powered by a quantized local Ollama runtime hosting
llama3.2:1b, bound by strict ethical clinical guardrails that enforce empathetic, non-diagnostic, and non-prescriptive framing. - Streaming Pipeline: Implemented Server-Sent Events (SSE) to deliver real-time token streaming with cold-start resilience and topic-aware offline fallback handlers.
- Local Data Persistence: Containerized with Docker Compose utilizing local MongoDB 7.0 with dynamic connection auto-recovery for on-device longitudinal history.
Challenges We Ran Into
- Unstructured Diagnostic PDF Variability: Diagnostic laboratories format reports with wildly differing tables, units, and spacing. We solved this by developing a robust normalization parser that standardizes naming variants (e.g., Total Leukocytes, WBC Count, TLC) into a unified clinical schema.
- Local LLM Cold-Starts & Latency: Quantized models running on consumer hardware can experience initial cold-start delays when loading weights into RAM/VRAM. We engineered a dual-phase pipeline where structured biomarker gauges render instantly in $< 5\text{ ms}$, while the LLM streams the natural-language explanation token-by-token.
- Devanagari Typographic Alignment: Hindi conjuncts and matras require distinct vertical breathing room compared to Latin text. We resolved visual crowding by eliminating negative letter-spacing for
:lang(hi)and tuning line heights to $1.85$ to maintain 1:1 visual parity with English. - Strict Clinical Safety Guardrails: Ensuring the assistant never generates speculative diagnoses or pharmaceutical dosages required multiple layers of prompt engineering and system-level guardrail constraints.
Accomplishments We're Proud Of
- Delivering a 100% free, air-gapped, zero-API-cost clinical assistant that requires no cloud subscription, no login credentials, and no external network calls.
- Achieving visual and semantic parity across English, Hindi, and Hinglish, making healthcare literacy accessible to non-English speaking families.
- Formulating the Layman Metaphor Engine, transforming intimidating lab reports into comforting, intuitive analogies.
- Crafting a fluid, cyber-clinical user experience that feels like a state-of-the-art medical tool while remaining approachable for non-experts.
What We Learned
- How to architect robust, defensive prompt guardrails that keep clinical language strictly assistive and reassuring.
- Techniques for optimizing on-premise quantized LLM inference pipelines with Server-Sent Events in a fullstack TypeScript environment.
- The critical importance of typographic nuance when designing accessible, multi-lingual interfaces for healthcare users.
What's Next for ArogyaSutra
- Edge Mobile Companion: Porting quantized models to run natively on mobile devices via llama.cpp / GGML for complete offline access on smartphones.
- On-Device Vision-OCR for Handwritten Prescriptions: Integrating a lightweight local vision model to decipher handwritten doctor notes and crumpled physical lab slips.
- Pan-India Regional Language Expansion: Broadening vernacular support to Bengali, Tamil, Telugu, Marathi, and Kannada to empower underserved rural populations.
- Medication Interaction Checker: Adding an offline safety cross-referencing tool to help patients understand timing and dietary contraindications for doctor-prescribed supplements.
Built With
- ai
- express.js
- healthcare
- javascript
- local-llm
- machine-learning
- mongodb
- node.js
- ollama
- react
- tailwind-css
Log in or sign up for Devpost to join the conversation.