Swaas-Delhi is an advanced, real-time air quality monitoring and personalized public health companion application designed specifically to mitigate the health impact of Delhi's severe seasonal smog. Built on a robust, highly secure architecture, the platform features a responsive dark-theme glassmorphism interface integrating interactive Leaflet maps, a local Linear Regression machine learning model for 24-hour diurnal AQI forecasting, and a target-profile respiration exposure simulator that calculates particulate inhalation rates. The system utilizes an Elasticsearch cluster hosted on Elastic Cloud for geo-spatial distance queries and anonymous symptom indexing, and integrates a context-aware Swaas AI Assistant (RAG) powered by Gemini and Groq APIs to generate localized, doctor-grade medical advisories. By transforming complex telemetry index counts into actionable health metrics and clean-air detours, Swaas-Delhi serves as a secure, production-ready health defense system for vulnerable groups.

Swaas-Delhi offers a suite of advanced public health tools starting with an Interactive Leaflet Map that plots real-time monitoring stations and uses geo-distance sorting to locate the nearest AQI readings. To keep users protected, the platform integrates an AI/ML Anomaly Spike Alerts system that automatically flags localized pollution surges using standard deviation thresholding, coupled with a diurnal AQI trend chart that displays solid historical records and dashed predictive curves using a built-in Linear Regression forecasting model. Additionally, it features a Respiration Exposure Simulator which calculates real-time PM2.5 inhalation rates and cigarette equivalences based on custom body profiles (e.g. asthmatic, child, elderly), an Elastic Green Commuter routing system that maps low-exposure path detours, and a Swaas AI Health Advisor chatbot utilizing Retrieval-Augmented Generation (RAG) to deliver AIIMS-standard medical advisories. Finally, the app hosts an Anonymous Symptom Logger that securely indexes community health distress trends directly to Elasticsearch and generates printable Emergency Medical Action Cards for partner pulmonology care clinics.

  • Tech Stack & Architecture The application is engineered on a modern, lightweight, full-stack architecture consisting of a frontend built with semantic HTML5, Vanilla CSS3, and ES6 JavaScript, utilizing self-hosted libraries for Leaflet.js and Chart.js to ensure complete immunity from tracking blockers. The server layer is powered by a Node.js and Express backend that manages API endpoints, performs input sanitization to block XSS vulnerabilities, and handles secure network communication. Data storage, geo-spatial query operations, and symptom log ingestion are managed via a high-performance Elasticsearch cluster securely hosted on Elastic Cloud. The artificial intelligence components are driven by the Gemini-2.0-Flash API for context-aware RAG operations, with a secondary Groq API (Llama-3.1-8b-instant) backup configuration establishing an automatic failover system to ensure 100% server uptime during rate limits.
Share this project:

Updates