Inspiration
After every big storm, the Santa Cruz Mountains fill with downed trees, mudslides and washed-out trails. Hikers, cyclists and residents find these hazards first, but there's no good place to report them. Official closures cover whole parks or highways and can take days. We wanted the next person on the trail to know before they go.
What it does
TrailTriage turns a single photo into a live hazard report:
- Snap a photo. Gemini identifies the hazard (downed tree, mudslide, flooding, washout), rates severity from 1 to 5, and says whether it's passable on foot, by bike or by car.
- Live map. Every report appears instantly as a pin colored by severity, for everyone viewing the map.
- Location. Uses the phone's GPS, GPS saved in the photo, or a pin you drop by hand when there's no signal under the trees.
- Duplicate merging. When someone reports the same hazard again, Gemini compares the photos and merges them, so more reports mean more confidence instead of more clutter.
- Ask the map. Ask "Can I bike Nisene Marks today?" and Gemini answers from live reports.
- Who fixes it. Each report suggests the right agency (State Parks, Caltrans, the county or PG&E) and drafts the report for you.
How we built it
- Gemini API for photo analysis with structured JSON output, photo-to-photo comparison and function calling over live reports
- Interactive map for plotting hazards in real time
- A mobile-friendly web app that runs in any phone browser, served over HTTPS so phones can use the camera and GPS
- Built and iterated with Claude Code
Challenges we ran into
- Location is messy. Many phones strip GPS from photos when uploading, so we needed fallbacks: live GPS, then a pin dropped by hand.
- Consistent AI ratings. We defined a fixed severity scale and a strict output schema so Gemini's answers were reliable enough to color a map.
- Networking. Campus wifi blocked our first tunnel service, so we had to find another way to get a public HTTPS link for phones.
Accomplishments that we're proud of
- A complete flow from photo to classified hazard to live map pin in seconds
- Turning noisy crowd reports into verified ones by merging duplicates
What we learned
- How to get structured, dependable output from a vision model
- Crowdsourced data only becomes useful once you can tell which reports to trust
- Shipping a mobile demo means dealing with HTTPS, permissions and real-world networks, not just code
What's next for TrailTriage
- Show official closures (Caltrans, State Parks) on the same map
- Push alerts when a severe hazard appears on a trail you've saved
- Partner with trail apps and park volunteer groups so the map has users from day one
Built With
- ai
- html5
- javascript
- multipass