Display Achievements
Now that we can display each data point that is provided by the Bosch EUDA API it’s time to think about additional features on top of that.
As a starting point let’s calculate and display achievements a user can unlock by riding their eBike.
To do so we need to
- add function to fetch all activities recursively to be able to bypass the paging mechanism of the EUDA API
- add an achievement service that calculates achievements based on the fetched activities
- add an achievement page that displays the unlocked achievements
Some sample achievements can be based on
- completed activities, e.g. first ride, 10 rides, 100 rides
- completed distance
- elevation gain
- real world distances, e.g. distance around the world
- registrations of eBikes and components
- bicycle race distances, e.g. Tour de France
- battery charge cycles
- bike pass
- times of the day, e.g. early bird and night owl
To motivate users to ride across the country we add achievements based on regions they have used their bikes in. To do so we
- add a region finder service to identify the German federal state of a given GPS coordinate
- add some sample achievements based on visited German federal states
To motivate the users to rider continuously over the year we add achievements based on monthly riding activity. To do so we add achievements
On the achievements page we display all available achievements, but initially we keep their names hidden. Unlocked ones are highlighted and their name is revealed.

In the next post we will add an option to share unlocked achievements for example in social media or messenger apps.