Source
Games
All our games are open source:
Site
The site itself is open source and a monorepo (web frontend, REST API, game server, admin panel, docs).
See the architecture guide to understand how everything works together, and the developer docs for the full guide.
Adding a game
The site loads games in a completely modular fashion — a game is just an engine and a viewer, published as npm packages and hot-loaded without a restart. See the full guide: Adding a game to Boardgamers.
Engine
The game engine's entry point is JavaScript and exports a handful of functions the platform calls (setup, move, state, …). Full reference: Game engine API.
Viewer
The viewer's entry point is JavaScript. It sets a global variable with a launch function that takes a CSS selector and returns an EventEmitter; the viewer mounts itself inside (or replaces) that element and communicates through the EventEmitter. Extra script / css dependencies are loaded via <script> and <link> tags. Full reference: Viewer API.
There's also a minimal worked example: the Tic Tac Toe game.