Skip to content

Latest commit

Β 

History

82 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌍 GROW β€” Global Recovery and Observation of Wildfires

Global Recovery and Observation of Wildfires (GROW) is an AI-assisted wildfire intelligence console created by Team I.O – FlorianΓ³polis for the 2024 NASA Space Apps Challenge. The experience blends live satellite detections, historical context, and an OpenAI-powered voice co-pilot so emergency teams can explore evolving fire activity in seconds. πŸ›°οΈπŸ”₯

πŸ† Top-10 worldwide finalist (Top 0.1%) in the 2024 NASA Space Apps Challenge. 🎞️ Presentation slide deck: Open in Google Slides πŸ“° NASA announcement: Read the global winners recap

✨ Key Capabilities

  • 🌐 Satellite basemap with live and historical wildfire detections delivered through Mapbox GL clusters.
  • πŸ—ΊοΈ NASA FIRMS ingestion (MODIS Near Real-Time) with resilient caching so the dashboard stays responsive offline.
  • πŸ—£οΈ Bi-directional voice co-pilot (OpenAI Realtime) that can search places, summarize risk, and trigger data drilling tools.
  • 🌦️ Contextual weather overlays via Open-Meteo (temperature, wind, precipitation gaps) to enrich situational awareness.
  • πŸ“Š Inline analytics showing counts, brightness, FRP, and pixel metrics for any ad-hoc bounding box.
  • 🧭 Slide deck lightbox and NASA Space Apps recognition baked into the experience for storytelling moments.

🧱 Architecture at a Glance

  • πŸ–₯️ Front-end: React 18 + TypeScript with modular SCSS, custom components, and lightweight utility hooks.
  • πŸ—ΊοΈ Mapping: Mapbox GL JS handles clustering, markers, and smooth camera transitions.
  • πŸ›°οΈ Data pipeline: sql.js persists NASA FIRMS observations in the browser (localStorage) for fast re-queries.
  • 🧠 AI assistant: Custom RealtimeClient streams audio to OpenAI Realtime models, exposing bespoke tools (geocoding, weather, database queries).
  • πŸ” Relay server: Optional Node.js WebSocket proxy (relay-server/) to shield API keys and multiplex realtime sessions.

βš™οΈ Prerequisites

  • Node.js 24 (use nvm use) and Yarn 1.22.22.
  • Mapbox access token with Maps SDK enabled.
  • NASA FIRMS β€œmap key” for the Area API (request at firms.modaps.eosdis.nasa.gov).
  • Voice assistant access is provided through the hosted relay (no local OpenAI key required).

πŸ” Configure Environment

Create a .env file in the project root and populate:

REACT_APP_MAPBOX_KEY="pk.your_mapbox_token_here"
REACT_APP_NASA_MAP_KEY="your_firms_map_key"

πŸš€ Run It Locally

  1. 🟒 Select Node.js 24: nvm install && nvm use
  2. πŸ“¦ Install dependencies: yarn install --frozen-lockfile
  3. ▢️ Start the React dev server: yarn start (launches http://localhost:4317)
  4. πŸ”Š Voice assistant sessions are brokered through our private server endpoint /api/grow/relay, keeping OpenAI credentials on the server.
  5. πŸ—žοΈ Switch the β€œLIVE” toggle to trigger fresh NASA downloads (first fetch may take a few seconds while CSV data parses).

πŸ§ͺ Testing & Quality

  • Run interactive tests: yarn test
  • Build production bundle: yarn build
  • Package the app (excluding bulky folders): yarn zip

πŸ—ΊοΈ Data & Integrations

  • πŸ”₯ NASA FIRMS (MODIS NRT): Primary wildfire detection feed; CSV area queries filtered to the Americas bounding box.
  • 🌎 Mapbox Satellite: Base imagery and clustering logic for hotspots.
  • 🌀️ Open-Meteo: Current weather snapshots to enrich assistant responses with temperature, wind, and days-since-rain.
  • 🧠 OpenAI Realtime: Conversational agent with tool-calling for geocoding, map camera control, and statistics retrieval.

πŸ—‚οΈ Repository Tour

  • src/pages/Dashboard.tsx β€” top-level layout, dataset toggles, overlays, and slide deck lightbox.
  • src/components/mbox/ β€” Mapbox integration, clustering layers, and observation highlights.
  • src/components/realtime-voice/ β€” Voice modal, audio pipeline, and custom tool handlers.
  • src/utils/ β€” NASA API client, sqlite helpers, geocoding utilities, and waveform rendering helpers.
  • relay-server/ β€” Lightweight WebSocket proxy built with ws + openai SDK.
  • public/ β€” Static assets, fallback GeoJSON, and sql-wasm.wasm required by sql.js.

πŸ†˜ Troubleshooting Tips

  • πŸ–ΌοΈ Embedding in an iframe (e.g. ryan.zernach.com, zernach.com): Browsers block the microphone in cross-origin iframes unless the parent page grants it. Add allow="microphone; autoplay" on the <iframe> (both are needed for capture and smooth audio playback). Example: <iframe src="https://your-dashboard-host" allow="microphone; autoplay" title="GROW dashboard"></iframe>. Nested iframes: each wrapping frame must include the same allow values, or the innermost document still cannot use the mic. As a workaround, users can open the dashboard in a new tab from the voice panel.
  • 😢 Voice button greyed out? Ensure microphone permissions are granted and the realtime model name in code matches one enabled for your key.
  • πŸ”Œ Voice relay errors? Confirm the app can reach /api/grow/relay and that the upstream OpenAI key is configured on the server.
  • πŸ”„ No live data? Confirm your NASA FIRMS key is active; the API limits requests per key and region.
  • 🧹 Stale map data? Clear localStorage (key wildfire_sqlite_db_v2) or toggle to β€œHISTORICAL” and back to β€œLIVE” to force a refresh.

πŸ“„ License & Credits

  • πŸ“œ Licensed under the MIT License β€” see LICENSE.
  • πŸ™ Huge thanks to NASA, Mapbox, OpenAI, Open-Meteo, and the global Space Apps community for data, tooling, and inspiration.

Happy exploring, and stay safe out there! πŸš’πŸŒ²

About

2024 NASA Space Apps Challenge Winners πŸ† Top 10 out of 10,000 Worldwide Projects (Top 1%)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages