Track age and weight

This commit is contained in:
Alexander Heldt
2026-07-04 09:20:31 +00:00
parent 709a051afb
commit f14a749169
6 changed files with 540 additions and 17 deletions
+8 -1
View File
@@ -1,6 +1,7 @@
# puppy-tracker
A tiny offline-first PWA for tracking your puppy's sleep, meals, pees, and poos.
A tiny offline-first PWA for tracking your puppy's sleep, meals, pees, poos, and
weight.
The browser is the primary client; a small Go server provides a shared
source-of-truth and sync between devices.
@@ -16,6 +17,12 @@ source-of-truth and sync between devices.
merged set.
- Service worker bypasses cache for `/api/*` so writes always hit the server
when online; static assets are still cached for offline use.
- The puppy's name and birthday are a shared profile stored on the host
(`GET`/`PUT /api/config`), so a new device picks them up automatically instead
of being configured per-client. The client caches the last-seen values in
`localStorage` for offline/instant paint and reconciles with the server by
last-write-wins on `updatedAt`. The age shown in the header (in weeks and
months) is derived from the birthday.
A status pill in the header shows `syncing…` / `synced 2m ago` / `pending` /
`sync error` / `offline`. Tap it to force-sync.