thermograph/static
Emi Griffith f34ab7ef96 Add PWA + Web Push delivery for weather alerts (#95)
Make the app installable and deliver existing alert notifications as OS
push, alongside the in-app bell.

Backend:
- PushSubscription model (per-device endpoint + keys, owned by a user) and
  register/unregister/test endpoints under /api/v2/push, cookie-auth scoped
  to the user like the subscription routes.
- push.py: VAPID key management (env -> data/vapid.json -> generated) and a
  pywebpush send helper that reports gone endpoints for pruning. No DB coupling.
- notify.py: after creating an in-app Notification, dispatch Web Push to the
  user's devices (guarded — a push failure never affects the in-app write;
  endpoints reported gone are pruned).
- Serve the .webmanifest with the correct media type.

Frontend:
- manifest.webmanifest + 192/maskable icons; <link rel="manifest"> on all pages.
- sw.js: push + notificationclick handlers (push-only; no fetch caching, so it
  doesn't fight the existing IndexedDB cache). Registered globally in nav.js in
  secure contexts.
- push-client.js + a "Notifications on this device" toggle and test-send on the
  /alerts page, subscribing through the existing cookie-aware apiFetch.

Push and service workers require a secure context, so this is active over HTTPS
(or http://localhost) and cleanly no-ops on a plain-HTTP LAN origin.
2026-07-15 23:21:06 +00:00
..
account.js Account system with weather-notification subscriptions (#89) 2026-07-15 18:46:46 +00:00
app.js Account system with weather-notification subscriptions (#89) 2026-07-15 18:46:46 +00:00
cache.js Warm neighbor cells server-side (/cell?neighbors=1) (#51) 2026-07-11 20:47:31 +00:00
calendar.html Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
calendar.js Account system with weather-notification subscriptions (#89) 2026-07-15 18:46:46 +00:00
chart.js Extract the chart library and the chunked streaming fetch (#49) 2026-07-11 20:33:06 +00:00
compare.html Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
compare.js Account system with weather-notification subscriptions (#89) 2026-07-15 18:46:46 +00:00
day.html Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
day.js Account system with weather-notification subscriptions (#89) 2026-07-15 18:46:46 +00:00
filtersheet.js Compare basis inline; synced inline + sheet metric selector (both pages) (#82) 2026-07-12 07:45:12 +00:00
index.html Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
legend.html Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
logo-192.png Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
logo-maskable-512.png Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
logo.png Link previews: Open Graph tags + logo for shared URLs (#35) 2026-07-11 15:59:14 +00:00
logo.svg Link previews: Open Graph tags + logo for shared URLs (#35) 2026-07-11 15:59:14 +00:00
manifest.webmanifest Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
mappicker.js Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
nav.js Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
package.json Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
push-client.js Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
shared.js Distribution bars: split the in-bar range into Max/Min rows (#84) 2026-07-12 18:32:38 +00:00
style.css Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
subscriptions.html Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
subscriptions.js Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
sw.js Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
units.js Make the compare page unit-aware so the °F/°C toggle works there (#55) 2026-07-11 21:48:21 +00:00