- This is the source code for Hanab Live, which is a website that allows people to play a cooperative card game online. It is similar to the card game Hanabi.
- This project has no affiliation with the card game Hanabi, Antoine Bauza (the creator of Hanabi), or any of the the real-life publishers of the game (of which there are many).
- The client is programmed in TypeScript. It is located in the
client
directory.- A lot of the code was originally taken from Keldon Jones' implementation of the game. (His site no longer exists.)
- The server is programmed in Go. It is located in the
server
subdirectory.- It uses a PostgreSQL database to store information about the users and games.
Find teammates to play games with at the Discord server. We also discuss code changes here.
Hanab Live is different from normal Hanabi in that it implements many special variants, in which the rules are changed to make the game more difficult.
See the features documentation.
See the installation documentation.
- Antoine Bauza created Hanabi, which was the inspiration for this website. If you enjoy playing online, then you should purchase a physical copy of the game, since he will presumably receive a portion of the proceeds.
- Keldon Jones was the original creator of the slick client-side user interface.
- Hyphen-ated coded many useful add-on features for Keldon's site that are integrated into Hanab Live.
- don't forget to edit
server/src/misc.go
and hardcode in a seed change tofunc setSeed
, this will ensure that you don't play duplicate games with the real hanab.live - first tried
docker-compose up -d
didnt work (prebuilt docker images are down??) not sure why - forgot to copy .env.example into .env which resulting in docker trying to create a directory there - bad. rmdir it and do the cp
- then
docker compose -f docker-development.yml up -d
, which brought up the postgres but not the server. the issue was that someone deleted .env.docker.exaample so the docker container couldn't connect to postgres - forgot to install/install_database_schema.sh
- still was having issue, there's something wrong with the docker build -- we no longer ship the frontend packages in the same way it seems.
- tried to run the server locally, so needed to set PORT in .env
- server index.html came up but javascript bundle wouldn't load. Something to do with main.$VERSION.min.js. Setting VERSION env variable before bash run.sh didn't help. Gave up and ln -s main.$VERSION.min.js main.min.js after every run.sh or packages/client/build_client.sh
- Came up on localhost
- Tried to serve up localhost via socat - didn't cross the WSL boundary.
- Tried to ngrok http 1313 -- worked but websocket check in client/src/websocketInit.ts failed the domain check. Setting partial DOMAIN=.ngrok-free.app didn't work either. have to start the ngrok server then copy the exact url
- now it works, but every time you take down the ngrok server you have to grab the new url, export DOMAIN=<>, rerun bash run.sh, then again ln -s main.*.min.js main.min.js in paublic/js/bundles
- also should fix the docker, why doesn't it build the client properly