Online multiplayer game showcasing the potential of Aleo's Zero Knowledge Proof platform.
Check the companion ZK Gaming Toolkit project here. Boloney connects to the toolkit to generate proofs for the game.
Before running the application, make sure to install the following software:
- Node.js version 18.16.0 LTS
- Yarn
- Docker
- kubectl
- Minikube - perform only the first step, titled "Installation"
- Skaffold
Before running Minikube, make sure Docker is running.
Run Minikube:
minikube start --cpus=max --memory=maxEnable ingress add-on:
minikube addons enable ingressOpen a new terminal tab and run:
sudo minikube tunnelThis will allow you to access the deployed applications at the address specified in the ingress configuration so keep it running in the background.
Return to the first terminal tab and run:
skaffold runThis will build the frontend and backend and deploy them on the minikube cluster.
⚠️ Occasionally you may see that the deployment fails on db connection because of how Nakama handles it, but most of the times it's actually successful since the backend pod will automatically restart and manage to connect to the db eventually. Whenever you get that kind of error, use the following commands to check the status of the backend pod, it may need to restart 2/3 times before it has aRunningstatus.
To check the status of your pods, run:
kubectl -n boloney-local get podsTo read the logs, run:
# pod_name can be retrieved from the output of the previous command
kubectl -n boloney-local logs <pod_name> -fIf the pods are running correctly, the services should be accessible at the following addresses:
- Frontend: http://frontend.localhost
- Nakama dashboard: http://backend.localhost
- Nakama API: http://api.localhost
⚠️ Currently Aleo Wallet does not work with the local kubernetes frontend deployment, so prefer running it in dev mode as illustrated in the following section.
⚠️ On MacOS you may need to configurednsmasqin order to access custom domain names. Consider following this guide and use.localhostinstead of.testand.box.
If you are developing the frontend application, you can run a development server:
cd frontend/
yarn devThe development application will be available at the URL printed in the command output.
In order to perform ZK actions, you need a local running instance of the ZK Gaming Toolkit. To run it, follow the instruction in the "Running locally" section. That's it!
If you wish to run the toolkit through minikube instead you need to keep in mind that it will try to perform requests to the programs deployed on the testnet. If this is your intention, open skaffold.yaml and update the following build arg:
VITE_TOOLKIT_URL: http://zk-gaming-tk.localhostThen, open deployment/local/workloads/config/backend.yaml and add the following env variable:
- name: TOOLKIT_BASE_URL
value: http://zk-gaming-tk.zk-gaming-tk-local.svc.cluster.local:5001Whenever adding a file (necessary for the applications' build) directly to frontend/ or backend/ root directories:
- Open the
Dockerfilerelated to that deployment - In the build phase, add
COPY frontend/<file_name>.<ext> ./frontend/<file_name>.<ext>(writebackendinstead offrontendfor the backend build)