z2ride: Building My Own Bike Computer

Why I started building my own bike computer app, why React Native and Expo, designing ride dashboards I can push to the phone, and what I want from my ride data afterwards.

The Origins

I bought a gravel bike about a year ago and decided it was also a good time to finally get some sort of bike computer. Until then, I had only been using my Samsung Galaxy Watch as a bike computer - mostly just tracking distance and heart rate. However, it was actually quite limited - especially when it came to the post-ride summary. I wanted to see a lot more information. I needed something I could actually use and interact with easily during the ride as well. This is how my app “z2ride” started.

There are tons of cycling apps out there, but I wanted to build a “personal” one - one I actually developed and tested in the field. Having worked on many mobile apps before, I thought it would be an interesting challenge to try to build this.

Choosing the stack

I ultimately decided to use React Native/Expo to implement the first version of the app. One of the reasons was that I might want to have an iOS version as well, and this would make it easier to have a shared codebase. I understand that having native apps for both platforms might be a better approach, but since this is an experiment and I want to keep the option of launching on other platforms, I decided to go with a cross-platform approach.

There are also some platform-specific things that need to be considered. For instance, the app supports ride recording, with important telemetry data such as speed, power, and heart rate being recorded and saved to a SQLite database. What happens if you accidentally kill the app? Should it keep recording your ride? What happens if your phone restarts? Should it resume automatically? I guess a lot of this depends on how important the data is for you. If you really care about tracking your performance, even if it’s just for health reasons, it’s nice to have a reliable way of capturing such data.

Dashboards & beyond

The ride dashboard is currently the focal point of the app. After experimenting with the app on many rides, I discovered that it’s better not to just hard-code a single dashboard. Instead, I implemented a more flexible system that allows me to easily design dashboards and push them to the app. This way, I can actually experiment with various combinations of metrics, such as speed, power, and heart rate, and figure out how relevant and useful they are in different scenarios. For instance, when training for endurance, I might care mostly about my heart rate and speed. But during a fast descent, I might only care about my speed and power. The ability to switch between different modes and have the app adapt to current conditions is something I am actively exploring.

A dashboard designed in the z2ride Studio, replaying a simulated climb up Alpe d’Huez. Press play, scrub through the ride, or switch dashboards with the pills.

What really matters?

z2ride is supposed to be my data collection tool so that I can log all the important metrics during the ride and then process them further without being constrained by the mobile form factor. Since I use a PC a lot, I also want to be able to inspect my ride data on it - there is so much more screen real estate on a desktop, allowing me to explore things that would be harder to examine on mobile.

I also want to focus on the post-ride review aspect of the app - what happens after the ride? Do I just want to look at the map and review the metrics? Or maybe I want to track whether I am actually improving on the bike and how my fitness markers are changing. There is a lot to explore, and I am glad I can share all of this so that people can use it for themselves as well.