Catchment phase 1: replacing a handwritten rain log
My dad has logged rainfall by hand since 2009. Phase 1 replaces the notebook with a small Go service he can use from his phone.
What shipped
- A rain logbook: one reading a day, edits kept as history.
- Forecast snapshots from Open-Meteo, stored so I can compare forecast with measured rain later.
- A roof catchment calculator: roof area × rainfall × runoff coefficient.
The dashboard renders in 38 ms on the old OptiPlex.
Why no framework
The standard library’s net/http covered everything phase 1 needed1.
mux := http.NewServeMux()
mux.HandleFunc("GET /readings", h.listReadings)
mux.HandleFunc("POST /readings", h.createReading)
Footnotes
-
Go 1.22 added method and wildcard patterns to
ServeMux. ↩