- 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 |
||
|---|---|---|
| .. | ||
| .vscode | ||
| nginx | ||
| src | ||
| .babelrc | ||
| .gitignore | ||
| .parcelrc | ||
| Dockerfile | ||
| package.json | ||
| README.md | ||
| vercel.json | ||
| yarn.lock | ||
Mancala Frontend
The web user interface for the Mancala project, written in React.
Getting Started
Install Packages
yarn install
Start in Development Mode
yarn dev
Development Dependencies
This package links the local packages @mancala/core and mancala.js. Build them first with yarn build:packages in the repo root.
Login
Every visitor has a Keycloak session (see apps/keycloak): the first visit logs in as a new guest without any
form, and the account menu on the home page lets guests log in or sign up. Run Keycloak locally with
docker compose up keycloak in apps/; the dev server must run on port 1234, which the mancala-web client allows.
| Build variable | Default |
|---|---|
SERVER_ADDRESS |
http://localhost:5005 |
WS_SERVER_ADDRESS |
ws://localhost:5005 |
KEYCLOAK_URL |
http://localhost:8080 |
Docker Build
From the repo root:
docker build -f apps/frontend/Dockerfile --build-arg SERVER_ADDRESS=http://localhost:5000 --build-arg WS_SERVER_ADDRESS=ws://localhost:5000 --build-arg KEYCLOAK_URL=http://localhost:8080 -t mancala-frontend .