For my first post, I decided to write about a project that combines two of my passions: fitness and web development. I wanted to go on a ride today, and the last time I talked to a friend about which route to take, he recommended one where a lot of trucks pass by. That got me thinking, maybe I should build an app for routes where vehicles drive 50km/h or slower.
My first idea was to find an API and filter roads by speed limit, but I got lucky: the first API I found already had a built-in filter for bicycle routes. That API is GraphHopper. Since this was meant to be a one-day project, I kept it simple.
The basic idea was for the user to enter a starting point and a destination. If they wanted to ride further than the app’s default recommendation, they could also specify a distance. So, for example, if you wanted to ride from Graz to Weiz, you could just enter the start and end points, and the app would generate the shortest possible route.

But if you wanted to ride further, you could enter a target distance too. For example the shortest route from Graz to Weiz is 30km but you want to ride 45km. Just add the distance and it will recommend a longer route instead.

Since most of the time I just start from home and want to finish by looping back, I added a “loop route” feature where person can enter a start location and a distance, and the app generates a route for you. Let’s say I wanted to do 20km around Salzburg. I’d enter Salzburg as the start and 20 as the distance, and the app would generate the route shown in the picture below.

That’s it for my first post.
Thanks for reading, and I’ll catch you in the next one.