Skip to content

rankguessr/api

Repository files navigation

GitHub License Go Report Card Website Discord

Rankguessr API

This repo contains all logic behind rankguessr and some tools for player pool collection

Run Locally

Clone the project

  git clone https://github.com/rankguessr/api rankguessr-api
  cd rankguessr-api

Start the server (all the required services are started automatically)

  devenv up

Environment Variables

To 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

FAQ

How can i fill a players db table?

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 shell

Build 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

About

rankguessr api/tools

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages