Inspiration

Water is becoming the most important resource of this century because of the growing data centers and the scaling of industrial facilities. They have a large demand for reliable water systems, and these systems are growing faster than current infrastructure can support. We wanted to explore the idea of which buildings were already in a position to harvest rainwater that falls on their rooftops, and how much would it save them.

What We Built

ReFlow is a full-stack rainwater harvesting viability platform. Users enter a ZIP code, and the app:

  1. Queries OpenStreetMap's Overpass API to find large industrial, warehouse, factory, and manufacturing buildings within a configurable radius
  2. Scores each building across five dimensions: roof area, cooling tower likelihood, rainfall, water stress, and water cost savings
  3. Computes a weighted viability score combining all five dimensions into a single 0–100 signal
  4. Enriches each building with AI-generated incentive and ESG scores via the Gemini API
  5. Displays everything on an interactive Leaflet map with color-coded markers and a premium analytics dashboard

How We Built It

The backend is a FastAPI application backed by several live data sources:

  • OpenStreetMap Overpass API for building geometry and metadata
  • Open-Meteo Archive API for historical precipitation and evapotranspiration data
  • Zippopotam.us for ZIP-to-state resolution powering water rate lookups
  • Google Gemini API for contextual incentive and ESG scoring

The frontend is a React + Vite app styled with Tailwind CSS, featuring a Leaflet map, a filterable building shortlist, exportable results, and a live search interface.

Challenges

The biggest challenge we faced during this project was discovering the right datasets and APIs for each feature. Most map APIs and datasets were not able to provide us with both the square footage of a building and their name. Some datasets returned nodes for a polygon geometry: forcing us to manually calculate the square footage, while others lacked company names in the record. We also ran into an issue with all the coordinates falling on the same latitude and longitude on the map.

What We Learned

We learned that geospatial data is very hard and confusing to deal with especially when dealing with real time projects. OSM coverage isn't consistent throughout the continental US, and no two buildings are tagged the same. We learned to create fallbacks in case of these issues show up during deployment.

Share this project:

Updates