StackMoth/Work/Rainfall tracker

Public tool

Coordinate-matched rainfall against measured river levels

A public tool for Sri Lanka’s monitored river systems, pairing modelled rainfall with measured river gauge readings.

1Runtime dependency (vendored)
0Third-party CDN requests
PagesCloudflare edge hosting

Generating the data and trusting the data are separate steps, on purpose.

Engineering notes

Coordinate matching & self-validating data

01Facts
Type
Public, no account required
Stack
Vanilla JavaScript, Leaflet, Node.js
Data
Generated and validated by a Node pipeline
Dependencies
One, vendored locally
Hosting
Cloudflare Pages
02Rainfall alone does not tell you much

Modelled rainfall is widely available and river gauge readings are published separately, but the two are only useful together, and only once each gauge has been matched to the coordinates the rainfall model actually covers. That matching is the work. The interface then shows the pair side by side for a chosen gauge and period.

03The pipeline validates its own output

Separate commands generate the river level and river map datasets, and separate validators check them. Both validators are gates rather than advisories, and a single verify command chains the test suite and both of them, so bad data cannot reach the published site just because generation exited zero.

04No framework, one dependency

The interface is vanilla JavaScript. Leaflet is the only runtime dependency and it is vendored into the repository rather than pulled from a CDN, so the tool does not break when someone else’s hosting does, and it makes no third-party requests on behalf of the people using it.

Next flagship

Courts: booking, payments & floodlights