I wanted a place to play chess online without ads, trackers, or accounts - and I wanted to be able to drop in my own chess AI. So I built the board and the platform myself.
Features
- Play against a friend in real time - game state syncs instantly via Firebase Realtime Database
- Play against an AI opponent (js-chess-engine under the hood)
- Drag-and-drop piece movement
- Board-only mode for casual play or analysis
Key decisions
- Firebase over raw WebSockets — real-time sync and auth came bundled without managing connection state or writing a game server; for a two-player board game the latency requirements are met by Realtime Database without custom infrastructure
- Delegated move validation to js-chess-engine — correctly validating chess moves (pins, en passant, castling, check detection) is roughly 2000 lines of fiddly edge cases; the library is tested and correct; the board UI shouldn’t duplicate that logic
- React DnD over native HTML5 drag-and-drop — cross-browser touch support and clean mid-drag cancellation; the native API has inconsistent behaviour across browsers and no good model for rejecting a drop
Future directions
- Login system and win/loss history
- Stronger engine (Stockfish via WASM)
Built with
- TanStack Start
- React DnD
- Firebase - Realtime Database and Auth
- tailwindcss
- Deployed on Vercel