2026-09-28 2026-09-30 -- --

FloodWatch Live — Real-time Flood Telemetry & Civic Disaster Map

A civic tech disaster response map delivering real-time flood sensor telemetry across critical Thai river basins, built with zero-mock live data and high-performance vector tiles.

FloodWatch Live — Real-time Flood Telemetry & Civic Disaster Map
Real-time Telemetry Civic Tech MapLibre GL OpenFreeMap Thai GeoJSON Next.js TypeScript React MapLibre GL Tailwind CSS Vercel Edge Vitest

1. Overview#

FloodWatch Live is a civic tech real-time flood monitoring and early warning dashboard engineered to provide citizens, first responders, and local disaster relief coordinators with instantaneous telemetry data during monsoon and flood events across Thailand.

The platform targets high-vulnerability disaster corridors, focusing on Prachuap Khiri Khan (Bang Saphan Basin) and Songkhla (Hat Yai Basin). Adhering to a strict Zero-mock Civic Data Policy, FloodWatch Live aggregates live telemetry directly from official hydrological monitoring stations and renders them onto smooth 60 FPS vector map tiles utilizing MapLibre GL JS and OpenFreeMap.


2. Stories & Visual Tour#

Real-time Disaster Telemetry Map#

FloodWatch Live Real-time Disaster Map Interactive vector map interface displaying live hydrological station pins, water level alert thresholds, and the real-time telemetry HUD.


3. Architecture & Workflows#

System Architecture (Infographic)#

flowchart TB
subgraph Client["Client Tier (MapLibre GL JS & React)"]
UI_MAP["Interactive Vector Map\n(OpenFreeMap Style / WebGL Layer)"]
UI_HUD["Telemetry HUD & Metrics Panel\n(Water Height, Discharge Rate, Status)"]
UI_GEO["GeoJSON Spatial Layer\n(Thai River Basins & Critical Zones)"]
end
subgraph Edge["Edge Ingestion & Caching (Vercel Edge sin1)"]
INGEST["Telemetry Poller & Normalizer\n(Zero-mock External Ingestion)"]
CACHE["Edge SWR Cache (60s TTL)\n(Protects Upstream Origin Limits)"]
SPATIAL["Bounding-Box Spatial Filter\n(Dynamic Point Clustering)"]
end
subgraph Upstream["Civic Telemetry & Tile Infrastructure"]
SENSORS_BS["Bang Saphan Hydrological Stations\n(Prachuap Khiri Khan Telemetry)"]
SENSORS_HY["Hat Yai Drainage Sensor Network\n(Songkhla Basin Telemetry)"]
TILE_SERVER["OpenFreeMap Global Vector Tiles\n(Zero-cost, Zero-rate-limit Base Map)"]
end
Upstream --> INGEST
TILE_SERVER --> UI_MAP
INGEST --> CACHE
CACHE --> SPATIAL
SPATIAL --> Client

Telemetry Ingestion & Caching Sequence#

sequenceDiagram
autonumber
actor User as Citizen / Community
participant Browser as FloodWatch Client (MapLibre)
participant Edge as Vercel Edge API (sin1)
participant Cache as Edge Cache (SWR 60s)
participant Station as Telemetry Endpoints (Gov Sensors)
Note over User, Station: 1. Viewport Pan / Zoom Event
User->>Browser: Pan to monitored region (Bang Saphan or Hat Yai)
Browser->>Edge: Request station telemetry by Bounding Box (BBox)
Edge->>Cache: Query Edge SWR Cache
alt Cache Hit (Fresh Data < 60s)
Cache-->>Browser: Return cached Telemetry GeoJSON (< 30ms)
else Cache Miss / Stale
Edge->>Station: Poll live hydrological sensor data (Zero-mock)
Station-->>Edge: Return raw telemetry payload
Edge->>Edge: Normalize schema & compute alert levels (Normal, Warning, Critical)
Edge->>Cache: Update Edge SWR Cache
Edge-->>Browser: Return validated GeoJSON FeatureCollection
end
Note over Browser, User: 2. WebGL Hardware-accelerated Rendering
Browser->>Browser: Cluster station markers & update WebGL layer
Browser-->>User: Render color-coded hazard indicators & telemetry trend charts

4. Key Engineering Highlights#

  • Zero-Mock Civic Data Policy: Direct integration with live governmental telemetry endpoints across Prachuap Khiri Khan (Bang Saphan) and Songkhla (Hat Yai). No simulated data or mocks are used, ensuring genuine civic utility and trusted disaster awareness.
  • OpenFreeMap & Vector Tile Rendering: Leveraged OpenFreeMap with MapLibre GL JS as an open-source, cost-free alternative to proprietary map services, eliminating billing surprises while maintaining 60 FPS hardware-accelerated WebGL vector rendering.
  • Edge-powered SWR Ingestion: Deployed on Vercel Edge (sin1) with Stale-While-Revalidate (SWR) caching strategies (60s TTL), safeguarding public upstream APIs from downtime during sudden disaster-driven traffic surges.
  • Thai River Basin GeoJSON & Viewport Optimization: Custom-tailored Thai hydrological GeoJSON polygons and real-time bounding-box spatial queries reduce network payloads by over 80% during user navigation.
  • Automated Unit & Geo Testing: Validated coordinate transformations, status calculation algorithms, and SWR cache behavior through automated test suites in Vitest.

5. My Role & What I Built#

As the Full-stack & Geospatial Developer, I owned the project from conception to deployment:

  • Interactive Map Engineering: Built the WebGL vector map frontend in Next.js and MapLibre GL JS, featuring custom layer styling, responsive telemetry cards, and dynamic marker clustering.
  • Edge Telemetry Ingestion: Engineered the edge API pipeline on Vercel Edge, standardizing heterogenous civic sensor responses into uniform GeoJSON FeatureCollections.
  • Geospatial & Performance Optimization: Implemented client-side bounding-box spatial queries and SWR caching headers to deliver instantaneous load times.
  • Testing & Quality Assurance: Built Vitest suites ensuring data parser resilience against malformed upstream responses and network timeouts.

6. Result & Current State#

  • Civic Tech Impact: Provides open, transparent, and mobile-responsive disaster telemetry for high-risk communities and relief organizations.
  • Production Stability: Achieves high uptime and millisecond response times through edge caching, even under heavy regional traffic surges during flood incidents.

7. Demo & Code#

© 2026 chinnakrit
RSS / Sitemap
Powered by Astro & Fuwari
© 2026 chinnakrit
RSS / Sitemap
Powered by Astro & Fuwari