Every drop. Every second. Every life. A real-time intelligence layer over India's blood ecosystem β built on 2,130 real, licensed blood banks across 35 states & UTs from the Government of India's open data portal.
Author: Praveen Sudireddy
India needs 13β15 million units of blood every year but collects only ~11 million β a structural shortfall of 1β4 million units (15β25%). Meanwhile:
- ~10% of collected blood expires unused β RBC units live just 42 days
- 74 districts have zero blood banks; 660M people live in "blood deserts" with marginal access
- In an emergency, families make dozens of phone calls to find a compatible unit β minutes that cost lives
- Rare groups (Oβ, ABβ) are chronically dry, yet donors willing to help are never paged
JeevanDhara attacks all four failures with one neural network.
| Engine | Magic |
|---|---|
| π¨ Emergency Matching | Scores every bank on stock coverage (0.40) Β· proximity (0.25) Β· freshness (0.20) Β· 24Γ7 readiness (0.15), then builds a multi-bank fulfillment plan with live ETAs β exact group first, Oβ universal reserve routed automatically |
| π Donor Paging | When shelves run dry (Rh-negative groups), pages the nearest eligible, committed, compatible donors β NBTC rules enforced: 90-day interval, 18β65 yrs, β₯50 kg, Hb β₯12.5 |
| 𧬠Compatibility Graph | The 8-node, 27-edge red-cell transfusion graph (Oβ universal donor β AB+ universal recipient) with rarity indices and pool mathematics |
| πΊ Network Map | All 2,130 real banks plotted live β names, districts, coordinates, contact numbers, stock health |
| π©Έ Inventory Intelligence | Days-of-supply per group & state, expiry-risk windows, and a rebalancing advisor that rescues near-expiry units by routing them to hungry banks |
| π Demand Forecast | 12-month seasonal model β monsoon dengue/malaria surge (+15β18%), winter surgery & trauma rise (+8%) β with an AI camp planner telling you where and when to hold drives |
| π€ Donor Hub | Live eligibility checker with every rule explained, next-eligible-date calculation, and "lives touchable" impact maths |
Hand-crafted, zero-dependency frontend β glassmorphism over a night-shift palette, animated ECG pulse, glowing bank constellation, count-up stats, and staged emergency scans.
docs/demo_video.mp4 β a 3-minute narrated walkthrough: the crisis in numbers, the real-data foundation, a live ABβ emergency in Mysuru (scan β multi-bank plan β donor paging), zero-waste rebalancing, seasonal forecasting with the camp planner, and the donor hub.
pip install -r requirements.txt
# seed the database (deterministic, ~10s first run)
python3 app/db.py
# launch
python3 -m uvicorn app.main:app --host 0.0.0.0 --port 8000Open http://localhost:8000 β the dashboard loads instantly.
Run the test suite (40 tests):
python3 -m pytest tests/ -vInteractive API docs are auto-generated at /docs (Swagger) and /redoc.
jeevandhara/
βββ data/
β βββ blood_banks.json # 2,130 real banks (source of truth)
β βββ raw_bloodbanks.geojson # raw government fetch (provenance)
β βββ jeevandhara.db # SQLite: banks Β· inventory Β· lots Β· donors Β· requests
βββ app/
β βββ db.py # schema + deterministic seed (rng 2026)
β βββ main.py # FastAPI Β· 15 API endpoints Β· static dashboard
β βββ engines/
β βββ compatibility.py # 27-edge transfusion graph
β βββ emergency.py # β hero: scoring + planning + paging
β βββ inventory.py # stock health + rebalancing
β βββ forecast.py # seasonal demand + camp planner
β βββ donors.py # eligibility rules + network stats
β βββ facts.py # citable real-world numbers
βββ web/ # index.html Β· style.css Β· app.js (zero deps)
βββ tests/ # 40 pytest cases (engines + API)
βββ docs/ # screenshots
| Method | Endpoint | Purpose |
|---|---|---|
POST |
/api/emergency/find |
π¨ the hero β full fulfillment plan |
GET |
/api/inventory/health |
network stock health |
GET |
/api/inventory/rebalance |
near-expiry rescue plan |
GET |
/api/forecast |
12-month projection + camps |
POST |
/api/donors/eligibility |
rule-by-rule donor check |
GET |
/api/map/banks |
all banks with geo + stock |
GET |
/api/banks Β· /api/states Β· /api/cities |
directory with renamed-city aliases (MysuruβMysoreβ¦) |
GET |
/api/compatibility |
matrix Β· rarity Β· donors-for |
GET |
/api/overview Β· /api/facts Β· /api/donors/stats Β· /api/emergency/requests |
dashboard feeds |
- Blood Bank Directory β National Health Portal (NIHFW), via data.gov.in / ArcGIS Living Atlas India β NDSAP open licence (Government Open Data License β India)
- 2,130 unique licensed banks with real names, districts, lat/lng, categories, contacts
- Inventory, lots and donors are deterministic simulations (fixed seed 2026) layered on the real network topology β every number reproducible
- Narrative statistics (shortfall, wastage, blood deserts) from NBTC/NACO, WHO, e-RaktKosh, and peer-reviewed literature, surfaced in-app with sources
JeevanDhara is a planning & demonstration system. In a real emergency, always contact your nearest blood bank or hospital directly. Inventory figures shown are simulated for the real bank network.
MIT Β© Praveen Sudireddy Β· Data under Government Open Data License β India (NDSAP)





