whatisgithub

What is boardgame.io?

boardgameio/boardgame.io — explained in plain English

Analysis updated 2026-06-24

12,329TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

A TypeScript framework for building turn-based multiplayer browser games, you write the rules and it automatically handles real-time sync, game state, lobbies, and AI opponents.

Mindmap

mindmap
  root((boardgame.io))
    What it does
      Turn-based game rules
      Real-time multiplayer sync
      Game phases
      AI opponents
    Tech Stack
      TypeScript
      JavaScript
      React
      Node.js
    Use Cases
      Online multiplayer games
      Card and board games
      Game prototyping
    Audience
      Game developers
      Hobbyist coders
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build an online multiplayer card or board game without writing any networking or websocket code.

USE CASE 2

Prototype a turn-based game and simulate moves using the built-in prototyping mode before building any UI.

USE CASE 3

Add an AI opponent to a browser game using the built-in random or MCTS AI strategies.

USE CASE 4

Create a game lobby with matchmaking so players can create and join game rooms from a browser.

What is it built with?

TypeScriptJavaScriptReactNode.jsnpm

How does it compare?

boardgameio/boardgame.ioinvertase/react-native-firebasecallstack/linaria
Stars12,32912,30212,301
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardmoderate
Complexity3/53/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Node.js, multiplayer features need a running server process separate from the browser client.

Use freely for any purpose including commercial use, as long as you keep the copyright notice.

So what is it?

boardgame.io is a TypeScript and JavaScript framework for building turn-based games that run in a browser with online multiplayer support. The idea is that you describe your game by writing functions that define what moves are valid and how the game state changes after each move. The framework then handles everything else: keeping all players in sync over the network, storing game state, and running an AI opponent if you want one. You do not write any networking code yourself. The framework manages real-time state synchronization across clients and a server automatically. This makes it practical to build something like chess, poker, or a custom card game without having to learn how websockets or databases work. Other features include game phases (sections of a game with different rules or turn orders), a built-in lobby for matchmaking, and a prototyping mode where you can simulate moves before you have built any visual interface. There is also a time-travel log that lets you step back through previous game states to review what happened. The framework is view-layer agnostic, meaning you can pair it with React, React Native, or plain JavaScript to draw the board and pieces. Installation is through npm, and the repository includes runnable examples to get you started quickly. The README is short and points to separate full documentation on the project website for deeper learning. The project is MIT-licensed and welcomes contributions.

Copy-paste prompts

Prompt 1
Show me how to build a multiplayer tic-tac-toe game with boardgame.io, define the moves, set up the server, and connect a React front end.
Prompt 2
How do I add game phases to a boardgame.io game so that the allowed moves and turn order change after the setup phase is complete?
Prompt 3
How do I set up the boardgame.io lobby so players can create rooms and join a game from a browser without writing custom matchmaking code?
Prompt 4
Show me how to add a bot AI player to my boardgame.io game using the built-in MCTS strategy.
Prompt 5
How do I use boardgame.io's time-travel log to replay and inspect previous game states for debugging?

Frequently asked questions

What is boardgame.io?

A TypeScript framework for building turn-based multiplayer browser games, you write the rules and it automatically handles real-time sync, game state, lobbies, and AI opponents.

What language is boardgame.io written in?

Mainly TypeScript. The stack also includes TypeScript, JavaScript, React.

What license does boardgame.io use?

Use freely for any purpose including commercial use, as long as you keep the copyright notice.

How hard is boardgame.io to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is boardgame.io for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.