Born from Personal Need

When the floods came, we needed better information. So I built BAHABA.

Developed during Typhoon Kristine 2024 • Enhanced and made public during Typhoons Dante and Emong 2025

The Story Behind BAHABA

During Typhoon Kristine in 2024, I found myself in a frustrating situation that many Filipinos know too well. I needed to go out for essential supplies, but had no reliable way to check which areas were flooded.

I was jumping between news websites, social media posts, and messaging friends just to figure out:
“Baha ba?” (Is it flooded?) along my route. There had to be a better way.


That’s when I started building BAHABA in 2024 - initially as a personal tool for my own needs. The platform remained private until the devastating floods during Typhoons Dante and Emong in July 2025, when I realized it could help thousands of other Filipinos facing the same challenges. That’s when BAHABA was launched to the public.

About the Creator

Nio Martinez - Creator of BAHABA

Hi, I’m Nio Martinez, a software engineer based in Sto. Tomas, Batangas, and sometimes being stationed in Metro Manila. I hold a Bachelor’s Degree in Information Technology and have a passion for building solutions that make a real difference in people’s lives.

BAHABA is a solo project that I’ve personally funded and developed, using modern technologies like Next.js, Supabase and PostGIS. I even used Claude Code to speed up the development process during those critical early days when people needed this tool most.

Challenges & Breakthrough Solutions

The Crowdsourcing Dilemma

The biggest challenge with any crowdsourced flood platform is the cold start problem: “If no one reports, no one sees data. If no one sees data, no one reports.” This creates a vicious cycle where the platform appears empty and useless during the exact moments people need it most.

Traditional approach: Hope people will manually report floods and pray for critical mass.

🤖 Enter the BAHABA AI Agent

To solve this, I created an autonomous AI-powered news agent that works 24/7 to ensure BAHABA never appears “empty” during flood events:

🔍 Web Intelligence
  • • Monitors 7 major news sources continuously
  • • Reads the X feeds of MMDA, PAGASA and the newsrooms
  • • Reads PAGASA river gauges and basin flood-watch bulletins directly
  • • Runs every 5 minutes via GitHub Actions, and only when conditions warrant it
  • • Not Facebook, and not the NDRRMC, MMDA or DPWH websites — they refuse automated access, so we do not claim to read them
🧠 Reading the advisories
  • • Fixed rules first: depth phrases, inches, centimetres and MMDA’s PATV/NPLV codes
  • • A closed gazetteer turns a named road into coordinates
  • • A language model is asked only when the rules cannot read the text
  • • Whatever it proposes still has to pass those same rules, so it cannot invent a road or a depth

Result: Even if zero humans report floods, BAHABA still shows real-time flood information from official sources and news agencies. The platform never appears “dead” during emergencies.

🔄 Hybrid Intelligence System

BAHABA combines the best of both worlds:

Community Reports

Real people sharing real-time conditions from their exact locations

AI Agent

Autonomous monitoring ensuring baseline flood data is always available

Weather APIs

Multiple weather sources providing context and validation

The BAHABA Philosophy

“If you don’t see any reports on BAHABA, it means exactly what it means - there are no significant floods happening right now. Not that the platform is broken or empty.”

This gives users confidence in the absence of data as much as in its presence.

Technical Excellence

BAHABA was built with urgency in mind - people needed it fast. The tech stack was chosen for rapid development and reliability:

Frontend & Real-time

  • Next.js 16 - App Router; the route handlers are the whole backend
  • Supabase Realtime - New reports arrive over a live socket, with a two-minute poll as the backstop
  • MapLibre GL + Carto - Vector basemap built from OpenStreetMap data, keyless and free to serve
  • Vercel - Hosting and the API routes

Data & Processing

  • PAGASA telemetry - Live river gauges, official alert thresholds, and basin flood-watch bulletins read from the PDFs
  • Report standing - Every pin says what backs it up: who else confirmed it, whether the spot has flooded before, whether a gauge nearby is over its alert level, and whether UP NOAH already modelled flooding there
  • Supabase + PostGIS - Reports, spatial queries and vote cooldowns
  • Rule-first collector - Phrase, inch and gazetteer matching; a language model is the last resort, never the first
  • X API - Official advisories from MMDA, PAGASA-DOST and Philippine newsrooms
  • DeepSeek - Reads advisories only when the rules cannot; it proposes, the rules still decide
  • Self-hosted Photon - Place search on our own OpenStreetMap index; Google Places only for the settled query, Nominatim behind both
  • Open-Meteo + OSRM - Weather, and flood-aware routes with turn-by-turn directions

The biggest challenges were establishing reliable data sources and encouraging community participation. Every feature - from AI news scraping to weather integration to the confirmation system - was built to solve real problems faced during floods.

The Future of BAHABA

Becoming a Data Hub

BAHABA aims to become the primary real-time flood data provider in the Philippines. We envision opening APIs for services like Google Maps and Waze to consume our data, while also accepting flood reports from their users.

Sustainability Challenge

What started as a personal project during triple typhoons (especially Dante and Emong in July 2025) now serves thousands of Filipinos. I’m currently exploring how to make this sustainable long-term - whether through community donations, minimal non-intrusive advertising, or potentially open-sourcing parts of the platform while keeping it free for users.

Technical Innovation

The platform combines community reporting with PAGASA river telemetry, PAGASA basin flood-watch bulletins and a news collector that reads published advisories. Routes are re-ranked against live flooding, so the fastest way is not recommended when it runs through water. Extraction is deliberately rule-based rather than a language model: a missed report costs a reader nothing and an invented one sends someone into a flood.

Community First, Always

BAHABA is committed to being free, with nothing behind a signup, and no unnecessary data collection. Reading the map, reporting flooding and planning a route around it never need an account; one is offered, and it only buys sharper place search. Currently ad-free and accessible to all.

My priority is getting life-saving flood information into the hands of every Filipino who needs it, when they need it most - while finding sustainable ways to keep this service running.

Acknowledgments & Prior Research

While BAHABA was developed independently based on personal need during Typhoon Kristine 2024, I want to acknowledge existing flood monitoring research and systems in the Philippines. These projects represent important work in disaster management and flood prevention:

Open Source & Data Providers

Baha Ba? by Nicolei Esperida →

Open-source PAGASA river telemetry and road flood prediction, and the project that shares this name

OpenStreetMap contributors →

Every road, place and boundary on the map, under ODbL

OSRM →

The routing engine behind every journey and turn instruction

MapLibre GL →

The map renderer, a community fork kept free and open

CARTO basemaps →

The Dark Matter, Voyager and Positron map styles

Photon →

The open-source geocoder we run ourselves for place search

Nominatim →

Place search and reverse geocoding, and the fallback when Google is unavailable

Open-Meteo →

Weather and rainfall, free for non-commercial use

PAGASA-DOST →

Live river gauge telemetry, alert thresholds and basin flood-watch bulletins

UP Project NOAH →

National flood hazard modelling, used to tell whether a reported spot is somewhere flooding was already expected. Licensed under ODbL

BetterGov.ph →

Mirrors the NOAH hazard maps as PMTiles, which is what makes reading one point out of 34GB possible

Academic Research

DLSU Flood Monitoring System Research →

Bachelor’s thesis on flood monitoring systems

DLSU Flood Early Warning Systems Paper →

Academic research on local flood warning systems

High Tech Journal Flood Research →

Published research on flood monitoring technology

Operational Systems

Project NOAH (UP) →

National disaster risk assessment platform

Senix Flood Sensors in Philippines →

Hardware-based flood monitoring infrastructure

GIDRM Early Warning Systems →

Professional flood early warning solutions

Note: BAHABA was conceived and initially built before discovering these existing solutions. Each system addresses different aspects of flood management - BAHABA focuses specifically on real-time, community-powered flood reporting for immediate navigation decisions during emergencies.

Want to Help?

While BAHABA is free to use, maintaining and improving it requires resources. If you find value in what we’re building, consider supporting the project.