Skip to content
Swaasthmitra

Swaasthmitra

In every emergency, a friend by your side.

Created on 6th December 2025

•

Swaasthmitra

Swaasthmitra

In every emergency, a friend by your side.

The problem Swaasthmitra solves

🏥 Swaasthmitra: Your AI-Powered Healthcare Companion

đź’ˇ Inspiration & The Problem It Solves

In India, healthcare access is plagued by misinformation and fragmentation. Millions face delayed or incorrect medical decisions because:

  • Misinformation: In moments of panic, users rely on unverified "Dr. Google" searches for symptoms, leading to dangerous self-diagnosis.
  • Discovery Friction: It is chaotic and slow to find, compare, and book the right vetted specialist based on fees, experience, and proximity.
  • Emergency Gap: During critical minutes (the Golden Hour), there is no unified platform for instant first-aid guidance and reliable emergency contacts.
  • Data Silos: Medical history (prescriptions, reports) is scattered across physical files and chats, forcing doctors to treat patients with incomplete data.

Swaasthmitra solves this by merging advanced AI with essential healthcare services, bringing clarity and speed to critical health moments.


✨ What Swaasthmitra Does (Key Features)

Swaasthmitra is an all-in-one health app designed for immediate, reliable medical guidance and unified patient management.

1. 🤖 AI-Powered Medical Triage

  • Uses Google Gemini to provide safe, structured, and doctor-like initial advice, available 24/7.
  • Replaces panic with informed action.

2. 🔎 Smart Doctor Discovery

  • Search, filter, compare, and book verified specialists and nearby facilities instantly.
  • Simplifies the consultation process and reduces treatment delays.

3. 🚨 Emergency Response Suite

  • One-tap SOS Mode for immediate access to first-aid instructions (e.g., CPR steps).
  • Provides local emergency numbers, critical during the first 60 seconds of a crisis.

4. đź“‚ Unified Health Vault

  • Secure digital repository to store, track, and manage all prescriptions, reports, and vitals.
  • Ensures seamless continuity of care between doctors.

🚀 Vision

Swaasthmitra aims to be every patient’s trusted companion in emergencies, bridging the gap between panic and professional care with AI-powered clarity.

Challenges we ran into

đź§— Challenges I Ran Into

1. Integrating Google Gemini for Medical-Grade Responses

  • Problem: The chatbot initially produced generic, messy outputs and often broke the conversation flow.
  • Solution:
    • Created a custom system prompt with role-based context.
    • Implemented chat history retention.
    • Enforced a SOAP-style output format, resulting in clean, predictable, and medically structured responses.

2. Managing Chat History in React Without Memory Leaks

  • Problem: Switching components caused React to re-render and erase conversation context, leading to inconsistent chatbot replies.
  • Solution:
    • Moved chat state to a global store.
    • Added localStorage fallback to preserve context.
    • Stabilized the entire AI consultation flow.

3. Leaflet Map Crashing in React (Marker + Routing Issues)

  • Problem: Leaflet reinitialized the map multiple times, throwing “Map container already initialized” errors.
  • Solution:
    • Wrapped the map in a dedicated component.
    • Ensured it mounted only once using a ref.
    • Fixed double-init issues, making the map load smoothly.

4. Dexie.js (IndexedDB) Schema Errors While Storing Health Records

  • Problem: Updating table structures (adding prescriptions, attachments, etc.) caused “VersionError: Database version changed”.
  • Solution:
    • Created proper version migrations.
    • Split data into smaller tables (prescriptions, reports, visits).
    • Achieved a stable and fast database.

5. Handling Doctor Filtering + Sorting Together

  • Problem: Combining search, specialty filters, sort options, and sample data led to unexpected UI behavior.
  • Solution:
    • Rewrote logic with a single transform pipeline.
    • Applied search → filter → sort in one clean flow.
    • Made doctor listings extremely responsive and accurate.

6. Mobile Responsiveness & UI Overflow Issues

  • Problem: Pages like the Health Records dashboard and Emergency Guide had overlapping elements on smaller devices.
  • Solution:
    • Redesigned layouts using Tailwind grid/flex utilities.
    • Tested thoroughly with Chrome DevTools device view.
    • Achieved smooth mobile responsiveness across the platform.

7. Rate-Limiting & Error Handling with Gemini API

  • Problem: Excessive queries triggered API quota errors, crashing the chatbot.
  • Solution:
    • Added retry logic.
    • Implemented loading fallbacks and graceful error messages.
    • Configured API keys via environment variables.
    • Improved reliability under heavy usage.

Discussion

Builders also viewed

See more projects on Devfolio