
Web & phone apps
porchlight
A battery-first location sharer for one household: Android tracker, live web map, Windows alerts.
- When
- Oct – Nov 2026
- Status
- Server, map and Windows app live; Android trial pending
- Built with
- KotlinJetpack ComposeFastAPISQLiteReactMapLibre GLC# / WPF
porchlight is a private location sharer for one household, built to replace OwnTracks. Android phones report where they are on as little battery as the platform allows; on a PC or an iPhone, a web map shows each phone's last position and the day's route live, and a Windows tray app delivers alerts.
The need
The household's OwnTracks setup was disliked for its battery use, interface and usability, and its HTTP mode cannot answer a real on-demand ping. porchlight was designed around a battery budget from the start.
What was built
- A native Kotlin and Jetpack Compose Android app that detects movement from activity transitions and an exit geofence; its default Battery saver preset never turns on GPS, and events wait in an on-disk queue uploaded in batches.
- A trail recorded only between leaving and stopping, from Wi-Fi and cell points in Battery saver or from GPS in the Balanced and Precise presets, drawn live on a MapLibre map over Google map tiles.
- Alerts for leaving, stopping and a first unlock after a set number of hours, sent to a C# WPF tray app on Windows and to Pushover; they carry names, times and a distance rounded to 100 m, never a position.
- Transparency on the phone: the app always shows the true sharing state and who last changed it, the person sharing can pause it at any time with everyone watching told, and Android's tracking notification shows whenever the app actively tracks.
- A FastAPI and SQLite server behind one permission check, with one-time pairing codes, hashed device tokens, throttled pairing, and browser sign-in by a one-time code from the tray app instead of a password.
- One contract for three clients: the server's Pydantic models generate the Kotlin, TypeScript and C# types through JSON Schema, and a test fails when the committed copies drift.
What was hard
- A battery model built from published measurements: GPS costs for every second it is on, and every upload pays a radio tail. That ruled out the original two-minute settings poll (720 wake-ups a day, 1 to 4% of battery on mobile data, and deferred by Doze anyway) in favour of push for commands, with settings carried back in every upload reply. The model is code, and an energy-budget test replays synthetic days and fails any change that exceeds it.
- Android 8 and later no longer deliver screen-off and unlock broadcasts to a closed app, so the first-unlock alert runs on an always-on listener that holds only a receiver: no wake lock, no GPS, no timer and no network of its own.
- Google's Maps JavaScript API dropped its heatmap layer in May 2026, so the map draws Google's tiles through MapLibre GL instead, honouring their cache headers, with the quota capped and free layers as the fallback.