Apple Weather added precipitation notifications years ago. Useful, except it only works in select markets. Oslo is not one of them.
Yr has a nowcast API that covers Norway with 5-minute resolution up to 90 minutes out. That’s exactly what you want for “should I bring an umbrella or wait 20 minutes.” But Yr’s own app only sends a daily morning summary. No “rain starts in 15 minutes” alert.
I’ve been wanting to wire this up for a while. Yesterday I wrote about using Claude Code on the web and it seemed like a good opportunity to actually test it properly: build something real, from scratch, on my phone.
Using Claude Code
The session was basically one conversation. I described what I wanted: poll Yr’s nowcast, detect rain starting or stopping within 90 minutes, send a push notification. Claude scaffolded the whole project. Cloudflare Worker with TypeScript, wrangler config, KV namespace for state, the works.
I didn’t write a line of code. What I did do was read every file it produced and ask follow-up questions when something looked off. The deduplication logic needed a nudge (it would have spammed notifications every 5 minutes otherwise). I also changed the notification text to Norwegian and tweaked the thresholds. That kind of back-and-forth is where the session actually happened.
Claude scaffolding the entire project from a single conversation on my phone.
Today’s session added a GitHub Actions workflow so pushes to main deploy automatically.
Total wall-clock time across both sessions: maybe 45 minutes.
Architecture
The stack is intentionally simple:
Cloudflare Worker (TypeScript) Runs on a cron every 5 minutes. Fetches the nowcast, inspects the timeseries, decides whether to send a notification.
Yr/MET Norway Nowcast API Free, no API key. Returns precipitation rate at 5-minute intervals for the next 90 minutes. Oslo is well covered.
Cloudflare KV Persists a small state blob between invocations: was it raining last time, when was each notification type last sent. Workers are stateless so this is necessary to avoid duplicate alerts.
ntfy.sh Open source push notification service. You publish to a topic via HTTP POST, subscribers get the notification on their phone through the ntfy app. No account required for the free tier. Self-hostable if you want.
GitHub Actions
On push to main, runs wrangler deploy. That’s the entire CI/CD pipeline.
The logic covers two cases: currently dry and rain is coming, or currently raining and a dry window is coming. A “dry window” requires at least 15 consecutive minutes below the precipitation threshold. Notifications of the same type are suppressed for 30 minutes to avoid noise.
The whole thing lives at github.com/okms/yr-90min-notifier if you want to run your own.