RideMate
A self-hosted cycling computer: a Flutter app records every ride, and a Next.js dashboard turns the data into road-quality maps and honest ride comparisons.
RideMate is a personal cycling project: a Flutter app that records every ride on the handlebar, and a self-hosted Next.js dashboard that turns those recordings into maps, road-quality heatmaps and ride-to-ride comparisons.
It began with a specific question. Why was today's commute four minutes slower than Tuesday's? A single total time cannot answer that — the answer is somewhere in the distance ridden, the time spent stopped, the pace on each stretch, and the state of the road. RideMate exists to record all of it consistently, then take the guesswork out of the comparison.
What a ride records
Position and motion — GPS fixes with speed, altitude and accuracy, sampled continuously for the whole ride.
Road surface — the phone's accelerometer is read at 50 Hz; deviation from gravity becomes a bumpiness value for every point on the track.
Stops and movement — a shared stop detector separates moving time from waiting time, so a long red light is not confused with slow riding.
The raw signal — the high-frequency acceleration window is archived separately from the analysed points, for offline experiments without slowing down the live dashboard.
From the phone to the dashboard
The app is offline-first: rides are written to a local SQLite database first, so a lost connection never loses a ride. When a network is available, the app syncs to a small self-hosted service, where the dashboard reads the same data back. The result is live at rides.jyuan.online.
The app runs as a foreground service and keeps recording with the screen off.
A floating speed bubble stays on top of other apps, with a single hold-to-stop control.
Voice announcements call out each kilometre — distance, elapsed time, current speed — without asking the rider to look down.
Finished rides can be exported as GPX for use anywhere else.
Reading the road, not just the clock
The map colours the track by bumpiness, so a commute gradually becomes a picture of where the asphalt is bad. Aggregating those points produces a heatmap of rough spots, and the same data feeds a per-device top list of the bumpiest places.
The comparison page is the part that started the project. For any two rides it decomposes the time difference into exactly three terms:
ΔT = detour + pace + stops — extra distance, faster or slower riding, and extra waiting.
The terms add up to the real gap with no leftover "other" bucket. When the difference is spread evenly across the whole route, the page says so instead of inventing a hotspot; when one junction accounts for most of it, that junction is named and mapped.
Live, with the right amount of privacy
A ride can be shared as a live link. Nearby riders appear as anonymised peers, with positions deliberately blurred server-side before they ever reach a browser. The dashboard itself is self-hosted behind a private tunnel — this is a personal tool, not a public social network.
Status
RideMate is a private, actively used project. It is not open source, and there is no public repository; the live dashboard is shared for demonstration only.