A small, opinionated chess server focused on clean games, clear rules, and fast connections.
based.mobi is a real-time multiplayer chess server focused on simple, fast matchmaking and a clean playing experience. Games are managed entirely in memory on the server, and the UI is a lightweight static client served alongside the engine.
The backend is written in Rust using axum and tokio. Each connected browser opens a WebSocket
to the server. All game actions – joining rooms, making moves, offering draws, requesting rematches – are sent as small
JSON messages over this WebSocket.
Here's what happens when you make a move: you click a square on the board, the browser packages your move in a JSON message
(like {"type": "make_move", "move": "e2e4"}), and sends it over the WebSocket. The server receives this,
validates the move using the shakmaty library to ensure it's legal, updates the game state, and then
broadcasts the updated game state to all participants (both players and spectators). Your browser receives this update and
re-renders the board, move history, and timers. This entire cycle typically completes in milliseconds.
The server keeps track of active games, rooms, players, spectators and timers. When anything changes in a game, the server pushes an updated game state to all participants (both players and spectators) so that every client stays in sync. If you refresh the page or briefly lose connection, the WebSocket reconnects and you can request the current game state to catch up.
There is deliberately no persistent database on the server: when a game ends and the process eventually restarts, all in-memory state is discarded. Long-term storage happens only in your browser (see below).
All chess rules are enforced on the server using the Rust shakmaty library:
The draw rules work as follows: players can claim a draw after threefold repetition (the same position occurs three times) or after fifty moves without a pawn move or capture. However, if the game reaches seventy-five moves without a pawn move or capture, the draw is automatic – no claim needed. This matches FIDE regulations where the seventy-five-move rule is mandatory and cannot be waived.
For analysis and bot play, the frontend runs a WebAssembly build of Stockfish entirely in your browser
(compiled from the stockfish.wasm project by Niklas Fiekas). This is the same Stockfish engine used in
professional chess software, but compiled to run in your browser using WebAssembly. The engine runs at full strength locally
on your device – no moves or analysis are sent to any external engine server.
When you enable analysis or play against the bot, the server only ever sees the same game messages as in a normal game (moves, draw offers, rematch requests). Engine evaluations, best-move suggestions and annotations never leave your browser. The bot difficulty is controlled by Stockfish's skill level parameter (1-20, default 10), which adjusts the engine's playing strength. For move analysis, the engine searches to a depth of 8-12 plies depending on the context, balancing accuracy with speed so analysis completes quickly.
The server maintains the authoritative clocks for each game. Time is tracked in seconds and updated from a background task that runs every 2 seconds. After every move, the server subtracts the elapsed time for the player who just moved and then applies the increment (the bonus time added after each move).
The presets are designed to mirror common FIDE-style controls:
The browser displays a smooth countdown based on the last time update from the server, but the server is always the source of truth for flagging and game results. If your clock hits zero on the server, you lose on time – unless your opponent has insufficient mating material, in which case the game is drawn even if you flagged.
Important: The only place games live long-term is your browser. The server never stores them on disk or in any database. All game state exists only in memory while players are connected. If the server process restarts, all active games vanish from the server, but your local history remains untouched in your browser.
Completed games are saved in your browser's localStorage (up to 100 games, with the oldest automatically
removed when the limit is reached). Each entry stores:
The replay page loads these saved games locally, reconstructs the positions, and can run fresh Stockfish analysis in your browser so you can step through the game with engine guidance. You can download the PGN for any saved game to import into chess databases or analysis software.
Because games are only persisted client-side, clearing your browser storage or using a different device will clear or isolate your history. The server never writes your moves to disk. This design choice prioritizes privacy and simplicity: there's no central archive of your games, no user accounts, no email addresses, and no personal data stored anywhere.
This site aims to follow the FIDE Laws of Chess for move legality, game results and timing:
However, this is intentionally not a full tournament management system. It does not include:
The goal is faithful rules and timings compatible with FIDE-standard play, not full tournament infrastructure. The 60+30 classical preset in particular is suitable for standard games under current FIDE regulations (as of 2026, FIDE accepts 45+30 or longer as standard time controls).
No tracking, no analytics, no cookies. The core game client contains no third-party analytics scripts, no tracking pixels, and no cookies beyond what your browser uses for localStorage. The only data transmitted to the server is the WebSocket messages necessary for gameplay (moves, draw offers, room joins, etc.).
The server does not log moves, store game history, or maintain any persistent records of players. There are no user accounts, so there's no email addresses, passwords, or personal information collected. Your identity is ephemeral – tied only to your current WebSocket session. When you disconnect, that identity is forgotten.
All communication happens over HTTPS (or HTTP in local development). The WebSocket connection is encrypted in transit, and the server uses security headers (COOP/COEP) required for SharedArrayBuffer support, which also helps prevent certain cross-origin attacks.
The basic game (playing, spectating, matchmaking) works in any modern browser. However, some features require additional browser capabilities:
SharedArrayBuffer support, which is only available in secure contexts (HTTPS)
and requires specific security headers from the server. Chrome, Firefox, and Edge support this on HTTPS. Safari 15.2+ supports
it with the proper headers (COOP: same-origin, COEP: require-corp).If your browser doesn't support SharedArrayBuffer (or you're on HTTP instead of HTTPS), you can still play games, spectate, and use all core features – you just won't be able to enable analysis or play against the bot. The site will detect this and disable those options automatically.
The site is designed to be readable and usable on small mobile devices (including small iPhones). The layout adapts to screen size, and touch interactions work for moving pieces and using controls.
This server is intentionally minimal and opinionated. Some features you might expect from other chess sites are deliberately absent:
The philosophy is simple: fast matchmaking, clean rules, minimal friction. If you want ratings, chat, or persistent accounts, there are other sites for that. This one is for playing chess.
The server is a single Rust binary that serves static assets from the /static directory and exposes one WebSocket
endpoint at /ws. It is intended to run behind a simple reverse proxy on a single host, with no external
dependencies other than the OS and a TCP listener. There's no database, no Redis, no message queue – just the binary and
the static files.
All third-party JavaScript (chess.js for move validation on the client, Stockfish for analysis) is self-hosted. This ensures reliability (no dependency on external CDNs), privacy (no requests to third-party domains), and compatibility with the COEP: require-corp header needed for SharedArrayBuffer support.
The server is designed for single-region deployment. If you're far from the server, you'll experience higher latency in move transmission, but the game will still function correctly. For global low-latency play, you'd need multiple regional deployments, which is beyond the scope of this minimal setup.
All communication between your browser and the server happens over HTTPS (or HTTP in local development) and a single WebSocket connection. There is no third-party analytics or tracking embedded in the core game client.
Is my data stored on your servers?
No. Games only exist in server memory while players are connected. When a game ends, it's gone from the server. The only
long-term storage is in your browser's localStorage, which you control.
Can I export my games?
Yes. Every saved game includes a PGN that you can download from the replay page. You can import these into chess databases,
analysis software, or share them with others.
Is the engine cheating for my opponent?
No. The Stockfish engine only runs in your own browser. Your opponent never sees your analysis, and you never see theirs.
The server only sees normal game messages (moves, draw offers, etc.) – it has no access to engine evaluations or suggestions.
What happens if I refresh during a game?
Your WebSocket reconnects automatically. You can request the current game state to catch up, and the game continues normally.
However, if you're playing against the bot, the bot's WebSocket connection is separate, so the bot will continue playing
even if you refresh.
Why no accounts or ratings?
To keep things simple and private. No accounts means no passwords to manage, no email addresses to protect, and no risk of
data breaches. No ratings means no pressure to grind for points – just play chess.
Can I play on mobile?
Yes. The site is designed to work on mobile devices, including small iPhones. Touch interactions work for moving pieces,
and the layout adapts to screen size. However, bot play and analysis require SharedArrayBuffer support, which may not be
available on all mobile browsers or HTTP connections.