The API docs are available here.
You need to have Docker installed. Then simply run the following command:
docker compose up --build
Testing backend:
docker compose exec -w /backend backend pytest
Testing frontend:
docker compose exec -e CI=true -w /frontend frontend npm test
The backend tests will not work unless you provide a GitHub token first.
Environment variables are used to manage application settings.
Alternatively, you can store them in configuration files located in the
project's root directory. The default configuration file is .env
.
The following variables are required:
POSTGRES_USER
POSTGRES_PASSWORD
POSTGRES_PORT
POSTGRES_DB
The following variables are optional:
GITHUB_USERNAME
GITHUB_TOKEN
However, it is strongly recommended to provide them, as they can increase the GitHub API rate limit.
Here is an example of a valid configuration file:
POSTGRES_USER=gitguesser
POSTGRES_PASSWORD=gitguesser
POSTGRES_PORT=5432
POSTGRES_DB=gitguesser_db
Install pre-commit
:
pip install pre-commit
Install the git hook scripts:
pre-commit install
Run on all files manually:
pre-commit run --all-files