Skip to main content

Documentation Index

Fetch the complete documentation index at: https://openturn.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

The fastest way to see openturn is to run the example apps out of the monorepo. This page sets up your machine and points you at the games that already exist.

Prerequisites

  • Bun 1.3 or newer. Openturn uses Bun as the package manager and for every script. Install from bun.sh.
  • Node 20 or newer is not required, but some IDEs still expect it for TypeScript language services.
  • Chromium-based browser for the React apps. The examples use Vite, which outputs modern ESM.

Clone and install

git clone https://github.com/openturn-io/openturn.git
cd openturn/openturn
bun install
Confirm the install:
bun run typecheck:packages
bun test

Scaffold a new project

If you only want to author your own game (rather than read the example monorepo), use the CLI to scaffold a fresh project anywhere on disk:
bun add -g @openturn/cli
openturn create my-game --template local
cd my-game
bun install
bun run dev
openturn create writes a small project. Three of the files are openturn-specific:
  • app/game.ts — your authored game (state, moves, views).
  • app/page.tsx — the React entry point.
  • app/openturn.ts — metadata read by the CLI and the deploy pipeline.
The remaining package.json and tsconfig.json are conventional TypeScript plumbing. The local template gives you a single-device React app; --template multiplayer gives you the cloud-ready variant. See your first game for what these files mean.

Run the example apps

All examples live under examples/* in the monorepo. Each has one or more of: a game worker package, an app browser package, and a cli Bun package.
ExampleFlavorCommand
Splendor (featured)gamekitbun --filter @openturn/example-splendor-app dev
Tic-tac-toe (local React)gamekitbun --filter @openturn/example-tic-tac-toe-app dev --port 3000
Tic-tac-toe (CLI)gamekitbun --filter @openturn/example-tic-tac-toe-cli demo
Tic-tac-toe (hosted multiplayer shell)gamekitbun --filter @openturn/example-tic-tac-toe-multiplayer-app dev
Tic-tac-toe replay viewergamekitbun --filter @openturn/example-tic-tac-toe-replay-viewer-app dev --port 3001
Tic-tac-toe corecorebun --filter @openturn/example-tic-tac-toe-core-game typecheck
Paper-scissors-rockgamekitbun --filter @openturn/example-paper-scissors-rock-app dev --port 3003
Pig-dice CLIgamekitbun --filter @openturn/example-pig-dice-cli demo
Battleshipgamekitbun --filter @openturn/example-battleship-app dev --port 3006
Open the logged URL in your browser and play. If you are learning openturn, start with the tic-tac-toe React app — it’s the smallest end-to-end gamekit example and the one every tutorial walks through. To see what a fully realized game looks like (hosted multiplayer, hidden state, lobby with bots, polished tabletop UI), open additional tabs against the Splendor app for 2–4 player play.