- Games record start and move times, spectator peak and distinct count - Games end as completed, left (the leaver loses), timeout (5 minutes offline on your turn while the opponent is online) or inactive (both offline for 30 minutes); everyone gets on_game_end - Connection info carries offlineSince for the countdown - A new game is rejected while the user has one in progress - Live games are written to Valkey after every change and restored on startup; finished games are saved to Postgres with public ids, and saves that fail are kept and retried every 30 seconds - Clients get a trimmed game without spectator ids - Startup waits for Valkey, restores games, then accepts connections; migrations are retried while Postgres is unreachable |
||
|---|---|---|
| .. | ||
| src | ||
| tests/history | ||
| .eslintignore | ||
| .eslintrc | ||
| .gitignore | ||
| .prettierrc | ||
| jest.config.js | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| yarn.lock | ||
Mancala Core
This module contains common functionalities for the Mancala project.
Build
yarn build
Usage
Link this local package to other packages (backend, frontend, mobile).
yarn link
In the target package folder, run:
cd ../backend
yarn link @mancala/core
NPM Publish Instructions
Run the following commands:
npm login
npm publish --access public