As a vivid speedrunner of the game Quantum Conundrum, I always had a desire to have a clear overview of the fastest times for each level. Ideally, with a link to a video of how such time was achieved. This overview has had many iterations, with this version as the last.
It not only tracks the best times that have been set, but also the least "shifts", which is a challenge to use a key gameplay element as little as possible.
The best times are pulled from speedrun.com using their API and stored in a database, as a cache of sorts. The least shifts are added manually, also kept in the database.
First thing I had to do was figure out how the speedrun.com API works. Fortunately, their API is well documented and easy to work with. We simply start with retrieving all levels, and retrieve the runs performed for each level. To keep things performant, we only do a complete update periodically. Users can request an update for a level if it hasn't recently been updated. I also keep track of the last update timestamp, so I only have to retrieve updates since that last timestamp.
The retrieved data is stored in multiple tables. For each level, we then retrieve the top 3 fastest runs with some fancy querying (and a bit of additional filtering afterwards). We also have a table with user data, which we can link to the runs. I haven't bothered doing this in the database, and find matching users in my code instead.
The front-end retrieves the formatted data from the database using a custom REST API. It's then visualized using React, where I have not used any additional pre-fabricated UI. Both the graphs and the table are completely custom SVG/React implementations.
If I were to continue working on this project, there's at least two things I would like to pick up:
However, I'm quite satisfied with the web app as it is now. It's functional and aesthetically pleasing. Given this was just a quick project, the outcome is quite delightful if I say so myself.