Skip to content

An exciting game where you select a GitHub repository and guess the location of a random file.

License

Notifications You must be signed in to change notification settings

gitguesser/gitguesser

Repository files navigation

gitguesser

Testing pre-commit.ci status Generate docs Deploy pages

FastAPI React Docker Postgres GitHub Actions

Screenshots

During game

During game Screenshot

Game start

Game start Screenshot

Search repositories

Search repositories Screenshot

Game results

Game results Screenshot

Docs

The API docs are available here.

UML diagrams

Docker services

Docker services UML

Game

Game UML

Search repositories

Search repositories UML

Running

You need to have Docker installed. Then simply run the following command:

docker compose up --build

Testing

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.

Configuration

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

Using pre-commit for style checking (auto formatting)

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

About

An exciting game where you select a GitHub repository and guess the location of a random file.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •