A 1v1 chess practice server with a 3D board. Think of it like a practice server in a game, next to the big sites: warm up before your rated games on chess.com or Lichess, try out an opening on a friend, or just play a chill game. It's free, with no subscriptions, no ads and no engine reviews. When a game ends you get a PGN to paste into chess.com or Lichess.
- Play: chobryce.github.io/Outpost/play takes you to the live server. It runs on a GitHub Codespace, so it's only up while that codespace is running.
- Preview: chobryce.github.io/Outpost is an always-on copy without the server: the practice board and the board editor work, sign-in doesn't.
- Sign in with Google or Lichess. Chess.com sign-in is built but stays off until Chess.com approves the app; in the meantime you can import your chess.com profile from Settings.
- 3D board, built in code. Turned Staunton-style pieces and a sculpted knight, with wood, granite, marble, cloud, ocean, ice, slate and metal surfaces generated on the fly. Five scenes, including a board floating over a sea of clouds.
- A real 2D board too. Press V in a game, or pick 2D as your default view. It uses flat piece icons like the big sites, with five sets to choose from in Settings, Board: Outpost (the default), Modern, Sticker, Pixel and Letters. They're all original artwork and take their colours from your board.
- Twelve board themes, all editable. Change every surface, piece material, colour and gloss, and the scene. You can upload your own images for the light squares, the dark squares, or the whole board. Pieces take colours, materials and textures, but not uploaded images. Themes can be shared as copy-paste codes, and the panels re-colour themselves to match your board.
- Playing: quick pairing pools with a rating window that widens as you wait, invite links, direct challenges and friends. Rated or casual games with clocks from 15 seconds to 3 hours a side and increments up to 60 seconds, or no clock at all. You get premoves, drag-and-drop or click-to-move, promotion choice or auto-queen, draw offers, abort, resign, rematch, a claim-win button if your opponent leaves, move-history stepping, arrows and highlights drawn with the right mouse button, and synthesised board sounds.
- Ratings use Glicko-2, like Lichess. New players pick their level instead of everyone starting at 1500, and the first few games move a rating a lot (see Ratings).
- Chat is on by default, with quick phrases, per-game mute, a default-off setting and blocking.
- Profiles work like chess.com's: picture, username, display name, country flag, location, bio, ratings per speed, win/loss/draw record, recent games with PGN copy, friends, rank and title badges, and verified Lichess and Chess.com badges.
- Player search by any part of a name, forgiving small typos.
- Ranks, titles and moderation: Owner, Admin, Helper, Media and Cool badges; GM, IM, FM and CM titles; warnings, mutes, bans with public reasons, appeals, reports and an Inbox (see Ranks, titles and moderation).
- A glass homepage. The Outpost wordmark is cut-crystal 3D glass that bends and splits the board behind it, tilts toward your pointer and ripples when you click it.
- Sign-in uses OAuth 2.0 with PKCE, so Outpost never sees a password. Optional site-level 2FA uses TOTP with replay protection and single-use backup codes.
- Imports: your chess.com public profile (picture, username, country, name, location) and your Lichess preferences (premove, auto-queen, coordinates, animation, board theme and piece set).
- Practice board: play both sides offline. It also powers the serverless preview.
npm install
npm run dev # http://localhost:3000, with developer sign-in enabledRequires Node 22.13+, because the database is the built-in node:sqlite. There are no native modules and no build step.
npm run dev turns on a developer sign-in, which lets you sign in with any name. To play yourself, open a second browser profile or a private window. Lichess sign-in also works on localhost straight away: Lichess needs no app registration.
npm test # end-to-end and unit tests (boots the real server, plays games over WebSockets)
npm start # production modeCopy .env.example to .env. On the live Outpost server, Google and Lichess are on and Chess.com is waiting for approval. A button for a sign-in that isn't set up says "Not available yet" and explains what to use instead.
| Provider | What you do |
|---|---|
| Lichess | Nothing. Any client id works and PKCE is required. Sign-in also reads your preferences, then revokes the token immediately. |
In Google Cloud Console, go to APIs & Services → Credentials → Create OAuth client ID (Web application). Add <PUBLIC_URL>/auth/google/callback as an authorized redirect URI, then set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET. The scopes are openid email profile, which don't need Google's verification review. |
|
| Chess.com | Chess.com runs OAuth 2.0 / OpenID Connect, but only for approved apps. Apply through the Chess.com Developer Community club, register <PUBLIC_URL>/auth/chesscom/callback, then set CHESSCOM_CLIENT_ID (plus CHESSCOM_CLIENT_SECRET if they issue one). Endpoints come from their discovery document. Until you're approved, the button explains this, and people can sign in another way and import their chess.com profile by username. |
Asking for another site's password is the shape of a phishing page. It would also break their terms, and neither site has a password-login API you could use anyway. With OAuth the player signs in on Google, Lichess or Chess.com itself, so whatever 2FA they have there applies automatically, and Outpost never sees a password. Outpost's own 2FA (Settings → Security) adds a second check on top.
| From | Imported | Not available |
|---|---|---|
| chess.com public API | Profile picture, username, country, name, location. Ratings seed your starting rating, but only after a verified Chess.com sign-in. | Board theme and premove setting. Chess.com doesn't expose private settings, so players pick a matching preset (Classic Green and Classic Brown match the usual boards). The public API also caches data for up to 12 hours. |
Lichess OAuth (preference:read) |
Premove, auto-queen, coordinates, animation speed, confirm-resign, legal-move dots, last-move highlight, 2D or 3D board theme and 3D piece set (mapped to the closest preset), 2D piece set (pixel, letter and shapes map to Outpost's Pixel, Letters and Modern), username, flag and ratings | Lichess has no profile pictures |
The logo opens the homepage: what Outpost is (a practice server next to chess.com and Lichess), sign-in for visitors, and for players a map of the site: play, the practice board, players, friends, profile, inbox, settings and, for staff, the Staff page.
The big wordmark over the board is real 3D glass, drawn in the board scene: cut-crystal letters that bend the board and sky behind them and split light into rainbow fringes. They tilt toward your pointer with a highlight that follows it, and a click sends a ripple through the glass (no tilt or ripple with reduced motion on). The letters come from the site's own font, Archivo, at the wordmark's weight and width; scripts/build-wordmark-font.py regenerates them. The HTML heading stays underneath, see-through, for screen readers, and shows normally if WebGL can't draw the glass.
Shared links show a preview card (title, description and public/og.jpg, a picture of the homepage). The server fills in its own address so the card works anywhere; node scripts/og-image.mjs re-renders the picture.
Outpost uses Glicko-2, the system Lichess uses (chess.com uses its predecessor, Glicko). Each speed has its own rating, and each rating also tracks how sure it is:
- New players pick their level on their first visit (Complete newbie 100, Beginner 400, Casual beginner 800, Intermediate 1200, Advanced 1600, Expert 2000), so they don't all start at 1500. Players who sign in with Lichess or import chess.com start from their real rating instead.
- Opponents matter. Beating a stronger player gains more and losing to a weaker one costs more: a settled 1500 gains about 19 for beating a 1900 but only 2 for beating an 1100.
- Early games swing hard. A new rating moves roughly 175, 115, 90, 70… points per game, so someone who picked the wrong level is close to their real one within about five games, in either direction.
- Settled ratings move little, about 10 points a game. A ? next to a rating means it isn't settled yet.
- Time away loosens a rating: after months off, the next few games count more again. Coming back doesn't add a ? by itself; only a bad upset in your first three games back does (losing to someone you should beat), and that ? clears after three games.
- Casual games (Rated off) never change a rating.
Like chess.com: right-click a square to highlight it, or right-drag from one square to another to draw an arrow (knight moves get an L-shaped arrow). Plain marks are red squares and orange arrows; hold Shift for green, Ctrl or Cmd for blue, Alt for yellow. Drawing the same mark again removes it. A left-click on the board, or any move, clears everything. Marks are only on your screen; your opponent doesn't see them.
Players in the top bar searches every account by any part of the name, ignoring capitals: "bryce" lists BryceCho, bryceho_fan and xXbryceXx. Close spellings count too, so a missing, extra or wrong letter still finds the player. Exact names come first, then names that start with the search, then the rest.
Set OWNER_EMAILS=you@gmail.com in .env and restart. Whoever signs in with that Google account (or has it linked under Settings, Accounts) gets the red Owner badge and every tool below. The startup log prints who the owner is. As a backup, OWNER_USER_IDS=<id> makes an account the owner however it signs in; npm run users lists every account's id.
-
The owner's account is locked. Nobody else, other owners included, can edit, warn, mute or ban it. Staff who open it see a "Protected account" note and a button to message the owner instead. The owner can't ban or mute themselves either, so the server can never lock them out.
-
Ranks show as badges left of a name, everywhere names appear: Owner (from
.envonly), Admin, Helper, Media and Cool. The owner hands them out from a player's profile (Moderate) or their own (Edit rank, title and rating). The Owner badge always shows first. -
Titles: GM, IM, FM and CM need a best rating of 2500, 2400, 2300 and 2200 when awarded, and are kept after that. Anything else of up to six letters or digits (GOAT…) is a custom title. GM is shining gold, IM silver, FM bronze, CM steel.
-
The owner can also set any player's ratings, games played (under 10 games a rating shows "?"), overall won / lost / drawn record and join date, including their own.
-
Moderation powers: helpers can warn and mute for up to a day; admins can also ban and unban; the owner can do everything. Nobody can act on someone of equal or higher rank, or on themselves. Every action is logged on the player's record.
-
Unbans and unmutes happen straight from the player's profile, with a preset reason (appeal accepted, issued by mistake, not enough evidence, enough time served, second chance, other) and a note. The player gets an automated message in their Inbox with both. Helpers can't unban on their own: they send a request that an admin or the owner approves, unless an admin or the owner has ticked "Unban players without asking" for them.
-
Reports: anyone can report anyone, from a profile or during a game (the game and its chat are attached). A report goes to staff who outrank the reported player, so reports about helpers go to admins, and reports about admins or the owner go only to the owner. Staff close it with an outcome and the reporter hears back in their Inbox. Staff see reports, appeals and unban requests on the Staff page, with live counts in the top bar.
-
Bans need a reason category (fair play, abuse, spam, impersonation, legal, other) and a length: a preset or an exact end date. The profile stays up with "Banned: " and a formal notice; the written staff note is only shown to staff and the player. A ban signs the player out everywhere and counts as a resignation in a game in progress.
-
Appeals: a muted player appeals from the chat box or their menu. A banned player who tries to sign in lands on an appeal page instead (a two-hour pass, no session). Staff see appeals under Appeals (helpers get mute appeals, admins and the owner get both) and can accept, deny, or push to automated support. The automated review is a fixed rulebook, not an AI: permanent punishments go back to a person; appeals without a real explanation are denied; repeat offenders (two earlier bans or mutes in 90 days, or three warnings) are denied; if half the time is served it's lifted; otherwise the time left is halved. After any decision except "lifted", the next appeal has to wait 24 hours.
This is how the live server runs today:
-
Codespace: open the repo in a GitHub Codespace (the
.devcontainerinstalls everything and writesPUBLIC_URLandTRUST_PROXY=1into.env). Add the Google keys andOWNER_EMAILSto.envand runnpm start. Codespaces makes forwarded ports private every time a codespace starts, anddevcontainer.jsoncan't change that, so the server makes port 3000 Public itself once it's listening (using the GitHub CLI, which the dev container installs) and checks that it stuck. The startup log says whether it worked; setCODESPACE_PUBLIC_PORT=0in.envto keep it private. -
Google sign-in: add
<PUBLIC_URL>/auth/google/callbackas an authorized redirect URI on the Google OAuth client. -
A short link:
play/index.htmlforwardschobryce.github.io/Outpost/play/to the codespace's address. Update it if the codespace changes. -
The preview: GitHub Pages serves the repo root, which holds a static build of the client. Rebuild it after client changes:
PREVIEW_URL=https://chobryce.github.io/Outpost FULL_SITE_URL=https://chobryce.github.io/Outpost/play/ npm run build:preview cp -r dist/preview/. .
A codespace stops after a stretch with no typing, mouse or terminal activity (30 minutes by default; up to 4 hours under GitHub Settings, Codespaces, Default idle timeout), and the site goes down with it. Games in progress are saved and resume when it's started again. For a server that's always on, use a host from Deploy.
Any Node host with a persistent disk and WebSockets works: a VPS, Fly.io, Railway or Render. The SQLite file and uploads live in DATA_DIR.
docker build -t outpost .
docker run -d -p 3000:3000 -v outpost-data:/data --env-file .env outpostPut it behind HTTPS and set PUBLIC_URL=https://your.domain and TRUST_PROXY=1. A Caddy config is two lines:
your.domain {
reverse_proxy localhost:3000
}
It's a single process holding the game state in memory, which is plenty for a community practice server. Unfinished games survive a restart: they're resumed from the database, and downtime isn't charged to either clock. Scaling past one process would need a shared pub/sub (Redis) for the hub.
- Sessions are random 256-bit tokens. Only their SHA-256 is stored. Cookies are
HttpOnlyandSameSite=Lax, plusSecureon https. A fresh token is issued at every sign-in. - CSRF and cross-site WebSocket hijacking are blocked by Origin checks on every state-changing request and on the WebSocket upgrade.
- The OAuth
stateis bound to the browser with a short-lived cookie, and PKCE (S256) is used everywhere. ID tokens are checked for issuer, audience, expiry and nonce. They arrive directly from the token endpoint over TLS, which OIDC accepts in place of a signature check. - TOTP refuses an already-used time step. Backup codes are hashed and single-use. Enabling 2FA signs out every other session.
- Uploads are checked by magic bytes (PNG, JPEG or WebP only), size-capped, renamed, and served with
nosniffand a sandboxing CSP. Remote avatars are fetched server-side from an allow-list of two hosts, with redirects refused, so there's no SSRF surface. - A strict CSP covers the app:
script-src 'self'plus the hash of the one inline import map. All user text is rendered withtextContent. - Rate limits cover sign-in, 2FA, uploads, imports, chat (per game) and WebSocket messages.
server/ Express + ws. index.js (CSP, static, boot), api.js (REST), games.js (hub: pools,
challenges, clocks, chat), rating.js (Glicko-2), auth/ (sessions, OAuth, TOTP),
moderation.js, appeals.js, reports.js, notices.js (Inbox), staff.js, db.js
public/js/shared/ Code shared by server and browser: game rules and clocks, PGN, themes, constants
public/js/three/ 3D engine: stage (camera, picking, drag-and-drop, arrows, animation), pieces,
board, flat-pieces (2D icon sets), wordmark (glass title), textures, sky shaders
public/js/ui/ App views: home, lobby, game, profile, players, friends, inbox, staff, settings
test/ node:test suites
scripts/ preview build, link-preview image, wordmark font, screenshots, `npm run users`
play/, js/, css/, GitHub Pages: the /play link and the static preview build
index.html
- Engine analysis and game review. Use the PGN with chess.com's Analysis or lichess.org/paste.
- Spectator chat (anyone can watch a game from its link, but chat is only for the two players), tournaments and puzzles.
- Takebacks.
- Chess.com sign-in on the live server, until Chess.com approves the app.