Rana3112/healthguard-core

Next-gen wellness platform combining specialized LLMs with dynamic UI to deliver hyper-personalized fitness guidance, OCR integrations, and autonomous browser agents for medical tracking.

16

stars

55

commits

TypeScript

primary language

Apr 27, 2026

updated

healthguard-core.vercel.app

README

HealthGuard AI

HealthGuard AI Logo

AI-Powered Health & Fitness Companion App

Version Platform License


About

HealthGuard AI is a comprehensive health and fitness Android application powered by multiple AI models. It provides intelligent health chat, fitness tracking, medicine price comparison, drug interaction checking, and smart health monitoring - all in one app.


Download

Android APK (v1.0.0)

Download the latest release: app-release.apk


Features

  • AI Health Chat - Multiple AI modes (Fast, Standard, Deep Think, Max Deep Think, Agent)
  • Fitness Hub - 2000+ exercises with GIF animations and AI workout generation
  • Medicine Price Comparison - Compare prices across Indian e-commerce platforms
  • Health Dashboard - Track vitals like BP, blood sugar, weight, temperature, heart rate
  • Drug Interaction Checker - Check drug interactions safely
  • WhatsApp Notifications - Get medicine reminders via WhatsApp
  • Voice Input - Talk to AI using microphone
  • Nearby Pharmacy Map - Find pharmacies near you using Google Maps
  • PDF Reports - Generate and download health reports
  • Chat History - Save and manage AI conversations
  • Firebase Authentication - Secure Google Sign-In

Current Android Build Updates

This build includes the latest Android-first fixes and feature additions:

  • Native Google Sign-In: Android Google login now uses Capacitor Firebase Authentication with the native Google account picker, Firebase SHA fingerprints, and google-services.json support.
  • Voice Input Fix: The chat mic records supported mobile audio formats, sends audio to /api/transcribe, and falls back to Groq Whisper in-app if the backend transcription route fails.
  • Improved Health Chat Output: AI answers now render richer mobile-friendly Markdown with care-flow cards, simple explanations, do-first actions, and seek-help guidance.
  • Smart Health Features: Added Smart Medicine Cabinet, Health Memory Timeline, AI Visit Prep PDF, Report Scanner, Family/Caregiver mode, and offline local reminders.
  • Fitness Hub Reliability: Exercise search in generated plan/chat flows can render relevant local ExerciseDB results from the bundled exercise dataset.
  • Reminder & Email Backend: Reminder email support is wired for Resend on the backend. Use environment variables for all email/API credentials.
  • Location Backend Ready: Google Places support exists behind backend configuration, but billing-dependent Google Maps/Places features should remain disabled until billing is available.

Sensitive files such as .env, .env.local, and backend/.env are intentionally ignored and must not be committed.


Tech Stack

Frontend

TechnologyVersionPurpose
React19.2.3UI library for building user interfaces
TypeScript5.8.2Type-safe JavaScript development
Vite6.2.0Fast build tool and development server
React Router DOM7.13.0Client-side routing
Tailwind CSS-Utility-first CSS framework
Framer Motion12.38.0Animation library for React
Lucide React0.562.0Beautiful icon library

Mobile (Android)

TechnologyVersionPurpose
Capacitor8.1.0Native Android app wrapper
Capacitor Android8.1.0Android platform support
Capacitor Firebase Authentication8.1.0Native Google Sign-In
Capacitor Geolocation8.1.0GPS location access
Capacitor Google Maps8.0.1Native Google Maps integration

AI & Machine Learning

TechnologyVersionPurpose
Google Gemini AI1.38.0Primary AI model for health chat
Google Generative AI0.24.1Gemini API integration
Groq SDK0.37.0Fast LLM inference for quick responses
LangChain0.3.26LLM orchestration framework
LangGraph0.2.36Stateful multi-agent workflows
LangChain Google GenAI0.1.8Gemini integration for LangChain

AI Architecture (How It Works)

┌─────────────────────────────────────────────────────────┐
│                    HealthGuard AI                        │
├─────────────────────────────────────────────────────────┤
│                                                          │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐ │
│  │   Fast Mode │    │Standard Mode│    │Deep Think   │ │
│  │   (Groq)    │    │  (Gemini)   │    │  (Gemini)   │ │
│  └──────┬──────┘    └──────┬──────┘    └──────┬──────┘ │
│         │                  │                   │        │
│         └──────────────────┼───────────────────┘        │
│                            │                            │
│                   ┌────────▼────────┐                   │
│                   │  LangGraph      │                   │
│                   │  (State Machine)│                   │
│                   └────────┬────────┘                   │
│                            │                            │
│         ┌──────────────────┼──────────────────┐         │
│         │                  │                  │         │
│  ┌──────▼──────┐    ┌─────▼─────┐    ┌──────▼──────┐  │
│  │  Clinical   │    │  Vitals   │    │  Medicine   │  │
│  │  Graph      │    │  RAG      │    │  Search     │  │
│  │  Agent      │    │  System   │    │  Agent      │  │
│  └─────────────┘    └───────────┘    └─────────────┘  │
│                                                          │
└─────────────────────────────────────────────────────────┘

LangGraph Clinical Agent

  • Uses LangGraph StateGraph for clinical conversation flow
  • Implements SOCRATES framework for medical history taking
  • Stateful conversations with MemorySaver checkpointer
  • Multi-node workflow: Intent Extraction → Information Gathering → Clinical Abstraction → Medical Search → Diagnosis

Vitals RAG System

  • Retrieval-Augmented Generation for health context
  • Stores user vitals in localStorage
  • Analyzes trends and abnormal values
  • Injects health context into every AI model's system prompt
  • Ensures all AI modes are aware of user's health condition

Agentic AI Tools

  • Function Calling with Google Gemini
  • searchMedicine - Search medicine prices across platforms
  • setHealthAlert - Set health reminders and alerts
  • Workout Generation - AI-powered personalized workout plans

Backend

TechnologyVersionPurpose
Python FlaskLatestREST API server
Flask-CORSLatestCross-origin resource sharing
MongoDB-Chat history and user data storage
PyMongoLatestMongoDB driver for Python
GunicornLatestProduction WSGI server
Python-DotenvLatestEnvironment variable management

Backend Services

ServicePurpose
Medicine Price SearchSerpAPI integration for price comparison
Exercise Database2000+ local exercises with GIF support
Workout GeneratorGroq LLM for personalized workout plans
Drug Interaction CheckerOpenRouter AI for drug interaction analysis
Chat HistoryMongoDB for persistent chat storage
Stripe IntegrationPayment processing (removed for free version)
Twilio WhatsAppWhatsApp notification service
Resend EmailBackend email delivery for reminder workflows
Groq WhisperAudio transcription for chat voice input

APIs & External Services

APIPurpose
Google GeminiPrimary AI model for health chat
GroqFast inference for quick responses
OpenRouterDrug interaction analysis
SerpAPIMedicine price search across platforms
FirebaseAuthentication (Google Sign-In)
Google MapsNearby pharmacy location
TwilioWhatsApp notifications
Groq WhisperVoice transcription
MongoDB AtlasCloud database for chat storage

Maps & Location

TechnologyVersionPurpose
Leaflet1.9.4Interactive maps library
React Leaflet5.0.0React wrapper for Leaflet
Google Maps API2.20.8Google Maps React component

PDF Generation

TechnologyVersionPurpose
jsPDF4.1.0PDF document generation
jsPDF AutoTable5.0.7Table generation in PDFs

Markdown & Rich Text

TechnologyVersionPurpose
React Markdown9.0.1Render markdown in React
Rehype Raw7.0.0Parse raw HTML in markdown
Remark GFM4.0.1GitHub Flavored Markdown support

Other Libraries

TechnologyVersionPurpose
ResendAPIEmail sending from backend
React Body Highlighter2.0.5Body muscle highlighting for exercises

Deployment

Backend

  • Platform: Red Hat OpenShift
  • Runtime: Python Flask with Gunicorn
  • Database: MongoDB Atlas (Cloud)
  • Container: Docker

Frontend/Android

  • Build Tool: Vite
  • Mobile Wrapper: Capacitor
  • Platform: Android (APK)

Architecture

HealthGuard-AI/
├── android/                    # Android native code (Capacitor)
│   ├── app/
│   │   ├── src/main/res/      # App icons, resources
│   │   └── build.gradle       # Android build config
├── backend/                    # Python Flask backend
│   ├── server.py              # Main API server
│   ├── agent_browser.py       # Medicine search agent
│   ├── playwright_order_agent.py  # Auto-order agent
│   └── data/exercises.json    # 2000+ exercises database
├── components/                 # React UI components
│   ├── TextChatInterface.tsx  # AI chat interface
│   ├── FitnessPanel.tsx       # Fitness hub
│   ├── HealthDashboard.tsx    # Health tracking
│   ├── DrugInteractionChecker.tsx  # Drug checker
│   ├── MedicinePriceCard.tsx  # Medicine prices
│   ├── NearbyPharmacyMap.tsx  # Pharmacy map
│   └── ...
├── src/
│   ├── agents/                # LangGraph agents
│   │   ├── clinicalGraph.ts   # Clinical conversation graph
│   │   ├── medicalKnowledgePrompts.ts  # Medical prompts
│   │   └── patientSession.ts  # Session management
│   ├── services/              # Frontend services
│   │   ├── firebaseAuth.ts    # Authentication
│   │   └── serverHealth.ts    # Server monitoring
│   ├── pages/                 # App pages
│   │   ├── Dashboard.tsx      # Main dashboard
│   │   ├── AuthPage.tsx       # Login/Signup
│   │   └── LandingPage.tsx    # Landing page
│   └── lib/                   # Utilities
├── services/                   # Shared services
│   ├── geminiService.ts       # Gemini AI integration
│   ├── groqService.ts         # Groq AI integration
│   └── vitalsRAG.ts           # RAG system for vitals
└── package.json               # Frontend dependencies

How RAG Works in HealthGuard AI

┌──────────────────────────────────────────────────────┐
│                  RAG Pipeline                         │
├──────────────────────────────────────────────────────┤
│                                                       │
│  1. User enters vitals (BP, sugar, weight, etc.)     │
│                    │                                  │
│                    ▼                                  │
│  2. Vitals stored in localStorage                    │
│                    │                                  │
│                    ▼                                  │
│  3. VitalsRAG analyzes:                              │
│     - Trend analysis (improving/worsening)           │
│     - Abnormal value detection                       │
│     - Severity classification                        │
│                    │                                  │
│                    ▼                                  │
│  4. Context string generated:                        │
│     "User has elevated BP (150/95), trending worse"  │
│                    │                                  │
│                    ▼                                  │
│  5. Context injected into ALL AI model prompts       │
│                    │                                  │
│                    ▼                                  │
│  6. AI responds with health-aware context            │
│                                                       │
└──────────────────────────────────────────────────────┘

App Screenshots

AI Health Chat & Fitness Hub

HealthGuard AI Screenshots

Health Dashboard & Medicine Finder

HealthGuard AI Features

All Features Overview

HealthGuard AI Overview


License

MIT License


Developer

Utkarsh Rana


Made with AI & React

Contributors

Rana3112

55 commits

Rana3112/healthguard-core

Next-gen wellness platform combining specialized LLMs with dynamic UI to deliver hyper-personalized fitness guidance, OCR integrations, and autonomous browser agents for medical tracking.

16

stars

55

commits

TypeScript

primary language

Apr 27, 2026

updated

healthguard-core.vercel.app

README

HealthGuard AI

HealthGuard AI Logo

AI-Powered Health & Fitness Companion App

Version Platform License


About

HealthGuard AI is a comprehensive health and fitness Android application powered by multiple AI models. It provides intelligent health chat, fitness tracking, medicine price comparison, drug interaction checking, and smart health monitoring - all in one app.


Download

Android APK (v1.0.0)

Download the latest release: app-release.apk


Features

  • AI Health Chat - Multiple AI modes (Fast, Standard, Deep Think, Max Deep Think, Agent)
  • Fitness Hub - 2000+ exercises with GIF animations and AI workout generation
  • Medicine Price Comparison - Compare prices across Indian e-commerce platforms
  • Health Dashboard - Track vitals like BP, blood sugar, weight, temperature, heart rate
  • Drug Interaction Checker - Check drug interactions safely
  • WhatsApp Notifications - Get medicine reminders via WhatsApp
  • Voice Input - Talk to AI using microphone
  • Nearby Pharmacy Map - Find pharmacies near you using Google Maps
  • PDF Reports - Generate and download health reports
  • Chat History - Save and manage AI conversations
  • Firebase Authentication - Secure Google Sign-In

Current Android Build Updates

This build includes the latest Android-first fixes and feature additions:

  • Native Google Sign-In: Android Google login now uses Capacitor Firebase Authentication with the native Google account picker, Firebase SHA fingerprints, and google-services.json support.
  • Voice Input Fix: The chat mic records supported mobile audio formats, sends audio to /api/transcribe, and falls back to Groq Whisper in-app if the backend transcription route fails.
  • Improved Health Chat Output: AI answers now render richer mobile-friendly Markdown with care-flow cards, simple explanations, do-first actions, and seek-help guidance.
  • Smart Health Features: Added Smart Medicine Cabinet, Health Memory Timeline, AI Visit Prep PDF, Report Scanner, Family/Caregiver mode, and offline local reminders.
  • Fitness Hub Reliability: Exercise search in generated plan/chat flows can render relevant local ExerciseDB results from the bundled exercise dataset.
  • Reminder & Email Backend: Reminder email support is wired for Resend on the backend. Use environment variables for all email/API credentials.
  • Location Backend Ready: Google Places support exists behind backend configuration, but billing-dependent Google Maps/Places features should remain disabled until billing is available.

Sensitive files such as .env, .env.local, and backend/.env are intentionally ignored and must not be committed.


Tech Stack

Frontend

TechnologyVersionPurpose
React19.2.3UI library for building user interfaces
TypeScript5.8.2Type-safe JavaScript development
Vite6.2.0Fast build tool and development server
React Router DOM7.13.0Client-side routing
Tailwind CSS-Utility-first CSS framework
Framer Motion12.38.0Animation library for React
Lucide React0.562.0Beautiful icon library

Mobile (Android)

TechnologyVersionPurpose
Capacitor8.1.0Native Android app wrapper
Capacitor Android8.1.0Android platform support
Capacitor Firebase Authentication8.1.0Native Google Sign-In
Capacitor Geolocation8.1.0GPS location access
Capacitor Google Maps8.0.1Native Google Maps integration

AI & Machine Learning

TechnologyVersionPurpose
Google Gemini AI1.38.0Primary AI model for health chat
Google Generative AI0.24.1Gemini API integration
Groq SDK0.37.0Fast LLM inference for quick responses
LangChain0.3.26LLM orchestration framework
LangGraph0.2.36Stateful multi-agent workflows
LangChain Google GenAI0.1.8Gemini integration for LangChain

AI Architecture (How It Works)

┌─────────────────────────────────────────────────────────┐
│                    HealthGuard AI                        │
├─────────────────────────────────────────────────────────┤
│                                                          │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐ │
│  │   Fast Mode │    │Standard Mode│    │Deep Think   │ │
│  │   (Groq)    │    │  (Gemini)   │    │  (Gemini)   │ │
│  └──────┬──────┘    └──────┬──────┘    └──────┬──────┘ │
│         │                  │                   │        │
│         └──────────────────┼───────────────────┘        │
│                            │                            │
│                   ┌────────▼────────┐                   │
│                   │  LangGraph      │                   │
│                   │  (State Machine)│                   │
│                   └────────┬────────┘                   │
│                            │                            │
│         ┌──────────────────┼──────────────────┐         │
│         │                  │                  │         │
│  ┌──────▼──────┐    ┌─────▼─────┐    ┌──────▼──────┐  │
│  │  Clinical   │    │  Vitals   │    │  Medicine   │  │
│  │  Graph      │    │  RAG      │    │  Search     │  │
│  │  Agent      │    │  System   │    │  Agent      │  │
│  └─────────────┘    └───────────┘    └─────────────┘  │
│                                                          │
└─────────────────────────────────────────────────────────┘

LangGraph Clinical Agent

  • Uses LangGraph StateGraph for clinical conversation flow
  • Implements SOCRATES framework for medical history taking
  • Stateful conversations with MemorySaver checkpointer
  • Multi-node workflow: Intent Extraction → Information Gathering → Clinical Abstraction → Medical Search → Diagnosis

Vitals RAG System

  • Retrieval-Augmented Generation for health context
  • Stores user vitals in localStorage
  • Analyzes trends and abnormal values
  • Injects health context into every AI model's system prompt
  • Ensures all AI modes are aware of user's health condition

Agentic AI Tools

  • Function Calling with Google Gemini
  • searchMedicine - Search medicine prices across platforms
  • setHealthAlert - Set health reminders and alerts
  • Workout Generation - AI-powered personalized workout plans

Backend

TechnologyVersionPurpose
Python FlaskLatestREST API server
Flask-CORSLatestCross-origin resource sharing
MongoDB-Chat history and user data storage
PyMongoLatestMongoDB driver for Python
GunicornLatestProduction WSGI server
Python-DotenvLatestEnvironment variable management

Backend Services

ServicePurpose
Medicine Price SearchSerpAPI integration for price comparison
Exercise Database2000+ local exercises with GIF support
Workout GeneratorGroq LLM for personalized workout plans
Drug Interaction CheckerOpenRouter AI for drug interaction analysis
Chat HistoryMongoDB for persistent chat storage
Stripe IntegrationPayment processing (removed for free version)
Twilio WhatsAppWhatsApp notification service
Resend EmailBackend email delivery for reminder workflows
Groq WhisperAudio transcription for chat voice input

APIs & External Services

APIPurpose
Google GeminiPrimary AI model for health chat
GroqFast inference for quick responses
OpenRouterDrug interaction analysis
SerpAPIMedicine price search across platforms
FirebaseAuthentication (Google Sign-In)
Google MapsNearby pharmacy location
TwilioWhatsApp notifications
Groq WhisperVoice transcription
MongoDB AtlasCloud database for chat storage

Maps & Location

TechnologyVersionPurpose
Leaflet1.9.4Interactive maps library
React Leaflet5.0.0React wrapper for Leaflet
Google Maps API2.20.8Google Maps React component

PDF Generation

TechnologyVersionPurpose
jsPDF4.1.0PDF document generation
jsPDF AutoTable5.0.7Table generation in PDFs

Markdown & Rich Text

TechnologyVersionPurpose
React Markdown9.0.1Render markdown in React
Rehype Raw7.0.0Parse raw HTML in markdown
Remark GFM4.0.1GitHub Flavored Markdown support

Other Libraries

TechnologyVersionPurpose
ResendAPIEmail sending from backend
React Body Highlighter2.0.5Body muscle highlighting for exercises

Deployment

Backend

  • Platform: Red Hat OpenShift
  • Runtime: Python Flask with Gunicorn
  • Database: MongoDB Atlas (Cloud)
  • Container: Docker

Frontend/Android

  • Build Tool: Vite
  • Mobile Wrapper: Capacitor
  • Platform: Android (APK)

Architecture

HealthGuard-AI/
├── android/                    # Android native code (Capacitor)
│   ├── app/
│   │   ├── src/main/res/      # App icons, resources
│   │   └── build.gradle       # Android build config
├── backend/                    # Python Flask backend
│   ├── server.py              # Main API server
│   ├── agent_browser.py       # Medicine search agent
│   ├── playwright_order_agent.py  # Auto-order agent
│   └── data/exercises.json    # 2000+ exercises database
├── components/                 # React UI components
│   ├── TextChatInterface.tsx  # AI chat interface
│   ├── FitnessPanel.tsx       # Fitness hub
│   ├── HealthDashboard.tsx    # Health tracking
│   ├── DrugInteractionChecker.tsx  # Drug checker
│   ├── MedicinePriceCard.tsx  # Medicine prices
│   ├── NearbyPharmacyMap.tsx  # Pharmacy map
│   └── ...
├── src/
│   ├── agents/                # LangGraph agents
│   │   ├── clinicalGraph.ts   # Clinical conversation graph
│   │   ├── medicalKnowledgePrompts.ts  # Medical prompts
│   │   └── patientSession.ts  # Session management
│   ├── services/              # Frontend services
│   │   ├── firebaseAuth.ts    # Authentication
│   │   └── serverHealth.ts    # Server monitoring
│   ├── pages/                 # App pages
│   │   ├── Dashboard.tsx      # Main dashboard
│   │   ├── AuthPage.tsx       # Login/Signup
│   │   └── LandingPage.tsx    # Landing page
│   └── lib/                   # Utilities
├── services/                   # Shared services
│   ├── geminiService.ts       # Gemini AI integration
│   ├── groqService.ts         # Groq AI integration
│   └── vitalsRAG.ts           # RAG system for vitals
└── package.json               # Frontend dependencies

How RAG Works in HealthGuard AI

┌──────────────────────────────────────────────────────┐
│                  RAG Pipeline                         │
├──────────────────────────────────────────────────────┤
│                                                       │
│  1. User enters vitals (BP, sugar, weight, etc.)     │
│                    │                                  │
│                    ▼                                  │
│  2. Vitals stored in localStorage                    │
│                    │                                  │
│                    ▼                                  │
│  3. VitalsRAG analyzes:                              │
│     - Trend analysis (improving/worsening)           │
│     - Abnormal value detection                       │
│     - Severity classification                        │
│                    │                                  │
│                    ▼                                  │
│  4. Context string generated:                        │
│     "User has elevated BP (150/95), trending worse"  │
│                    │                                  │
│                    ▼                                  │
│  5. Context injected into ALL AI model prompts       │
│                    │                                  │
│                    ▼                                  │
│  6. AI responds with health-aware context            │
│                                                       │
└──────────────────────────────────────────────────────┘

App Screenshots

AI Health Chat & Fitness Hub

HealthGuard AI Screenshots

Health Dashboard & Medicine Finder

HealthGuard AI Features

All Features Overview

HealthGuard AI Overview


License

MIT License


Developer

Utkarsh Rana


Made with AI & React

Contributors

Rana3112

55 commits

Languages

TypeScript

63.4%

Python

28.3%

HTML

7.7%