← All projects
Personal project · 2026
Play Chess
A free chess web app: play eight bots powered by Stockfish, review your games, solve puzzles, learn openings and follow live tournaments, all running in the browser.
What it is
play-chess.in is a free chess site with no account, no ads and no server: everything runs in your browser. It has five sections:
- Play against eight bots, from Pip (~400) to Stockfish at full strength, with an optional chess clock, undo, rematches and games that survive a page refresh.
- Puzzles: about 10,000 tactics puzzles picked near your puzzle rating, with hints and solutions.
- Openings: all 3,865 named openings, searchable by name or ECO code, with a mode to practise lines from memory.
- Top players: FIDE’s top 100 in Standard, Rapid and Blitz, across open, women’s and junior lists.
- Tournaments: over-the-board events relayed live from Lichess Broadcasts, with standings and live engine evaluation.
How it’s built
- Engine in the browser: Stockfish runs as WebAssembly in a Web Worker and talks the UCI protocol. One instance plays as the bot at the chosen strength; a second analyses every position at depth 14 to build the game review.
- Rules: every move, including the engine’s, is validated with chess.js.
- Game review: each move is labelled by how much winning chance it gave away (Lichess’s accuracy formula), from brilliant to blunder, with an evaluation graph and the stronger move drawn on the board.
- Stack: Next.js, React and TypeScript, styled with Tailwind CSS, hosted on Vercel with security headers and a Content Security Policy.
- Built with Claude Code: I used Claude Code as my AI pair programmer, working through the build in small, tested steps.
The data side
The puzzles, openings and rankings are static JSON files built by scripts from public data:
- Puzzles and openings come from the Lichess open databases (CC0), filtered and bucketed by rating into ~10,000 puzzles and 3,865 openings.
- Top players come from FIDE’s official monthly rating lists. A scheduled GitHub Action downloads about 35 MB of zipped lists on the 2nd of every month, streams and validates them, and commits the new file only if it changed, which redeploys the site.
Quality
Every push runs linting, type checks, unit tests (Vitest) and end-to-end browser tests (Playwright) in GitHub Actions. The browser tests use a scripted fake engine and recorded Lichess responses, so they’re fast and predictable.