Build authenticated tic-tac-toe from scratch.
This is one continuous build, not a tour of unrelated examples. Begin with redweb init and finish with two signed-in players sharing a server-authoritative board over one Redweb listener.
Uses published Redweb 0.16.5 and redweb-client 0.3.1. Install the pinned packages with npm ci; no local links are required. Requires Node 22.13+ and npm; the final browser tests use installed Google Chrome.
Download the complete project Setup, optional configuration, and limits
Initialize and model the game
Create the project with redweb init, then write the authoritative board, seats, turns, and wins.
Define player commands
Give join, move, and resume validated names before opening a socket.
Connect players to rules
Turn authenticated connections into concise, server-owned game decisions.
Render the live board
Bind typed handlers directly to server TSX and attach the /match route.
Add accounts and startup
Protect the page and socket, then compose everything with defineApp.
Run and prove the game
Create players, play in two browsers, reconnect, and run the real test gates.
Looking for Hello World, the shared counter, chat, or combined HTTP/WebSocket setup? Those remain independent, complete walkthroughs in the built-in template docs.
This site is a static Redweb export. The downloadable game runs as its own Node server; it is not a live game hosted inside these docs.