Real-time natural disaster tracker for India.
Sentinel fetches fire hotspots, earthquakes, floods, cyclones, and air quality readings from five public APIs and upserts them into Supabase every day. A frontend map visualises active events across India.
https://sentinel-frontend-8hem.onrender.com
sentinel/
├── pipeline/ — Python data pipeline
│ ├── fetchers/
│ ├── pipeline.py
│ ├── backfill.py
│ ├── archive.py
│ ├── config.py
│ ├── requirements.txt
│ └── render.yaml
└── frontend/ — Vite + React map interface (live at sentinel-frontend-8hem.onrender.com)
├── src/
│ ├── lib/ — Supabase client, types
│ ├── hooks/ — React Query data hooks
│ ├── pages/ — Landing, Dashboard
│ └── components/ — map, layout, ui
├── package.json
└── render.yaml
┌─────────────────────────────────────────────────────────┐
│ Render Cron (daily) │
└───────────────────────┬─────────────────────────────────┘
│
▼
┌─────────────────┐
│ pipeline.py │ orchestrator
└────────┬────────┘
┌──────────────┼──────────────┬──────────────┬──────────────┐
▼ ▼ ▼ ▼ ▼
fetchers/ fetchers/ fetchers/ fetchers/ fetchers/
firms.py eonet.py gdacs.py usgs.py openaq.py
(NASA FIRMS) (NASA EONET) (GDACS) (USGS) (OpenAQ)
│ │ │ │ │
└──────────────┴──────┬───────┴──────────────┘ │
▼ ▼
┌──────────────┐ ┌──────────────────┐
│ events │ │ aqi_readings │
│ (Supabase) │ │ (Supabase) │
└──────────────┘ └──────────────────┘
│ │
└──────────────┬───────────────────────┘
▼
┌─────────────────────┐
│ Frontend │
│ (Render static) │
│ sentinel-frontend- │
│ 8hem.onrender.com │
└─────────────────────┘
| Source | What it provides | Auth | Update frequency |
|---|---|---|---|
| NASA FIRMS | Fire hotspots (VIIRS NOAA-20) | API key | Near real-time |
| NASA EONET | Wildfires, severe storms | None | Real-time |
| GDACS | Floods, cyclones, earthquakes | None | Event-driven |
| USGS Earthquake Hazards | Earthquakes (M4.0+) | None | Real-time |
| OpenAQ v3 | PM2.5, PM10, NO2, SO2, O3 | API key | Hourly |
- Python 3.11
- supabase-py — database client
- requests — HTTP
- python-dotenv — environment variables
- Supabase — Postgres database + REST API
- Render — cron job + static site host
- Vite + React 19 + TypeScript — frontend
- Tailwind CSS + MapLibre GL + Recharts — styling, map, charts
- React Query + Supabase client — frontend data layer
git clone https://github.com/Jcube101/sentinel.git
cd sentinel/pipeline
python -m venv venv
source venv/Scripts/activate # Windows Git Bash
pip install -r requirements.txtcp .env.example .envEdit .env with your credentials.
cd sentinel/pipeline
python pipeline.pypython -m fetchers.firms
python -m fetchers.eonet
python -m fetchers.gdacs
python -m fetchers.usgs
python -m fetchers.openaqpython backfill.py --source all --days 90
python backfill.py --source firms --days 30
python backfill.py --source usgs --days 365python archive.pyArchives events older than 30 days and AQI readings older than 7 days to sentinel_archive.db.
Run once as Administrator in PowerShell:
.\setup_task_scheduler.ps1pipeline.py runs cleanup at the end of every execution:
| Data | Retention in Supabase |
|---|---|
| FIRMS / GDACS events | 60 days |
| EONET / USGS events | 365 days |
| AQI readings | 7 days |
Old data is archived locally via archive.py before deletion.
| Variable | Required | Description |
|---|---|---|
SUPABASE_URL |
Yes | Your Supabase project URL |
SUPABASE_SERVICE_KEY |
Yes | Supabase service role key |
FIRMS_MAP_KEY |
Yes | NASA FIRMS MAP key |
OPENAQ_API_KEY |
Yes | OpenAQ API key |
See pipeline/.env.example for the pipeline and frontend/.env.example for the frontend.
cd frontend
npm install
cp .env.example .env.local
# fill in Supabase anon key in .env.local
npm run dev- Fetch — each fetcher calls its API and returns
List[dict]matching the Supabase schema exactly - Transform — severity levels, categories, and deterministic IDs computed during fetch
- Upsert —
pipeline.pybulk-upserts to Supabase in batches of 500 using deterministicidas conflict key - Cleanup — deletes stale rows at end of every run
- Archive —
archive.pycopies old data to local SQLite before it ages out of Supabase - Schedule — Render runs
pipeline.pydaily via cron
See ROADMAP.md.
See CONTRIBUTING.md.
MIT — see LICENSE.