This repo contains all logic behind rankguessr and some tools for player pool collection
Clone the project
git clone https://github.com/rankguessr/api rankguessr-api
cd rankguessr-apiStart the server (all the required services are started automatically)
devenv upTo run this project locally, you will need to add the following environment variables to your .env file
OSU_CLIENT_ID, OSU_CLIENT_SECRET - can be acquired here
Variables which are set in devenv.nix:
PORT - default is 8080
WEB_URL, APP_URL - web and api urls
ENCRYPTION_KEY - is used to encrypt client secrets in sessions table
REDIS_URL, DATABASE_URL - redis and postgres connection urls
TURNSTILE_SECRET - cloudflare's turnstile secret key, uses test key by default which will always return success
S3 variables:
S3_SECURE, S3_ENDPOINT, S3_REGION, S3_BUCKET_NAME, S3_SECRET_KEY, S3_ACCESS_KEY
There is a built-in subcommand called collect, which for now only has one players source, which is top 10k players by country
Enter devenv shell:
devenv shellBuild rankguessr cli & start collecting players:
buildcli && ./bin/guessr collect top10k --country *country_code*Default command output is collected/top10k_*country_code*.csv
Check help command for more options