Skip to content

JanVayu/JanVayu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

369 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JanVayu जनवायु

A Citizen-Led National Archive of India's Air Quality Crisis

Netlify Status Website License: MIT License: CC BY-NC-SA 4.0 GitHub Issues GitHub Last Commit Zotero Library


About

JanVayu (जनवायु — "People's Air") is a non-partisan, citizen-led initiative to build India's first comprehensive public archive documenting the air quality crisis — its data, its victims, its policies, and its public memory.

This is not a campaign. It is a record.

Live at https://www.janvayu.in


Features

# Feature Description
1 Role-Based Landing Page Personalized entry point for 12 audience roles: parent, student, researcher, policymaker, journalist, citizen, activist, doctor, teacher, NGO, business owner, and woman/caregiver
2 Simple Language Mode Site-wide plain language toggle in the header that switches all content to simple language (persisted via sessionStorage)
3 Glossary (Ctrl+K) Searchable glossary overlay for air quality terms, accessible via Ctrl+K keyboard shortcut
4 Intro Tour Guided walkthrough for first-time visitors highlighting key sections and features
5 Real-Time AQI Dashboard Live air quality data from 16+ Indian cities via WAQI/CPCB, auto-refreshing every 10 minutes
6 Interactive AQI Map Leaflet.js-powered map with station-level AQI markers across India
7 Health Impact Research Curated evidence from Lancet Countdown 2025, Harvard, Karolinska, and IHME studies
8 Economic Cost Tracker Quantified GDP and productivity losses ($339.4B / 9.5% GDP)
9 Policy Tracker NCAP progress, GRAP stage history, Supreme Court and NGT orders
10 Citizen Voices Archive Social media posts, testimonies, viral content from affected communities
11 Accountability Tracker Institutional and official responses to pollution episodes
12 Social Media Feeds Aggregated Reddit, Twitter/X, Instagram, and news coverage on air quality
13 Daily Email Digest Subscribers receive a daily AQI summary for their city at 8:00 AM IST
14 AQI Calculator Interactive tool for citizens to understand AQI breakpoints and health advice
15 RTI Templates Ready-to-use Right to Information templates for pollution accountability
16 Action Guides Practical guides for citizen action, mask selection, and indoor air quality
17 Downloadable Reports Curated research papers and datasets for offline reference
18 Cultural Archive Satire, memes, art, and cultural responses to the pollution crisis
19 Blog Updates, data analysis, and reflections on India's air quality crisis at janvayu.in/blog
20 Zotero Bibliography Public bibliography of air quality research papers at zotero.org/groups/janvayu
21 Ask JanVayu PWA Installable standalone AI chat app for air quality Q&A at janvayu.in/ask — 33 cities, 10 languages, thumbs up/down feedback, works on Android, iOS, desktop
22 Learning Games Seven self-paced educational games at janvayu.in/#games — India-context Air Quality Jeopardy (5×5 board, ₹1k–₹5k tiles), 10-question PM Quick-Quiz, 7-source matcher, Clean Air Snakes & Ladders inspired by Moksha Patam, Jodi Match memory cards, Air Tambola (Indian housie), and Vayu Junction — an Only Connect / NYT-Connections / Torchlight-inspired word-grouping puzzle with four India-AQ puzzle sets
23 Women's Health Gender-specific air pollution analysis — indoor cooking exposure, maternal health, occupational risks, gender data gap. "Woman / Caregiver" role
24 Historical Map Overlay Time-slider on the live map showing monthly PM2.5 data from Jan 2024 to present, color-coded by pollution level
25 Auto-Update Infrastructure Version sync, sitemap auto-gen, feed health monitoring, translation key sync, data-stat system, reference data API, Zotero integration
26 Understanding AQI Interactive breakdown of 6 criteria pollutants, CPCB vs US EPA AQI scale comparison, "Why PM2.5 isn't the whole story"
27 Shareable AQI Cards Canvas-based PNG generator (Instagram/WhatsApp sizes), color-coded by severity, Web Share API on mobile
28 Exposure Diary Log 16 daily activities with PM2.5 multipliers, get weighted exposure, cigarette equivalence, life-expectancy impact
29 Migration Comparison Side-by-side city comparison with live AQI, source apportionment charts, life-years gained verdict
30 Data Source Selector Educational panel on CPCB/WAQI/IQAir/Sensor.Community with Source Impact Simulator
31 City Policy Tracker 8-city NCAP target dashboard with expenditure tables, government action timeline, public feedback
32 Ward-Level Atlas "How Polluted Is Your Ward?" — Leaflet choropleth of every municipal ward across 14 major Indian cities, with a four-layer toggle: live PM2.5 (interpolated), heat (Landsat surface temperature), green cover and built-up (ESA WorldCover). Per-layer legend, tooltips and live stats; surfaces the urban heat-island link from each city's own data
33 Citizen Testimony A multilingual wall of 100+ on-the-ground, first-person testimonies on how bad the air is, across 86 cities — in Hindi, English and 11 other Indian languages (Bengali, Tamil, Marathi, Telugu, Kannada, Gujarati, Punjabi, Malayalam, Odia, Urdu, Assamese), each with an English translation. Language-filter chips, free-text search, RTL rendering for Urdu, and a submission CTA to add your testimony via contribute@janvayu.in

Key Statistics (July 2026)

Metric Value Source
Annual PM2.5 Deaths 1.72 million Lancet Countdown 2025
Economic Cost $339.4 billion (9.5% GDP) Lancet Countdown 2025
India's Global Share 70% of pollution deaths Lancet Countdown 2025
Most Polluted Capital New Delhi (91.6 µg/m³) IQAir 2025
Most Polluted City Loni, India (112.5 µg/m³) IQAir 2025
Cities Meeting WHO Guideline Only 14% globally IQAir 2025
India Average PM2.5 48.9 µg/m³ (~10× WHO limit) IQAir 2025
Life Expectancy Loss (India) 3.5 years AQLI 2025

Architecture

JanVayu is designed as a lightweight, zero-framework architecture with server-side feed aggregation:

┌─────────────────────────────────────────────────────────┐
│                     Client (Browser)                    │
│  Single-page HTML app · Chart.js · Leaflet.js · WAQI   │
└──────────────────────────┬──────────────────────────────┘
                           │
              HTTPS (Netlify CDN)
                           │
┌──────────────────────────▼──────────────────────────────┐
│                   Netlify Functions                      │
│                                                          │
│  Scheduled (cron)              On-demand (API)           │
│  ┌──────────────────┐   ┌───────────────────────────┐   │
│  │ scheduled-fetch   │   │ reddit-feed.js            │   │
│  │ (every 4 hours)   │   │ twitter-feed.js           │   │
│  │                   │   │ news-proxy.js             │   │
│  │ daily-digest      │   │ instagram-feed.js         │   │
│  │ (8 AM IST daily)  │   │ feed-status.js            │   │
│  └────────┬──────────┘   │ subscribe.js              │   │
│           │              └─────────────┬─────────────┘   │
│           │                            │                  │
│           ▼                            ▼                  │
│  ┌─────────────────────────────────────────────┐         │
│  │           Netlify Blobs (Cache)              │         │
│  │  Feeds cached as JSON · Strong consistency   │         │
│  └─────────────────────────────────────────────┘         │
│                                                          │
│  ┌─────────────────────────────────────────────┐         │
│  │         Resend (Email Delivery)              │         │
│  │  Daily AQI digest to subscribers             │         │
│  └─────────────────────────────────────────────┘         │
└──────────────────────────────────────────────────────────┘

Key design decisions:

  • Single HTML file — the entire front-end is one index.html with inline CSS and JS. No build step, no bundler, no framework.
  • Server-side proxying — social media and news APIs are fetched via Netlify Functions to avoid CORS issues and protect API keys.
  • Blob caching — the scheduled function pre-fetches all feeds every 4 hours and writes results to Netlify Blobs. On-demand API functions read from the blob cache, resulting in instant responses.
  • Client-side AQI — the WAQI API is called directly from the browser every 10 minutes (the token is a free-tier public key).
  • Email digests — a scheduled function runs daily at 8:00 AM IST (2:30 AM UTC), reads subscribers from Blobs, fetches current AQI, and sends personalized HTML emails via Resend.

Auto-Updating Schedule

Task Frequency Mechanism
Social/news feed refresh Every 4 hours scheduled-fetch.mjs (Netlify Scheduled Function)
Daily AQI email digest Daily at 8:00 AM IST daily-digest.mjs (Netlify Scheduled Function)
Live AQI dashboard refresh Every 10 minutes Client-side JavaScript (WAQI API)

Project Structure

JanVayu/
├── index.html                          # Main website (single-page application)
├── favicon.svg                         # Site favicon
├── package.json                        # Node.js dependencies (Netlify Blobs, Resend)
├── netlify.toml                        # Netlify build & deploy configuration
├── .gitignore                          # Ignored files (node_modules/, .netlify/)
├── CNAME                               # Custom domain configuration
├── README.md                           # This file
├── CONTRIBUTING.md                     # Contribution guidelines
├── CODE_OF_CONDUCT.md                  # Community standards
├── LICENSE                             # MIT (code) + CC BY-NC-SA 4.0 (content)
├── blog/                               # Blog (Docsify-powered, Markdown posts)
│   ├── index.html                      # Docsify blog config
│   ├── _sidebar.md                     # Blog navigation
│   ├── README.md                       # Blog home page
│   └── posts/                          # Blog posts (YYYY-MM-DD-slug.md)
├── downloads/                          # Downloadable reports and datasets
├── netlify/
│   └── functions/                      # Netlify serverless functions
│       ├── scheduled-fetch.mjs         # Cron: fetches all feeds every 4 hours
│       ├── daily-digest.mjs            # Cron: sends daily AQI email digest
│       ├── reddit-feed.js              # API: serves cached Reddit posts
│       ├── twitter-feed.js             # API: serves cached Twitter/X posts
│       ├── news-proxy.js               # API: serves cached news articles
│       ├── instagram-feed.js           # API: serves cached Instagram posts
│       ├── feed-status.js              # API: reports feed freshness and health
│       ├── subscribe.js                # API: manages email subscriptions
│       └── blob-store.js              # Shared: Netlify Blobs store helper
└── node_modules/                       # Dependencies (git-ignored)

Technical Stack

Layer Technology Purpose
Frontend Vanilla HTML / CSS / JavaScript Zero-dependency single-page application
Charts Chart.js AQI trends and health data visualizations
Maps Leaflet.js + OpenStreetMap Interactive AQI station maps
AQI Data WAQI API Real-time air quality from 500+ stations
Serverless Netlify Functions Server-side API proxying and scheduled tasks
Caching Netlify Blobs Persistent JSON cache with strong consistency
Email Resend Transactional email delivery for daily digests
Hosting Netlify (auto-deploy from GitHub) CDN, edge functions, scheduled functions
Domain janvayu.in Custom domain via Netlify DNS

Environment Variables

The following environment variables must be configured in the Netlify dashboard for full functionality:

Variable Required Description
RESEND_API_KEY Yes API key from Resend for sending email digests
RESEND_FROM Yes Verified sender email address (e.g., digest@janvayu.in)
BLOB_TOKEN Yes Netlify personal access token for Blob store access
NETLIFY_SITE_ID Yes Netlify site identifier (used by Blob store and scheduled functions)
GROQ_API_KEY Yes Groq API key for AI features — runs the openai/gpt-oss-120b open model (free at console.groq.com). Optional GROQ_MODEL overrides the model without a code change.

Note: The WAQI API token (1f64cc8563a165dc5a6ce48f7eeb9ba0221b63f3) is a free-tier public key embedded in the client-side code. It is rate-limited by WAQI and does not require server-side protection.


Self-Hosting / Local Development

Prerequisites

Setup

# Clone the repository
git clone https://github.com/JanVayu/JanVayu.git
cd JanVayu

# Install dependencies
npm install

# Set environment variables (create a .env file or configure in Netlify CLI)
export RESEND_API_KEY="your_resend_api_key"
export RESEND_FROM="your_verified_sender@example.com"
export BLOB_TOKEN="your_netlify_personal_access_token"
export NETLIFY_SITE_ID="your_netlify_site_id"

# Start local development server with Netlify Functions support
netlify dev

The site will be available at http://localhost:8888. Netlify Dev emulates the serverless functions locally so you can test the full stack.

Without Netlify Functions

If you only need the front-end (no social feeds or email digests):

# Serve index.html with any static file server
npx serve .
# or
python3 -m http.server 8000

The AQI dashboard will work without any server-side setup since it calls the WAQI API directly from the browser.


Data Sources

JanVayu integrates 160+ verified public data sources, including:

Source Type Access
WAQI Real-time AQI Free API
CPCB CAAQMS Official AQI Free
IHME GBD Health burden Free
Lancet Countdown Annual health reports Open Access
NASA FIRMS Fire detection Free
Indian Kanoon Legal/court orders Free
PRANA Portal NCAP tracking Free
IQAir World Air Quality Report Free
ESA WorldCover 10 m land cover (green / built-up) Open (CC BY)
USGS/NASA Landsat Land-surface temperature Free (via Planetary Computer)
DataMeet Municipal ward boundaries Open (CC BY)

Roadmap

Full phased roadmap: docs/wiki/Roadmap.md · tracked on GitHub Issues.

Recently shipped (v26.6.25): the Ward-Level Atlas — every municipal ward across 10 major cities, with four switchable layers (live PM2.5, satellite heat, green cover, built-up), ward search / locate-me, and a per-ward correlation view, plus an Urban Heat Island panel.

Next up:

  • More cities — now 14 (added Kanpur, Varanasi, Bhopal, Faridabad); extending further as open ward boundaries are sourced (Agra, Lucknow, Patna still lack open files).
  • Time-aware heat — seasonal-median land-surface temperature to reduce single-day noise.
  • Platform-wide: 100+ CPCB cities, full WCAG 2.1 AA, AQI forecast horizon, push notifications.

Two earlier roadmap ideas were dropped as not feasible on open data: satellite-derived per-ward PM2.5 (no openly-fetchable ~1 km PM2.5 raster) and a Surat ward map (no open boundary file) — Chandigarh was added as the 10th city instead.


Contributing

We welcome contributions from:

  • Researchers — datasets, papers, analysis
  • Journalists — investigations, verified reports
  • Developers — code, visualizations, tools
  • Citizens — testimonies, local documentation, translations
  • Designers — accessibility, communication

See CONTRIBUTING.md for guidelines and the Collaborator Statement of Work for detailed workstream descriptions.


Governance

JanVayu is a non-partisan initiative. It is not affiliated with any political party, government body, or corporate entity.

Editorial decisions are guided by:

  • Factual accuracy and verification
  • Source transparency
  • Respect for affected communities
  • Accessibility across languages and regions

Name Change Note

This project was previously known as "Vayu Smriti" (वायु स्मृति). Following community feedback and a vote, it was renamed to JanVayu (जनवायु) in January 2026 for better linguistic inclusivity across India's diverse language communities.


Forking & Reuse

JanVayu is designed to be forked for other cities, regions, or countries. Total cost to run a fork: $0/month on free tiers (WAQI, Groq, Resend, Netlify).

See FORKING.md for a complete guide — what to change, API keys needed, and attribution requirements.

If you create a fork, let us know — we'll list it in the README.


License

  • Code: MIT License — use freely, modify, redistribute
  • Content/Documentation: CC BY-NC-SA 4.0 — share with attribution, non-commercial, same license
  • Data: Individual sources retain original licenses

See LICENSE for details. If you fork this project, please credit JanVayu as the upstream source.


Contact


Support

JanVayu is a public interest project. If you wish to support:

  • Contribute data or expertise — see Contributing above
  • Report issuesOpen an issue
  • Spread awareness — Share the website

JanVayu is built on the principle that public memory is a prerequisite for public accountability.

जनवायु — क्योंकि हवा सबकी है।

About

A citizen-led platform monitoring India's air quality crisis — real-time AQI data, health research, policy tracking, and public accountability. Auto-updating via Netlify Functions.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Sponsor this project

Packages

 
 
 

Contributors