Home

Awesome

aocleaderboard

Advent of Code private leaderboards are currently limited to 200 users. This web app can merge users from multiple leaderboards, recalculate their scores based on the total number of members, and present them in a single page with the same look and feel of the original Advent of Code website. It can also show an overall leaderboard with scores for all years combined.

Leaderboards are fetched in JSON format from the adventofcode.com API URL.

Screenshots

Leaderboard with local score:

alt text

Leaderboard with star count:

alt text

Overall leaderboard:

alt text

Requirements

This app is built with Rocket web framework and, therefore, requires a nightly version of Rust.

Install

# On Fedora, RHEL, CentOS
# sudo dnf groupinstall "Development Tools"

# On Debian, Ubuntu
# sudo apt install build-essential
# rustup update
# rustup toolchain install nightly
# git clone https://github.com/scarvalhojr/aocleaderboard.git
# cd aocleaderboard
# rustup override set nightly
# cargo build --release

Configure

Required configuration

# cp settings_sample.toml settings.toml
leaderboard_name = "me and my friends"
leaderboard_ids = [12345, 23456]
session_cookie = "session=<session cookie string>"

To obtain the session cookie, login to adventofcode.com and inspect the cookie stored in your browser. You must be a member of the leaderboards in order to fetch their data - check your leaderboards at https://adventofcode.com/leaderboard/private.

Other settings

Run

Running on bare metal

Start the app:

cargo run --release

Docker

Build the Docker image:

docker build . -t aocleaderboard

Start the image:

docker run -p 8000:8000 -v "$(pwd)/settings.toml:/app/settings.toml" aocleaderboard

This will mount the settings.toml file into the container.

Docker Compose

docker compose up
# Or, for detached
docker compose up -d

Use

Point your favourite browser to http://localhost:8000.

Features

Contribute

Feedback and pull requests are welcome.

Support Advent of Code

Advent of Code is a free online Advent calendar of small programming puzzles created by Eric Wastl and maintained by volunteers. Please consider supporting their work.