AquaRescue

Inspiration

A person can notice discoloured water, foam, or dead fish long before an environmental team reaches the site. But a photo and a short description do not immediately tell an expert what caused the problem or what to check next. I built AquaRescue to help turn those early observations into a structured case for human review.

What it does

A citizen submits a water report with a photo, observed symptoms, notes, and GPS location. Gemini examines the uploaded image and helps gather available context, including weather estimates. A deterministic belief engine then compares the evidence across six possible freshwater stressors, such as nutrient loading, sewage pollution, chemical spills, and sedimentation.

When the evidence is uncertain, AquaRescue can ask the original reporter for a specific field observation they can make from a safe place. When there is enough support, it suggests precautions and measures drawn from the OneAquaHealth catalogue. An expert command view shows the evidence, changing estimates, investigation activity, map, and recommendations so a person can make the final decision.

How I built it

I used Next.js, React, and TypeScript for the citizen and expert views; the Gemini API for the investigation and photo analysis; Open-Meteo for weather estimates; and Leaflet with OpenStreetMap for maps. Zod validates the events shared between the server and browser. The belief calculations and catalogue selection run in application code, keeping the displayed percentages and measure references separate from Gemini’s generated text.

The local demo currently uses in-memory storage. I also built a Supabase persistence adapter and database migrations, but have not yet verified them against a connected Supabase project.

Challenges and what I learned

The hardest part was making a live investigation reliable and honest. Early on, agent events did not match the browser’s contract, so a completed investigation could appear stuck. Gemini request limits and temporary service errors could also interrupt a run. I added event validation, bounded the agent’s calls and retries, and kept failed reports available for an operator to retry.

I also learned to be precise about evidence. A photo can show colour or visible material; it cannot establish odour, water chemistry, or a species identification. Weather estimates are not local sensor readings, and sites outside the Coimbra pilot may have no monitoring history. AquaRescue marks those gaps instead of filling them with demo data.

AquaRescue is decision support, not an environmental diagnosis. Its probabilities are model estimates that need domain calibration, and its suggested actions require expert review.

Built With

Share this project:

Updates

Submission history