A simple web app to play Werewolves (AKA Mafia) online. Live now at wurwolves.com.
This repository can be used to build docker containers for the frontend and backend, using nix, or can be run using nix directly.
- Configure
.env
then either:
- Run
nix run .#frontend
in one window - ...and
nix run .#backend
in another
or:
nix run
to build docker images and store them in the local registrydocker compose up
The default instructions above will launch a local service using caddy with self-signed certificates. You could use caddy directly by altering the Caddyfile to let caddy negotiate HTTPS on your behalf. However, I've set this up to use traefik instead so that this app can be hosted next to others.
To deploy, use the ".env.traefik" template to wire these containers into traefik for SSL certificates. You will need to also have a traefik instance running and connected to the docker network called "traefik". HTTPS negotiation is out of scope for this repository - set it up in traefik.
For local development, install nix and direnv then use::
direnv allow
npm i
npm run dev
The backend runs a FastAPI REST interface in python. The frontend is React.js served by its built-in server.