Documentation
Add multiplayer to a web game with one room file — plain TypeScript, the stack you already use, and tests that prove it works. New here? Start with the introduction, or jump straight to the quickstart.
Getting started
- Introduction What irt.io is, and the one idea the whole thing is built on.
- Quickstart From zero to two tabs sharing a link in five minutes.
- Your first room Build a tiny shared-cursors room end to end — schema, room file, client.
Core concepts
- The mental model Rooms, ownership, and proving it works — in three sentences.
- State & schema The typed description of your shared state — field types, collections, defaults.
- Ownership & the ladder Who may write what — and how to move a write from the client to the server.
- RPCs Typed calls between client and server for anything that isn't a plain state write.
- Server authority & validation Validators, clamping, and the server tick loop — trust without a rewrite.
- Presence & lifecycle Joins, leaves, disconnects, and the connection states your UI should handle.
Guides
- Retrofit an existing game Add multiplayer to a single-player game without restructuring it.
- Co-op movement Client-owned positions with a light server guardrail — the 90% case.
- A card game with RPCs Server-owned deck, hidden hands, and moves as typed RPCs.
- Authoritative shooter Client inputs, a server tick loop, and prediction for competitive play.
Testing
- Simulated players Headless bots that drive your room and assert the resulting state.
- Testing in CI Run room tests on every push — fast, deterministic, no services.
Deploy & operate
- Deploying a room Ship your room file to production with one command.
- The dashboard Live rooms, moderation, usage, and billing at app.irt.io.
- Limits & pricing What's metered, the free tier, and the ceilings you should design against.
Reference
- CLI Every irtio command — init, dev, test, deploy, and friends.
- Client SDK joinRoom, the room handle, state, RPCs, presence, and status.
- Room file API defineRoom — lifecycle, validate, rpc, tick, and the context object.
- Error catalogue Every typed error the SDK can throw, what causes it, and how to recover.