Spritpreise.jetzt

Screenshot of the spritpreise.jetzt website showing a statistic of the gas price over the past year

This project was created at the end of 2021 as part of an improvement to the fuel price app. I wanted to offer extended statistics on fuel prices in Germany, but in particular the times at which a station offers the cheapest gas on average.

Since Tankerkönig, the data provider of the fuel price app, also provides the historical data, this was an interesting task for data processing and creating statistics.

I didn’t initially plan to create a website, but as all the data was already available and I had been toying with the idea of developing another platform for some time, I chose the web.

Visit spritpreise.jetzt for more details.

Tech Stack Link to heading

Hugo
Web
REST-API

This is a statically generated website using Hugo. Every night, a cron job takes care of updating the data and rebuilding the website.

Since a months data roughly relates to more than 14.000.000 prices changes, I had to introduce a database to improve performance. We don’t just have data for the past months, but all the way back until 2014! After all, generating the website shouldn’t take hours, but seconds to minutes.

A tool written in Kotlin then aggregates the price changes into statistics, such as the daily average of prices for each gas station and the times when gas is usually cheapest.