Earthquakes, wildfires, cyclones and floods on a live globe, from open data,
with alerts when they reach the places you watch.
Open the live map · Architecture · Deploy your own
HazardWatch follows natural hazards around the world as they happen. A worker polls public feeds every few minutes, turns their very different formats into a single kind of event and stores them in PostGIS. The web app shows them on a 3D globe, over live satellite imagery if you like, and lets you draw watch zones around the places you care about: an office, a supplier, a family's town. When an event reaches one of them, you get an alert in the app, by email and as a notification on your devices.
Everything runs on public data and free hosting tiers, without a single API key.
- Every source on one map. Earthquakes from USGS, fires detected from orbit by NASA FIRMS, cyclones, floods, volcanoes and droughts from GDACS, refreshed every minute.
- Readable at any zoom. Events merge into clusters coloured by their most severe event, fires glow as a heatmap, and events that started in the past six hours pulse.
- Every event seen from orbit. Its card shows the area around it as NOAA-20 pictured it on its last day of activity, with fires in red, and steps back and forth in days.
- Shareable views. Filters by type, period and severity live in the URL, so any view can be bookmarked or sent.
The basemap switches to NASA imagery, fetched by the browser straight from NASA GIBS.
![]() |
![]() |
| Your zones, each with its recent events and the most severe of them. | A zone's page, with the hazards inside it on the map and in a list. |
A watch zone is a circle of 10 to 1,000 km around any point, drawn on the map or typed in. Its page shows the hazards inside it. When a new event reaches a zone at or above the severity chosen for it, an alert appears in the app and, once the address is confirmed, in a digest email. Turn notifications on from the alerts page, and each device you choose gets them within a minute, phones included once the app is installed.
![]() |
![]() |
| In the app, with an unread count in the header. | By email, in one digest every two minutes at most. |
Once signed in, the dashboard sums up your account: the zones with the most severe recent events, the latest alerts, whether each data feed is up to date, and what the planet looked like over the past day.
flowchart LR
subgraph feeds ["Open data feeds"]
usgs["USGS<br/>earthquakes"]
firms["NASA FIRMS<br/>fires from orbit"]
gdacs["GDACS<br/>cyclones, floods,<br/>volcanoes, droughts"]
end
worker["Worker<br/>Node.js on Render"]
db[("PostgreSQL + PostGIS<br/>on Neon")]
web["Web app<br/>Next.js on Vercel"]
smtp["SMTP<br/>alert emails"]
push["Browser push services<br/>notifications"]
browser(("Browser"))
gibs["NASA GIBS<br/>satellite imagery"]
tiles["OpenFreeMap<br/>vector tiles"]
usgs & firms & gdacs -- "polled every 1 to 30 min" --> worker
worker -- "upserts events,<br/>raises zone alerts" --> db
worker -- "digests" --> smtp
worker -- "notifications" --> push
push --> browser
web -- "events, zones, alerts" --> db
browser --> web
browser -- "basemap" --> tiles
browser -- "imagery" --> gibs
- Ingestion. The worker polls each feed on its own interval and maps it to one event model: a kind, a severity, a location and a period of activity. Satellite fire detections, about 100,000 a day, are grouped into fires by cells of 0.25°.
- Alerts. In the same transaction that writes the events, a single PostGIS query matches them against every watch zone, on the surface of the Earth, and raises the alerts that pass each zone's threshold.
- Email and push. Every two minutes, the worker claims the alerts waiting for an email and sends each confirmed user one digest. Every minute, it pushes the new ones to the browsers that turned notifications on, through the Web Push protocol.
- Web. Pages are React Server Components reading the database. The map runs MapLibre in the browser, which also loads the imagery from NASA directly, so the server never proxies a tile.
The reasoning behind each choice is recorded in architecture decision records, such as modelling events as activity periods, raising alerts when events are written or grouping fire detections into grid cells.
| Layer | Technologies |
|---|---|
| Frontend | |
| Maps | |
| Backend | |
| Data | |
| Quality | |
| Tooling | |
| Hosting |
A few things worth knowing about how they fit together:
- One TypeScript monorepo, with pnpm workspaces and Turborepo: two apps and two shared packages, type-checked and linted together.
- Geospatial work happens in the database. Events and zones are PostGIS geographies, so "is this event within 250 km of that point" is one indexed query, measured on the Earth rather than on a flat map.
- No map provider account. Vector tiles come from OpenFreeMap and imagery from NASA, both free and keyless.
- Free to run. Vercel hosts the web app, Render the worker, kept awake by an uptime monitor, and Neon the database.
| Source | What it provides | Polled |
|---|---|---|
| USGS | Earthquakes worldwide | Every minute |
| NASA FIRMS | Fires detected by the VIIRS instruments of NOAA-20 and NOAA-21 | Every 30 minutes |
| GDACS | Tropical cyclones, floods, volcanoes and droughts, with their impact | Every 10 minutes |
| NASA GIBS | Satellite imagery: true colour, live clouds and city lights | By the browser |
| OpenFreeMap | Vector tiles built from OpenStreetMap | By the browser |
Data may be delayed or incomplete. HazardWatch is not meant for emergency response.
You need Node.js 22.12 or later, pnpm 10 and Docker.
pnpm install
cp .env.example .env # then set BETTER_AUTH_SECRET
docker compose up -d # PostgreSQL with PostGIS on port 5433, Mailpit on 1025
pnpm db:migrate
pnpm dev # web app and workerThe web app runs on http://localhost:3000. Generate a secret with
openssl rand -base64 32. Emails sent in development never leave your
machine: Mailpit catches them and shows them on http://localhost:8025.
| Command | What it does |
|---|---|
pnpm dev |
Starts the web app and the worker in watch mode |
pnpm test |
Runs the unit tests |
pnpm test:integration |
Runs the tests against a real PostGIS database |
pnpm lint |
Lints every workspace |
pnpm typecheck |
Type-checks every workspace |
pnpm build |
Builds everything, as the CI does |
apps/
web/ Next.js app: pages, authentication, server actions, the globe
worker/ Polls the hazard feeds, raises alerts and sends their emails
packages/
db/ Drizzle schema, PostGIS queries and migrations
email/ Email templates and sending
docs/
architecture.md
deployment.md
adr/ Architecture decision records
- Architecture: the moving parts, how data flows between them and the principles behind the code.
- Deployment: setting up Neon, Vercel and Render, all on free tiers.
- Decision records: why PostGIS, Better Auth, a dedicated worker, MapLibre, the globe and more.
- Contributing: workflow, branch names and commit conventions.
Designed & Built by Hiratra Danarson.
Events from USGS, NASA FIRMS and GDACS. Imagery from NASA's Global Imagery Browse Services (GIBS), part of NASA's Earth Science Data and Information System (ESDIS). Maps from OpenFreeMap and OpenStreetMap contributors. Land outlines from Natural Earth.












