a2b-challenge
Kotlin Android NFC osmdroid Supabase
An Android app for time trials between two NFC tags placed somewhere in the real world. Scan the START tag to see the track, scan it again to start the clock, run (or ride, or roll) to the FINISH tag, and scan that to stop it. If the time makes the top three, it is written straight back onto the tag.
The tags are the database. The finish tag carries the track’s leaderboard — time, date, and nickname for three places — so the high scores live out there, glued to a lamppost. Each track is a pair of tags sharing a random stamp, positive on the start tag and negative on the finish tag, which both tells the two apart and proves you finished the track you started. Everything is packed into compact binary NDEF records so a track fits on a cheap NTAG213.
Creating a track means pinning start and finish on a satellite map, entering a name and a short message, and writing both tags; the app measures the altitude difference with the phone’s barometer. A single Supabase table lists where the tracks are so others can find them on the map, but leaderboards are never stored online. Without that directory, the app works fully offline with the tracks it has seen.