Inspiration

Agriculture accounts for roughly 70% of global freshwater withdrawals, yet millions of smallholder farmers managing wheat and maize fields still rely on rigid, fixed-schedule irrigation. This leads to groundwater depletion, wasted energy from diesel and electric tubewells, and unnecessary greenhouse gas emissions.

We built FieldFlow to bridge the gap between hydrologic science and practical on-farm decisions. Using free weather forecasts and FAO-56 crop-water equations, FieldFlow gives farmers a clear daily answer: when to irrigate and how much water to apply. It then quantifies the full impact chain:

Litres saved → Pumping energy saved → CO₂e avoided


What it does

FieldFlow is an open-source irrigation management web app for smallholder farmers and agricultural extension workers.

  • Daily smart recommendations: Tells the farmer each day whether to irrigate and how much, based on the weather forecast and the morning root-zone depletion.
  • Root-zone soil water gauge: Shows soil water depletion against the readily available water (RAW) threshold across 3 soil presets (sandy loam, loam, clay loam), so irrigation happens before the crop is stressed.
  • Season replay and impact dashboard: Replays a past growing season and compares FieldFlow's schedule against a traditional fixed-interval baseline. Impact cards show water saved (m³), energy saved (kWh or diesel litres) and CO₂e avoided.
  • Bilingual interface: English and Urdu, with right-to-left layout support.

How we built it

FieldFlow follows the FAO Irrigation and Drainage Paper No. 56 single-crop-coefficient method. Every calculation lives in a pure, fully tested engine.

Core formulas

Crop water demand:     ETc = Kc × ET₀

Total available water: TAW = 1000 × (θFC − θWP) × Zr

Readily available:     RAW = p × TAW

Root-zone depletion:   Dr(i) = clamp( Dr(i−1) − Peff(i) − I(i) + ETc(i), 0, TAW )

Pumping energy:        kWh = 0.00272 × V × H ÷ η

Emissions:             kg CO₂e = kWh × grid emission factor
                       (or diesel litres × diesel emission factor)

Variables:

  • ET₀ = reference evapotranspiration (mm/day, from Open-Meteo)
  • Kc = crop coefficient, interpolated across growth stages for wheat and maize
  • θFC, θWP = soil water content at field capacity and wilting point
  • Zr = root depth (m); p = depletion fraction
  • Peff = effective rainfall (mm); I = irrigation applied (mm)
  • V = water volume pumped (m³); H = total pumping head (m); η = pump efficiency

Daily decision: Irrigate when the projected depletion reaches RAW. The net depth refills the root zone to field capacity, and the gross depth divides by application efficiency.

Tech stack

  • App: Next.js (App Router) + TypeScript
  • UI: Tailwind CSS, shadcn/ui, Recharts
  • Validation and testing: Zod and Vitest, with unit tests for water-balance invariants
  • Weather data: Open-Meteo forecast and archive APIs, with server-side caching and committed JSON fallback data
  • Optional AI: Anthropic SDK (claude-haiku-5-5) for plain-language explanations of each recommendation

Challenges we ran into

  • Validating the baseline honestly: Proving water savings meant modelling traditional farmer practice fairly, including cases where fixed schedules actually under-water the crop. Our dashboard reports those stress days too, which makes the savings claim more defensible.
  • Weather API reliability: We added server-side caching and committed fallback season data so the app keeps working if a live service is interrupted.
  • Scope control: We limited the first version to two crops (wheat and maize) and three soil types, so the science stays rigorous.

Accomplishments that we're proud of

  • Transparent science: Every number on screen traces back to a stated formula and published FAO-56 tables, with a Method page documenting assumptions and sources.
  • Pure, tested engine: An I/O-free calculation engine (waterBalance.ts, simulate.ts, impact.ts) with unit tests that check the water balance closes.
  • Complete impact chain: Litres saved are converted directly into pumping energy and CO₂e avoided.

What we learned

Agronomic software has to respect local realities. Smallholder farmers think in acres, local units and regional languages like Urdu, not abstract global metrics. Turning dense FAO-56 tables (Tables 11, 12, 19 and 22) into clean software took careful modular design.


What's next for FieldFlow

  • Soil moisture sensors: Calibrate modelled depletion with low-cost ground-truth readings.
  • SMS and voice alerts: Send advisories to feature phones for farmers without smartphones.
  • More crops: Extend beyond wheat and maize to cotton and other regional staples.

Built With

  • next.js
  • react
  • recharts
  • tailwind
  • vitest
  • zod
Share this project:

Updates

Submission history