A real-time flood monitoring app built with Flutter and MapLibre. It pulls live flood station data from the Bahaba API, displays station markers on a map, and lets users inspect rainfall, water level, and risk categories for each station.
Bantay-Baha is designed for quick situational awareness during flood events. The app shows:
- live flood station locations on a map
- station risk levels (
NORMAL,WARNING,ALARM,CRITICAL) - rainfall data for 10-minute, 1-hour, and 24-hour windows
- water level and 1-hour change
- a bottom sheet with detailed station metrics
- auto-refresh and manual refresh support
- Real-time flood monitoring using the Bahaba API
- Interactive map with MapLibre GL
- Animated pulse markers for flood stations
- Risk-based color coding for each station
- Tap a station to view detailed readings
- Auto-refresh every 5 minutes
- Fresh data loaded from the live endpoint
- Flutter
- Dart
- MapLibre GL for map rendering
- Dio for API requests
.
├── lib/
│ ├── main.dart
│ └── ui/
│ └── home/
│ └── home_view.dart
├── test/
│ └── widget_test.dart
├── android/
├── ios/
├── linux/
├── macos/
├── windows/
├── web/
├── analysis_options.yaml
├── pubspec.yaml
├── README.md
└── .metadata
The current project follows a simple UI-first architecture for a small app:
main.dartstarts the app and initializes MapLibre pre-warminglib/ui/home/home_view.dartcontains the main flood-monitoring overview- the screen is responsible for:
- fetching station data
- parsing the API response
- converting data to GeoJSON
- creating map layers
- animating pulse markers
- showing station details in a bottom sheet
This is a practical prototype architecture, and it can be refactored into a cleaner layered structure later if the project grows.
The app uses the live flood station API:
https://bahaba.nicolei.games/api/flood/live
The app validates the response shape and filters out invalid coordinates before plotting markers.
- Flutter SDK
- Android Studio / Xcode / VS Code depending on platform
flutter pub getflutter runflutter testThe project currently targets the Flutter SDK version declared in pubspec.yaml:
environment:
sdk: ^3.13.4- Display flood stations from the API
- Parse and validate live readings
- Auto-refresh on interval
- Show map-based station markers
- Show station detail sheet
- Refactor into a cleaner architecture
- Add a telemetry dashboard
- Add geocoding/search for places
- Add production-grade tests for the monitoring flow
This project is based on data from the Bahaba flood API and was inspired by the work of the Bahaba project by haliknihudas666.
This project does not currently declare a license in the repository metadata.
Bantay-Baha is a practical flood monitoring prototype focused on real-time awareness and quick inspection of flood conditions. It is useful as a starting point for a larger disaster-response or environmental monitoring application.