Open-source TypeScript toolkit for authoring digital tabletop and board-game implementations that run on Tableverse.
Tableverse Kit helps you model game state, validate and execute player commands, project hidden information per viewer, and generate local TypeScript and schema artifacts from your game definition.
You author your rules and hand Tableverse a single GameExecutor — that is the
whole entrypoint to your game's backend. Tableverse hosts the game and runs the
servers, transport, rooms, and persistence for you, so you never wire up an HTTP
or WebSocket server yourself. (The engine stays plain enough that you can drive
a GameExecutor from your own transport, but that is no longer a supported,
first-class path.)
@tableverse-kit/enginerules/runtime engine that compiles your game into aGameExecutorfor Tableverse@tableverse-kit/clilocal tooling package that installs thetvkcommand@tableverse-kit/clientfrontend client — renderer-agnosticTableverseClientat the root, optional React hooks at@tableverse-kit/client/react
bun add @tableverse-kit/engine
bun add -d @tableverse-kit/clior:
npm install @tableverse-kit/engine
npm install --save-dev @tableverse-kit/cli@tableverse-kit/engine provides the runtime building blocks for a board-game
rules package:
GameDefinitionBuildercreateGameExecutor(...)- command validation, execution, availability, and discovery
- stage/progression lifecycle orchestration
- deterministic RNG
- explicit state definitions with
defineGameState(...), plain state classes, andt - hidden-information projection with
getView(...) - visibility configuration through the state builder
- snapshots, replay helpers, and scenario testing
Example state definition:
import { defineGameState, t } from "@tableverse-kit/engine";
class CounterState {
value = 0;
increment() {
this.value += 1;
}
}
const Counter = defineGameState()
.model({
value: t.number(),
})
.stateClass(CounterState)
.build();@tableverse-kit/cli installs the tvk command.
tvk generate client-sdk
tvk validateThe CLI reads tableverse.config.ts from your project:
import { defineConfig } from "@tableverse-kit/engine/config";
import { createGame } from "./src/game";
export default defineConfig({
game: createGame(),
outDir: "./generated",
});examples/splendor/enginereference Splendor game built on the engineexamples/splendor/terminalterminal client for local gameplay and command discovery loopsexamples/splendor/serverandexamples/splendor/webfull-stack reference app for the Splendor example
bun install
bun run lint
bunx tsc -b
bun test --cwd packages/engine
bun test --cwd packages/cliAdditional useful checks:
bun test --cwd examples/splendor/engine
bun test --cwd examples/splendor/terminal