FloodGuard
Community flood photos meet Gemma 4 and local forecasts to help neighbors understand nearby flood risk.
FloodGuard is a mobile-friendly flood map for neighbors in flood-prone communities, including Hampton Roads. It combines nearby community photo reports with Open-Meteo river, rainfall, and sea-level forecasts to help people understand local flood conditions.
Users can share a flood photo positioned with photo GPS metadata or their device location, add a short note, and see approved nearby reports on a Leaflet map. Gemma 4, accessed through the Gemini API, screens submitted photos and notes and synthesizes environmental data and community evidence into a plain-language risk estimate with a highlighted affected area. The configured main model is gemma-4-26b-a4b-it, with gemma-4-31b-it as a fallback; environmental rules provide estimates when AI is unavailable.
The installable PWA includes an offline page and optional Web Push alerts for the last shared location and up to five saved places. Azure Blob Storage keeps pending photos private, while optional PostgreSQL and Prisma store reports and alerts. Azure Entra authentication and managed identities avoid fixed storage keys and database passwords.
Security safeguards address abuse of community reports: AI moderation screens unrelated or inappropriate photos and removes abusive notes, spam, personal contact details, and instructions directed at the model. Unavailable or malformed moderation leaves reports pending and hidden. Risk prompts treat submitted content as untrusted, and model output is validated. These safeguards reduce misuse but do not guarantee prompt-injection resistance or report accuracy.
Approved photos and coordinates are public; submitted photos and notes are sent to the Gemini API. Photos can retain EXIF metadata, and users should avoid sensitive images. Locations for alerts are shared through browser permissions and saved-place controls. Estimates are not official emergency warnings, and push delivery is best effort. Follow local emergency guidance.
Built with Next.js, React, TypeScript, Tailwind CSS, Leaflet, Gemma 4 via Gemini API, Open-Meteo, MapTiler/OpenStreetMap, Azure Blob Storage, Azure PostgreSQL, Prisma, Web Push, and Docker. Published under the MIT license. AI coding assistance: Claude Code with Opus 5.5 and Codex; this Codex session does not expose its exact model ID.
Built with
AI tools
Prize Categories Entered
- Submitted
Best Use of Gemma 4
Gemma 4 powers FloodGuard's multimodal flood-photo moderation and local risk estimates through the Gemini API, combining community images and notes with river, rainfall, and sea-level forecasts. It produces plain-language assessments and a mapped affected area, with validated outputs and a rules fallback when AI is unavailable.
- Submitted

Best Open-Source AI Project
FloodGuard is an original MIT-licensed project in a public GitHub repository, with the open-weight Gemma 4 model central to photo moderation and flood-risk synthesis. Its source includes the model integration, prompts, output validation, forecast integration, mapping, storage, and alerting implementation.
- Event prizeSubmitted
Best Community Impact Project
FloodGuard serves neighbors in flood-prone communities such as Hampton Roads by combining local photo reports and environmental forecasts into a mobile-friendly map with plain-language estimates and optional saved-place alerts. Users choose photos and location sharing; pending reports remain private, and the README explains public approved-photo coordinates, Gemini processing, retained EXIF metadata, and the limits of unofficial estimates.