Right now the user has to remember to come back and check. A "ping me when the window opens" feature is the only thing that turns this from a tool you use once into one you keep installed.
Goal
Let the user subscribe a saved location + threshold and receive a Web Push notification when a matching window appears within the forecast horizon.
Example subscription
Phi Phi · sea · 4h window · score ≥ 80 · within next 3 days
Scope
- UI: "🔔 Watch this place" button on a forecast view; opens a small modal to set duration, mode, score threshold, lookahead.
- Web Push permission request and
PushSubscription capture.
- Server side:
- Storage for subscriptions (Vercel KV is gone; use Marketplace Postgres / Upstash Redis).
- Cron job (
crons in vercel.ts) every 30 min that re-fetches each subscribed location, runs the same findBestWindows logic, and emits a push if a window passes the threshold and hasn't been notified for this 24h slot already.
- VAPID keys +
web-push library on the server.
- Unsubscribe link in each notification.
Out of scope
- iOS < 16.4 doesn't support Web Push; treat as graceful degradation.
Effort
Large. Touches infra (cron + KV/Postgres), client (notification permission UX), and a non-trivial scheduler. Worth doing only after #15 (saved locations) and #19 (tides if marine-focused).
Right now the user has to remember to come back and check. A "ping me when the window opens" feature is the only thing that turns this from a tool you use once into one you keep installed.
Goal
Let the user subscribe a saved location + threshold and receive a Web Push notification when a matching window appears within the forecast horizon.
Example subscription
Phi Phi · sea · 4h window · score ≥ 80 · within next 3 daysScope
PushSubscriptioncapture.cronsinvercel.ts) every 30 min that re-fetches each subscribed location, runs the samefindBestWindowslogic, and emits a push if a window passes the threshold and hasn't been notified for this 24h slot already.web-pushlibrary on the server.Out of scope
Effort
Large. Touches infra (cron + KV/Postgres), client (notification permission UX), and a non-trivial scheduler. Worth doing only after #15 (saved locations) and #19 (tides if marine-focused).