
Squizzy is a real-time quiz game powered by Partner4IT.nl.
Table of contents:
On OS1 host
docker build -t squizzy https://gitlab.com/3pidev/squizzy.git#develop
docker image prune -y
mkdir -p .os1/squizzy/db
mkdir -p .os/squizzy/config
docker run -d -p 3900:3900 --restart=unless-stopped --name squizzy -v /home/os1/.os1/squizzy/db:/squizzy/backend/db -v /home/os1/.os1/squizzy/config:/squizzy/backend/config squizzy
#add squizzy.nl to list
sudo vi /usr/local/openresty/nginx/domains
sudo vi /usr/local/openresty/nginx/conf/rproxy/http/enabled/squizzy.conf
sudo systemctl restart openresty
#keep mac running: caffeinate
To get started with Squizzy, follow these instructions.
npm install (or yarn) in the root and /studio folders.npm install --global @sanity/cli nowsanity init inside the /studio folder. Follow the instructions to connect the studio up with a new project and dataset.sanity deploy to build and upload the studio to <your-studio-name>.sanity.studiosanity deploy again whenever you want to upload changes to the studio codesanity manage inside /studio).env.template file to .env in the root folder, it will be ignored by git..env file for the SQUIZZY_WRITE_TOKEN= variablenow secrets add squizzy_write_token $(pbpaste) to add it on Now.now secrets add squizzy_write_token <the-token> (put a space before now to avoid the token going into your bash history).projectId and dataset in ./sanityClientConfig.js with the one you connected the Studio to. Find them by looking in /studio/sanity.json or by running sanity debug in the /studio folder.now in the root folder to deploy the app, or go to your Now account and add the GitHub repository/studio folder, run sanity cors add https://your-name.now.sh --no-credentials or go to your project’s API settings on manage.sanity.ioremoteWebHost in /studio/quizConfig to match your new URL on Now.Squizzy comes with the following routes:
To make a new quiz, go to your studio, click “Quiz” and creat new. Give it a name, description, and some questions with multiple choice answers. The time limit will default to 20 seconds, but you can override it. You can also add an image.
To launch a new game, click Match (/studio/desk/match) and create new. The slug will be created automatically, and you can select from all your published quizes. When you have selected a quiz, publish the match.
Now you can click the Let’s play button in the studio’s top bar. Here you get an overview over all published and ongoing matches. Select the one you just published to initiate the host screen.
The host screen will show a QR code. Your players can join by scanning this QR code by going to where your Squizzy instance is deployed (https://the-app-name.now.sh), allow camera access, and scan the QR-code. If they aren't able to scan the QR code, they can go to https://the-app-name.now.sh/match/the-game-slug to join.
The host controls the game play from the “Let’s play” tool in the studio.
Go to sanity.io/docs to find more documentation on how to configure and customize Sanity Studio.
npm i -g @sanity/cli (or yarn global @sanity/cli)/studio folder, install dependencies with sanity installnpm run dev to start the local development serverYou'll find the content model for the quiz, match, and players inside of /studio/schemas.
You'll find the host play display inside of /studio/plugins/quiz-match.
You can tweak the Studio’s color scheme in /studio/squizzyTheme.css
Go to vuejs.org/docs for documentation on Vue.
npm i (or yarn) in the root foldernow dev to start the web app, the studio, and serverless functions concurrently (remember to install studio dependencies first)localhost:3000localhost:3000/api/<function-name>localhost:3333N.B! The web app will run on localhost:3000 (the dev server log will show a different port number, but now dev binds this random port to :3000).
* You can also use npx @sanity/cli <command> and npx now <command> if you prefer not to install global dependencies.
Content type
Image
Digest
sha256:c723e6124…
Size
386.8 MB
Last updated
about 4 years ago
docker pull 3pidev/squizzy