- Banner for the user's game in progress with a Continue button - Live games as cards with the real board, updated over WebSocket; the most watched finished games when nothing is live - The user's last 3 games, from their side of the board, with the result as they would say it - The lobby offers to continue the game in progress when a new one is refused - Spectators register once connected and identified, and again after a reconnect, so they are counted - The backend includes games that ended but are not saved yet in /game/:id and the lists |
||
|---|---|---|
| apps | ||
| config | ||
| docs/specs/game-history | ||
| packages | ||
| .dockerignore | ||
| package.json | ||
| README.md | ||
| TODO.md | ||
Mancala
Mancala is an open source application for playing mancala game online.
Development
The apps use the local packages/mancala.js and packages/core through link: dependencies, so build those first:
yarn build:packages # from the repo root
After changing a package, rebuild it (or run yarn dev in it to rebuild on change); the apps pick up the new dist.
Postgres (games and Keycloak), Valkey (live games and caches) and Keycloak run with Docker Compose. Create
apps/.env once, then start them:
cd apps
cat > .env <<EOF
POSTGRES_PASSWORD=postgres
KEYCLOAK_DB_PASSWORD=keycloak
KEYCLOAK_ADMIN_PASSWORD=admin
MANCALA_DB_PASSWORD=mancala
EOF
docker compose up -d --build postgres valkey keycloak
Postgres is on localhost:5433 and Valkey on localhost:6379; the backend's defaults point there. Then run
yarn dev in apps/backend (port 5005) and in apps/frontend (port 1234).
Docker images for the backend and frontend are built from the repo root:
docker build -f apps/backend/Dockerfile -t jhalitaksoy/mancala-backend .
docker build -f apps/frontend/Dockerfile -t jhalitaksoy/mancala-frontend .