Skip to content

About

Respiratory health assistant combining hyper-local air quality, personalized medical guidance, RAG, and smart SOS protection.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

RespiGuard: AI-Powered Respiratory Health Assistant

Wlogo



React Glassmorphism Flask Gemini Gemini%20Embeddings Pinecone Firebase

created & enhanced during Hack Zenith 2026

โ€œOthers measure the air; we measure its impact on you.โ€

A personalized medical digital twin that combines real-time hyper-local air quality data with AI-driven clinical guidance to protect respiratory patients.


๐Ÿšฉ The Problem

  • Generic Data: Standard weather apps show city-wide averages, ignoring the pollution right outside your door.
  • Panic, Not Pragmatism: Global AQI standards often flag Indian air as "Hazardous" 24/7, causing alarm fatigue without actionable advice.
  • Lack of Medical Context: A general "Avoid Outdoors" warning is useless for an office commuter. Patients need advice tailored to their specific conditions (e.g., Asthma) and medications.

๐ŸŸข The Solution: RespiGuard

RespiGuard moves beyond passive monitoring to active health defense:

  1. ๐Ÿšฆ Visual Risk Dashboard: Converts complex PM2.5 numbers into a simple Red/Yellow/Green traffic light system.
  2. ๐Ÿฉบ AI Medical Twin: Uses RAG (Retrieval-Augmented Generation) to give advice based on your specific condition and meds.
  3. ๐Ÿง  Pragmatic Risk Engine: Distinguishes between "Exercise" (Avoid) and "Commute" (Wear N95), tailored to the Indian context.
  4. ๐Ÿšจ Smart SOS: A "Voice for the Voiceless" panic button that broadcasts location and medical history to guardians when the patient cannot speak.

๐Ÿ“ธ Screenshots

Home Page Dashboard Ask AI
image image image
User Profile SOS Page
image image

โš™๏ธ Technology Stack

Frontend (Client)

  • React + Vite: Fast, modern UI with "Frutiger Aero" glassmorphism aesthetics.
  • Tailwind CSS: For responsive and clean styling.
  • Lucide React: Beautiful, consistent icons.

Backend (Server)

  • Python Flask: REST API server handling business logic.
  • LangChain: Orchestrator for RAG (Retrieval-Augmented Generation).
  • Google Gemini 2.5 Flash: High-speed LLM for medical reasoning and chat.
  • Pinecone: Vector Database for storing GINA/WHO medical guidelines.

Services & APIs

  • Firebase Firestore: NoSQL database for User Profiles and History.
  • OpenWeatherMap API: Real-time hyper-local AQI & PM2.5 data.
  • Twilio API: SMS, WhatsApp, and Voice Call alerts for the SOS system.

๐Ÿš€ Features

1. Hyper-Local AQI Dashboard

Real-time pollution tracking that calculates the Indian National Air Quality Index (NAQI). It provides specific "Activity Cards" telling you if it's safe to:

  • ๐Ÿƒ Go for a run (Outdoor Exercise)
  • ๐Ÿšถ Walk to work (Commute)
  • ๐Ÿ  Open windows (Ventilation)

2. The AI "Medical Doctor" (Chatbot)

Ask questions like "Can I go out if I use my inhaler?"

  • Context-Aware: Knows your specific condition (e.g., Bronchial Asthma) and current medications.
  • Fact-Based: Answers are grounded in verified medical documents (RAG), not generic AI hallucinations.
  • Memory: Remembers previous turns in the conversation for a natural flow.

3. Smart SOS System

In a respiratory emergency, every second counts. One tap triggers:

  • WhatsApp Alert: Sends live Google Maps location + Patient Medical Profile to guardians.
  • Voice Call: Automated call to guardians reading out the emergency context.
  • First Aid Voice Mode: Reads out immediate calming steps to the patient.

๐Ÿ› ๏ธ Installation & Setup

Prerequisites

  • Node.js & npm
  • Python 3.9+
  • Firebase Project Credentials
  • API Keys (Google Gemini, OpenWeather, Pinecone, Twilio)

1. Clone the Repository

git clone https://github.com/tulu-g559/Respi_Guard.git
cd RespiGuard

2. Backend Setup

cd server  
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate  
pip install -r requirements.txt   `

Create a .env file in /server with your keys:

GOOGLE_API_KEY=your_key  

PINECONE_API_KEY=your_key 
PINECONE_INDEX=your_index_name 
OPENWEATHER_API_KEY=your_key  

TWILIO_SID=your_sid  
TWILIO_AUTH_TOKEN=your_token  
TWILIO_FROM_NUMBER=your_number

3. Frontend Setup

cd client  
npm install

Create a .env file in /client with your Firebase config:

VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain
VITE_FIREBASE_PROJECT_ID=your_firebase_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id
VITE_FIREBASE_APP_ID=your_firebase_app_id
VITE_FIREBASE_MEASUREMENT_ID=your_firebase_measurement_id

4. Run the App

Terminal 1 (Backend):

python app.py

Terminal 2 (Frontend):

npm run dev

๐Ÿ”ฎ Future Roadmap

  • Wearable Integration: Connect with smartwatches to detect SpO2 drops automatically.

  • Community Heatmap: Crowdsource air quality data to find "Clean Air Pockets" in cities.

  • Vernacular Voice Mode: Support for Hindi/Bengali voice commands for rural accessibility.

๐Ÿค Contributing

Contributions are welcome! Please fork the repository and submit a pull request.

About

Respiratory health assistant combining hyper-local air quality, personalized medical guidance, RAG, and smart SOS protection.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages