Fishbowl is a turn-based word game typically played in-person. This application adapts the in-person gameplay so that we can instead play remotely while we are quarantined at home! It also is meant to serve as a fairly in-depth example of an application built with React and especially with hapi pal.
This repository is comprised of three packages:
- fishbowl-api - a REST and realtime backend built with hapijs and hapi pal.
- fishbowl-frontend - a reactive SPA frontend built with React.
- fishbowl-deployment - a unified deployment of fishbowl-api and fishbowl-frontend, leveraging each as a hapi plugin.
There is a lot more information in the readmes of the various packages, but if you're just looking to give this a try, here is how you get started.
node -v # v12.x.x
npm install
npx lerna bootstrap
API_URL=/api npx lerna run build --scope fishbowl-frontend
npx lerna run start --stream --scope fishbowl-deployment
Utilizing the Dockerfile in the root of this project is the recommended solution for deploying Fishbowl in a consistent, reproducible way. This Dockerfile will build the frontend and ensure the frontend and backend are configured correctly together within fishbowl-deployment. You will need to provide a volume if you would like persistent storage for SQLite. The volume needs to be able to read and write to /date/app.db
within the container. The container will expose the application on port 3000.
docker build -t fishbowl .
touch fishbowl.db # Persistent storage
docker run --volume $PWD/fishbowl.db:/app/data.db -p 3000:3000 fishbowl
At the time of writing the rules and gameplay are not written down in this repository, but this video is a good explainer.
The only requisites aside from the Fishbowl web application are:
- that each player have their own screen, and
- that the players congregate over video chat so that they can interact with each other visually (and with sound!).