Project Info
Inspiration
Disaster response today is fragmented. While emergency managers prepare evacuation and fire rescue plans, they often lack a unified system driven by real-time updates from 911 operators and population density signals to coordinate operational decisions effectively. We were influenced by recent research (https://arxiv.org/abs/2405.14975), which demonstrates how large-scale Apple Wi-Fi Positioning System (WPS) datasets can reveal infrastructure disruptions and population movement patterns over time. The paper highlights both the power and the privacy risks of connectivity-derived signals. This research shows that WPS signals can be used to infer device locations on a network, and that any system leveraging such signals must operate at an aggregated, privacy-conscious level. CalTrack applies these ideas ethically, focusing on community-level resilience modeling, not individual tracking.
What it does
CalTrack is a disaster intelligence platform focused on forest fires in California. Our platform: Visualizes population density using aggregated WPS device signals Overlays real-time and predictive fire risk across geographic regions Provides data-driven recommendations for allocating emergency resources Keeps human operators in the loop with AI-assisted data extraction, including addresses, medical conditions, and triage levels Spins up an AI voice call center for emergency triage and coordination when demand exceeds available operators Instead of asking “Who is affected?”, CalTrack answers: Where should resources go first, and why?
How we built it
We utilized the WPS API to retrieve aggregated location data for devices on the network. A majority of these devices are mobile devices such as phones and tablets. We use this data to estimate population density and provide critical situational awareness to emergency responders. We deployed NVIDIA’s DGX Spark systems to host NVIDIA open models, including the Nemotron-class Personaplex model and Earth-2. Our fire-risk overlay is powered by NVIDIA Earth-2, which provides predictive weather patterns that indicate conditions conducive to forest fires. For our demo, we mapped historical data over Palo Alto to demonstrate how predictive modeling enhances situational awareness. Our original plan was to power the AI voice 911 operator using the Personaplex model for natural, fluid emergency communication. However, due to onboarding and troubleshooting challenges with the DGX Spark systems in collaboration with NVIDIA and ASUS representatives, we prioritized successfully deploying Earth-2 within the 36-hour hackathon window. As a result, we integrated VAPI (https://vapi.ai/) for voice orchestration to meet our deadline. To deliver a data-driven experience for operators, we utilized CrewAI, an agent mesh framework that orchestrates specialized agents with defined tasks. During a 911 phone call, our agent mesh parses the conversation in real time and extracts critical information: Healthcare agents gather patient conditions and triage levels so ambulatory services and hospitals can prepare for surges. Geolocation agents, powered by HERE API, extract address information from the call and place a notification marker directly on the operator’s map interface. Together, these agents provide operators with structured, actionable intelligence to improve emergency response coordination.
Challenges we ran into
Serializing and deserializing Protobuf headers for the WPS location system Onboarding and configuring NVIDIA DGX Spark systems within a tight timeframe Collaborating with NVIDIA and other participants during a productive Saturday feedback session to troubleshoot deployment issues Parsing and validating spoken address data from live 911-style phone calls
Accomplishments we're proud of
Mapped 650,000 network devices within 6 hours, covering the greater Palo Alto region Integrated predictive disaster modeling using weather patterns associated with forest fire risk Prototyped a voice-based 911 operator integrated with an agentic framework that extracts critical details in real time Designed a system that balances AI automation with human-in-the-loop oversight during high-demand emergency scenarios
What we learned
Connectivity and infrastructure-derived signals are powerful tools in emergency contexts Research like https://arxiv.org/abs/2405.14975 highlights both the opportunity and responsibility associated with infrastructure-derived data Emergency AI systems must be transparent, auditable, and privacy-conscious Ethical system design strengthens both real-world impact and public trust
What's next
Add predictive outage modeling for electricity, blocked roads, and terrain accessibility Expand from single-county to statewide deployment Integrate hospital capacity and supply chain stress indicators by interfacing with healthcare systems Deploy a hardened multi-agent orchestration framework for production environments Build a public-facing transparency and accountability dashboard Long term, CalTrack can generalize globally wherever public alerting systems and infrastructure data feeds exist.
TreeHacks Monorepo: Hazard Map + Forecast + Voice + Data Harvester
This repo contains several hackathon-sized projects that work together (and can also be run independently):
- A California hazard map frontend (React + Vite + Mapbox) with hazard overlays + a hyper-local weather probe panel.
- A hazard aggregator backend (Flask) that normalizes public hazard feeds into GeoJSON endpoints for the map.
- A GPU forecast API (FastAPI) that runs NVIDIA Earth2Studio FCN3 forecasts and writes NetCDF outputs.
- A Twilio call center voice bridge (FastAPI) for NVIDIA PersonaPlex running on an NVIDIA DGX.
- A WPS harvester (Python) that crawls Apple
wlocnearby responses into a resumable Postgres-backed dataset, plus an AWS load-test harness.
Repo Layout
| Path | What it is | Default port |
|---|---|---|
frontend/ | Map UI (Vite + React + Mapbox GL) | 5173 (Vite dev) |
backend/ | Flask API for hazards + weather probe | 5001 |
forecast/ | FastAPI forecast service + models/scripts | 8000 |
callcenter/ | Twilio Media Streams bridge to PersonaPlex | 5050 |
wps-harvester/ | Apple WPS crawler + exports + AWS tooling | (CLI) |
Quickstart (Map + Hazard API)
1) Backend (Flask)
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python run.py
Backend runs at http://localhost:5001.
Key endpoints:
GET /healthzGET /api/v1/hazards?...(aggregated GeoJSON)GET /api/v1/weather/probe?lat=...&lon=...&hours=72(NWS-backed)
Notes:
backend/run.pywill also load a repo-root.env(at./.env) if present.WEATHER_PROVIDER=earth2in the backend is currently a stub (provider_unavailable).
2) Frontend (Vite)
cd frontend
npm install
cp .env.example .env
# set VITE_MAPBOX_TOKEN
npm run dev
Frontend defaults to http://localhost:5173 and calls the backend via VITE_API_BASE_URL (default http://localhost:5001).
GPU Forecast API (Optional)
The forecast service is a FastAPI app in forecast/api.py with endpoints:
GET /healthPOST /forecast(writes NetCDF output underforecast/outputs/)POST /forecast-fcn3(Earth2Studio FCN3 ensemble forecast)GET /storm-detection(runs detection over a NetCDF path)
Run via Docker (requires NVIDIA GPU + NVIDIA Container Toolkit)
Root docker-compose.yml builds and runs the service on port 8000:
docker compose up --build
Then:
curl http://localhost:8000/health
Implementation details:
- Image is built from the repo-root
Dockerfileand based onnvcr.io/nvidia/pytorch. - Installs
earth2studio[fcn3]and related dependencies.
Call Center (Optional)
callcenter/ is a Twilio Media Streams full-duplex audio bridge to NVIDIA PersonaPlex (typically running on a DGX).
See callcenter/README.md for the full setup:
- running PersonaPlex on DGX via Docker Compose
- running the FastAPI bridge locally
- exposing the bridge to Twilio (ngrok) and configuring the Twilio webhook
WPS Harvester (Optional)
wps-harvester/ is a Postgres-backed, resumable crawler that:
- seeds from local Wi-Fi scan BSSIDs
- expands using Apple
wloc“nearby” responses - exports a GeoJSON point set for visualization
Quick run (Postgres required):
cd wps-harvester
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export DATABASE_URL='postgresql://localhost/postgres'
python3 harvest_ca.py --resume --summary-every-sec 10 --export-geojson ca_points.geojson
AWS tooling:
wps-harvester/aws/contains a cost-capped load-test harness plus a small DynamoDB-backed dashboard.
Tests
cd backend
source .venv/bin/activate
pytest -q
Analysis
View
Metric
- 9
- 9
- 8
- 7
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CrewAIIn code
- CSSIn code
- FastAPIIn code
- FlaskIn code
- HTMLIn code
- JavaScriptIn code
- OpenAIIn code
- PythonIn code
- ReactIn code
- Tailwind CSSIn code
- TypeScriptIn code
- DockerClaimed
- PyTorchClaimed
11 of 13 appear in the indexed code. 2 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
493 KB
Source files
109
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
alangrewco/treehacks
271 files · 265.8 MB · @ 28b7e04
Structure
Interface
38 files · 14%Screens, components and styles rendered to the user.
API & routing
2 files · 1%Request entry points: routes, handlers and controllers.
Application logic
57 files · 21%Domain rules, services and shared utilities.
+3 moreBackground jobs
1 file · 0%Work run outside a request: tasks, workers and schedules.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python61%
- TypeScript25%
- HTML7%
- Markdown5%
- YAML1%
- CSS0%
- Other (2)0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend/package.json
npm · 23- @radix-ui/react-label
- @radix-ui/react-select
- @radix-ui/react-slider
- @radix-ui/react-switch
- @radix-ui/react-tabs
- class-variance-authority
- clsx
- lucide-react
- mapbox-gl
- react
- react-dom
- tailwind-merge
- +11 more
backend/requirements.txt
pypi · 11- crewai
- crewai-tools
- Flask
- Flask-Cors
- openai
- pymongo
- python-dateutil
- python-dotenv
- PyYAML
- requests
- twilio
callcenter/requirements.txt
pypi · 7- fastapi
- numpy
- python-dotenv
- sphn
- twilio
- uvicorn[standard]
- websockets
wps-harvester/aws/requirements.txt
pypi · 3- aiohttp
- boto3
- psycopg[binary]
wps-harvester/requirements.txt
pypi · 3- aiohttp
- protobuf
- psycopg[binary]
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.