Skip to content

Blixtvakt · 2022 · work

Blixtvakt — lightning alerts on your phone

At Zenon AB I rebuilt Blixtvakt, an Ionic app that watches SMHI's lightning data and warns you when strikes come close, on a map drawn from OpenStreetMap, with alert settings you tune yourself.

Layers
interface, application, services
Built with
Ionic · TypeScript · OpenStreetMap · SMHI API · Push notifications
14:02 Vättern 25 km 3 strikes within 25 km RADIUS 25 km QUIET 23–06 · SOUND ON IONIC · TYPESCRIPT SMHI lightning strikes · API every 5 min lat · lon · kA · t OpenStreetMap map tiles · z/x/y cached on device the app poll → filter → notify poll dist push haversine against my position tiles strikes → app → phone ALERTS TODAY 11:40 13:15 13:52 14:02 quiet 23–06: no sound, banner only 10 km 1 2 3 4 5
Fig. 01 — One alert, end to end: SMHI reports a strike, the app measures it against your radius, the phone tells you.
  1. 1SMHI feed · lightning strikes with position, current and time
  2. 2OpenStreetMap · the map, as tiles cached on the device
  3. 3Warning radius · yours to set; strikes inside it count
  4. 4Settings · radius, quiet hours, sound
  5. 5Notification · poll, measure, push

The problem

Blixtvakt, Swedish for lightning watch, is an app for people who need to know when lightning is near: anyone outdoors, on the water, or responsible for others. Zenon AB had an existing app, and my internship brief was to bring it up to date and make it better at its one job: warning the right person, at the right distance, at the right time.

What I built

I rebuilt the app with Ionic and TypeScript, so one codebase served both phone platforms. The map comes from OpenStreetMap2; the strikes come from SMHI1, the Swedish meteorological institute, through their API, polled on a schedule and plotted as they arrive. Around that core I added the features that made the app personal: a warning radius the user sets3, quiet hours4, and a choice of how loud a warning5 should be. Every setting is a question I had to answer about how people actually use a weather app.

What I learned

External data is never quite the shape you want, and the app is only as trustworthy as the worst feed on a bad day. I learned to treat SMHI’s data as something to validate, not to display, and that the most important feature was the one users could tune themselves: once people could set their own radius, they stopped turning the warnings off.