Migrainular is a private migraine diary. I wrote about the product when it launched. This is a smaller note: we changed how weather gets onto an attack.

Weather is optional. Pain still saves with no network. When you are online, Today can show conditions and stamp barometric pressure (plus humidity and temperature) onto the entry. Pressure is the useful bit. A falling barometer is something a lot of us already feel; the app counts it, it does not forecast.

At launch that snapshot came from OpenWeather, proxied through Phoenix so the API key never sat in the PWA. That worked. It also meant a Fly secret, a quota, and a cache whose whole job was “do not burn the free tier.”

Migrainular will not charge people. OpenWeather’s key was leftover vendor machinery for a free app.

Why Open-Meteo

Open-Meteo is a free weather API for non-commercial use. No key. You ask for coordinates and the variables you actually want. For us that is current temperature, humidity, weather code, sea-level pressure, surface pressure, and a few hourly pressure points so we can show the change over the next three hours.

Their free tier is 10,000 calls a day, 5,000 an hour, 600 a minute. They ask for CC BY 4.0 attribution. That matches a diary with no ads and no subscriptions.

The PWA still does not talk to Open-Meteo. Phoenix is the proxy. One Fly IP, one cache, diary contents never ride along. Privacy stays the same shape as launch: location in, a small snapshot out.

City and ZIP go through their geocoding API first. Device GPS skips that and sends lat/lon. The JSON we hand the client did not change, so Today, the stamp on an entry, and the barometer overlay on Trends kept working.

Not burning the free tier

OpenWeather trained us to cache. We kept that, and tightened the GPS path.

Weather models are kilometer-scale. A phone is not. If you cache on the raw float, every visit to Today is a new key and a real upstream call. We round to two decimal degrees (~1 km) before the cache key and the request. People in the same neighborhood share a slot. City and ZIP already did.

The rest is boring on purpose:

  • About 20 minutes for conditions, a week for geocoding
  • Only the fields we stamp, not a week of unused forecast
  • A User-Agent that names the app
  • No retries on a 500—the client can save the attack without weather

Dev stubs the upstream so local work does not hit them at all.

What you see in the app

If weather is still fetching, Today says it is checking. If it fails, it says it failed. It only asks you to set a city, ZIP, or device location when you actually have not. Privacy and Profile credit Open-Meteo.

That is the whole change: same 20-second log, same pressure stamp, no vendor key. Open-Meteo does the weather. Migrainular stays a diary.

Try Migrainular at migrainular.com — pain, save, done.