Skip to main content

trying to catch fires before they spread

· 2 min read
Andrei Sherikhov
18 y/o dev from Colombia

fire season in the valle del cauca is no joke, so for a hackathon i built natureintelligence: early detection of forest fires for santiago de cali and the valley, with real-time verification.

where the signal comes from​

four sources, because one is never enough:

  1. nasa firms / viirs + noaa goes-16 satellite telemetry
  2. a network of iot stations on the hills of cali (esp32, raspberry pi, lorawan)
  3. ptz thermal cameras with computer vision
  4. a decision engine with ai on top of all of it

the engine's job is not "detect smoke", it is filter: confirmed dispatch, discarded false positive, or early monitoring. sending a truck for a sun glare on a solar panel is how you burn budget and credibility.

realtime, actually realtime​

  • alerts over server-sent events (/stream)
  • telemetry over websockets (/ws)
  • a rest api to ingest hardware readings and query sensors
  • a sandbox with fire scenarios you can trigger manually

the fun part was the spread simulator (rothermel model) in the web panel. you pick wind and terrain, it shows where the fire would go, and you can dispatch via whatsapp from the same screen.

testing is what kept it alive​

we had 48 hours, so the test suite was the thing that let me refactor without fear:

testwhat it protects
sseEvents.test.tsthe contract of event names
server.test.tsthe real server: live sse, /api/simulate/spread
websocketService.test.tsoutgoing queue during handshake, manual close
fireSpreadSimulator.test.tsxthe real model, not a mock
snippets.test.tsthat every snippet in the ui actually compiles

npm run check = typecheck + the whole suite. if it is green, push.

honest scope​

the demo works end to end for alerts, telemetry, streaming and simulation. whatsapp dispatch and the external llm analysis are wired but stay simulated until a real provider is configured. i'd rather say that than pretend.

code: github.com/Sherikxd/deteccion-incendio-hackathon · live: deteccion-incendio-hackathon.vercel.app