Skip to content
/ jeopardy Public

An application for creating and playing Jeopardy games

Notifications You must be signed in to change notification settings

lekha/jeopardy

Repository files navigation

Jeopardy

A Python application for creating and playing Jeopardy games.

Pre-requisites

  • Docker
  • Docker-compose
  • Google oauth credentials
  • Create RSA key pair

Create Google OAuth Credentials

  1. Log in at https://console.cloud.google.com.
  2. Create a new project.
  3. Configure the OAuth consent screen (hamburger menu: APIs & Services --> OAuth consent screen).
  4. Create new OAuth client ID credentials (hamburger menu: APIs & Services --> Credentials).
  5. Store the newly generated client ID and secret values in the .env file.

For local development, these settings work well:

Create RSA Key Pair

openssl genrsa -out jwt-rsa256 4096
openssl rsa -in jwt-rsa256 -pubout > jwt-rsa256.pub

Development

The application can be run locally via Docker:

git clone git@github.com:lekha/jeopardy
cd jeopardy
cp .env.example .env
# modify .env file to have appropriate secrets
docker network create secure-docker-socket
docker-compose build
docker-compose run --rm --workdir /database backend yoyo apply
docker-compose up ingress
curl http://127.0.0.1/health-check

Tests

Tests can be run locally via Docker:

docker-compose -f docker-compose.test.yml build
docker-compose -f docker-compose.test.yml up test_backend

Database

Run migrations

To apply:

docker-compose run --rm --workdir /database backend yoyo apply

To rollback:

docker-compose run --rm --workdir /database backend yoyo rollback

To see migration status:

docker-compose run --rm --workdir /database backend yoyo list

About

An application for creating and playing Jeopardy games

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published