All Project Templates

Chess

by Yard
Chess preview
Gallery image 0
Gallery image 1
Gallery image 2

Online chess you start with a link. Pick a time control, send the match URL to a friend, and play in real time with clocks, draw offers, and rematches. Every player keeps a win, loss, and draw record. It ships with sign-in, a database, realtime matches, and a polished landing page, all running on Yard.

Features

  • Play by link: a match is a URL. The first person to open it takes the other seat, and anyone after that watches
  • Time controls: Blitz (5 min), Rapid (10 min + 5 sec), Classical (30 min), or Casual with no clock
  • Complete rules: castling, en passant, promotion, check, checkmate, stalemate, threefold repetition, the fifty-move rule, and insufficient material, including on time
  • Clocks that keep running: a flag falls on time even if both players have closed their laptops
  • Drag or click to move: legal moves are highlighted, along with the last move and a king in check
  • Move list and captures: every move in standard notation, with each side's captured pieces beside the board
  • Draws, resigns, and rematches: offer a draw, resign, or start a rematch with colors swapped
  • Player record: wins, losses, draws, and recent games with who you played and how it ended
  • Reconnects to your seat: close the tab and come back to the same side of the board
  • Play both sides: take the other seat yourself to try it out. Games against yourself never count toward your record
  • Original piece artwork drawn for this project

Built on Yard

  • Yard Auth: players sign in with their Yard account. Chess never handles a password, and after the first consent screen, sign-in is silent
  • Hosted service: the entire backend is a single fetch handler with no server to run or scale
  • Objects: each match is its own realtime room that holds the position, clocks, and connections. It sleeps while nobody is moving and wakes up when a clock runs out
  • Database: players and finished games live in the project's own SQLite database, and schema migrations apply themselves on deploy
  • Pricing: a single free tier, so signing in is the only gate. Add a paid tier to start charging

Technical details

  • Plain HTML, CSS, and JavaScript: no framework, no build step, no dependencies
  • The server is the only chess engine. It sends each player their legal moves and validates every move, so the client knows no rules and cannot cheat
  • Records are worked out from finished games rather than counted, so a reconnect or retry can never make them drift
  • Positions are stored as FEN, which keeps each match's storage tiny

Requirements

A Pro plan, for the hosted service, database, objects, and custom landing page. Yard Auth is included.