Against Yesterday: Racing Your Own Ghost
I’ve been running the same loops for years. The problem with that isn’t boredom — it’s that I have no idea whether today’s run was actually better than last Tuesday’s, except by feel. So I built Against Yesterday: a GPS run/cycling app where every route is a race against your own personal best.
The hero metric isn’t distance or pace. It’s the live gap: AHEAD or BEHIND, in meters, against the ghost of your PB. You feel it the whole way.
The idea
Most running apps treat your history as a log. Against Yesterday treats it as a competitor. Every finished run on a route becomes that route’s personal best, and the next time you start it, a ghost runs the PB line while you run your line. The gap updates live on the map and on the readout.
A run that isn’t on an existing route still counts — it becomes a new route the moment you finish it. No setup, no naming, no “create route” flow. And a fresh install is never empty for long: record a route once and it’s in your library, ready to be raced.
What it does
- Record runs — a state machine driving
preparing → GPS acquiring → ready → running ⇄ paused → finishing → completed, with live distance, pace, elapsed time and the PB gap. - Ghost racing — every route carries a PB; run against its ghost live on the map, then finish to see exactly where you were faster or slower, with a splits breakdown and NEW PERSONAL BEST detection.
- Map — route and track geometry go through one
MapSurfaceseam. The default is a self-contained painter (no map SDK, hermetic on host and in tests); Linux desktop builds render raster OpenStreetMap tiles throughflutter_map; device builds opt into the MapLibre renderer withMAP_VIEW=true, drawing the route, the travelled portion, the YOU and ghost markers, and a follow camera you can recenter. - Offline maps — per-route regions downloaded straight from the route page (“Download offline map”) and managed in Settings → Map: progress while a region downloads, delete with confirmation, and the OSM/OpenFreeMap attribution. Downloads are user-initiated, size-capped and one at a time.
- Route library — course cards with PB/average/last stats, a performance chart of every attempt, and attempt history.
- Results & history — a run-complete interstitial with NEW PERSONAL BEST detection, a GAP TO YOUR BEST chart, splits, activity detail with the recorded track on the map and a collapsible raw-GPS card, and a home history grouped by month with per-run GPX export and delete.
- Background recording — wall-clock timing and a persisted run snapshot every few seconds, so a paused or interrupted run resumes where it left off, including after process death. On Android a foreground
locationservice keeps fixes flowing with the screen off, with an honest “SCREEN-OFF RECORDING NOT PROTECTED” banner when it can’t. - GPX export — Settings writes every route and recorded run as one timestamped GPX file into the Android Downloads folder (MediaStore on API 29+, legacy storage grant below it); History adds a per-run export.
- First-launch onboarding — three swipeable screens, then straight into recording a route. No account, no cloud.
- Settings — haptics, countdown, units (km/mi), light/dark/system theme, export, delete all data, and an About card with links to the source and issue tracker.
- Live feedback while you run — a weak-signal banner when GPS accuracy drops, an OFF ROUTE card with metres back to the line, and a FIXES counter so a dead receiver is visible mid-run rather than in the saved track.
- Developer diagnostics — a
DEV_TOOLS-gated readout of the live engine, GPS, track, route, ghost and persistence state, plus one-tap export of the current run as raw GPS for regression replay. - Accessibility & polish — WCAG-AA palette, 48 px touch targets, screen-reader labels, responsive layouts across phone widths, and deliberate one-shot animations that drop out entirely when animations are disabled.
Under the hood
The app is Flutter, but the route/ghost pipeline lives in a Rust engine (gps-engine) in a Cargo workspace, reached only through an EngineService facade. A deterministic FakeEngineService is the fallback when the native library isn’t present, which keeps host tests and the E2E suite hermetic. The Rust side handles route matching, ghost geometry, splits and performance gaps; the Flutter side stays thin. Raw fixes are filtered through a two-pass track filter (jitter, dropouts, jumps) before any geometry is drawn — the same logic is mirrored in Dart for live device recordings, so a spike is retracted rather than stalling the run.
The map renderer is chosen at build time: a self-contained painter by default, MapLibre Native on device builds. Map data is OpenStreetMap (ODbL) and offline regions are per-route downloads, not bundled.
For live GPS it talks to the platform’s own location service — Android’s LocationManager, iOS’s CLLocationManager — through a method/event channel, with no Google Play Services, so the build stays F-Droid-clean. Movement is gated on ground actually covered (a 0.5 m/s floor), so a parked phone doesn’t count moving time or show a phantom pace; TIME is a separate wall-clock stopwatch that keeps running while you stand still.
Settings, routes, activities and snapshots persist to the device’s application documents directory, so everything survives a restart.
F-Droid
Against Yesterday is built to be F-Droid-friendly: AGPL-3.0-or-later, no proprietary location or map dependencies, and a build recipe that compiles the Rust engine and strips MapLibre’s GMS sources. Fastlane metadata ships in the repo. No internet permission is declared — there is no cloud, no account, no telemetry.
Try it
Source: github.com/DavidNeurieder/AgainstYesterday
If you run the same loops I do, I’d love to hear whether racing your own ghost changes how you pace them.