Web Projects
CV Portfolio Professional portfolio
La Porra.club Football prediction platform · closed in 2026

Eclipse Driver

PWA for Spain's solar eclipses

Web PWA
Eclipse Driver preview

About

Eclipse Driver helps you choose where to watch a solar eclipse from and get there on time. It covers three: the total eclipse of 12 August 2026, the total eclipse of 2 August 2027 and the annular eclipse of 26 January 2028. For each one it draws the path with NASA data and ranks the viewing points by score (24, 9 and 9). On eclipse day it counts down and tells you when to take your glasses off and when to put them back on. It installs on the phone and opens in airplane mode.

Highlights

The path and the ranking

The limits of the path with NASA data, and every point with its duration and how to get there. The score weighs solitude (40%), duration (25%), travel (20%), crowds (10%) and clouds (5%).

Countdown with alerts

Ten minutes and two minutes before the maximum the phone vibrates and beeps. It says when to take the glasses off and when to put them back on. In the 2028 annular eclipse, never: glasses on at all times.

Compass to the sun

It points to the azimuth of the sun at eclipse time and reminds you of its height, so you can check in advance that the horizon is clear.

No signal needed

One button downloads over wifi the maps of the area of the chosen eclipse, up to 1,500 tiles. After that the app, the map and the countdown work in airplane mode.

Built With

  • A single index.html: 53 KB of HTML, CSS and JavaScript, with no frameworks and no bundler
  • Leaflet 1.9.4 served locally: no CDN; if the map fails, the rest of the app keeps working
  • Service worker: stores the app and the OpenStreetMap tiles, which stay after every deploy
  • Tests with headless Chromium: a script checks the year switch, the compass with synthetic events and the offline mode
  • Static files on nginx: no application server and no database

The Story

I built it for the total eclipse of 12 August 2026. I had to choose a point of the path in Tierra de Campos, leave with time to spare and not depend on phone signal, so everything had to fit on the phone and open in airplane mode. That is why it is a static file, with no server and no database. The next day I added the 2027 and 2028 eclipses with a year selector.

Eclipse Driver

PWA for Spain's solar eclipses