Skip to content

A simple dockerized configurable self-hostable quiz app that uses a libSQL database from Turso.

License

Notifications You must be signed in to change notification settings

frectonz/quizzy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quizzy

A simple dockerized configurable self-hostable quiz app that uses a libSQL database from Turso.

One thing that makes quizzy special is that quizzes are imported not through inputs and forms but from one JSON file that has all the questions. Here's an example of a quiz with 3 questions taken from the book 1984.

[
  {
    "question": "What is the uniform of the party?",
    "options": [
      { "text": "Green Overalls", "isAnswer": false },
      { "text": "Blue Overall", "isAnswer": true },
      { "text": "Yellow Overalls", "isAnswer": false }
    ]
  },
  {
    "question": "What is the language of Oceania?",
    "options": [
      { "text": "Newspeak", "isAnswer": true },
      { "text": "Oldspeak", "isAnswer": false },
      { "text": "OceaniaSpeak", "isAnswer": false }
    ]
  },
  {
    "question": "What happens to people accused of Thoughtcrime?",
    "options": [
      { "text": "KILLED", "isAnswer": false },
      { "text": "BOILED", "isAnswer": false },
      { "text": "VAPORIZED", "isAnswer": true }
    ]
  }
]

Sample quizzes for 1984 and The Hitchhiker's Guide to the Galaxy are available.

Demo

quizzy.mp4

Technologies

Local Installation

Install prebuilt binaries via shell script (MacOS and Linux)

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/frectonz/quizzy/releases/download/0.1.2/quizzy-installer.sh | sh

Install prebuilt binaries via powershell script (Windows)

powershell -c "irm https://github.com/frectonz/quizzy/releases/download/0.1.2/quizzy-installer.ps1 | iex"

Updating

quizzy-update

Nix

nix shell github:frectonz/quizzy

Using the docker image

The docker image is available on the Docker Hub. You can use this docker image to deploy quizzy on any platform you want.

docker pull frectonz/quizzy
docker run -p 1414:1414 \
      -e ADDRESS="0.0.0.0:1414" \
      -e URL="libsql://<name>.turso.io" \
      -e AUTH_TOKEN="<token>" \
      frectonz/quizzy

Environment variables

  • ADDRESS - the address to bind to, example 0.0.0.0:1414
  • URL - libSQL server address from Turso, example libsql://my-quiz.turso.io
  • AUTH_TOKEN - libSQL authentication token from Turso, must support read and write actions.

About

A simple dockerized configurable self-hostable quiz app that uses a libSQL database from Turso.

Topics

Resources

License

Stars

Watchers

Forks

Languages