Skip to content

Repository files navigation

Chess Solver logo

Chess Solver

A desktop chess analysis tool powered by Stockfish 18.
Set up any board position and get the top engine-recommended moves with evaluations, tactical motifs, and principal variations.

CI Latest release License: MIT

React 19 TypeScript Vite Electron Stockfish 18 WASM

Chess Solver analyzing the starting position with five candidate lines

Tactical motif detection flagging a back-rank checkmate

Tactical motifs flagged on every line — here a back-rank mate in 1

Settings menu with version and update check

Built-in update check against GitHub releases

Features

  • Drag-and-drop piece movement with click-to-place editing
  • Stockfish 18 analysis on all your CPU cores (multi-threaded NNUE build), streaming results so the best move so far appears within milliseconds of each move
  • 1 / 3 / 5 candidate lines (fewer lines = deeper search), with eval bars and depth info
  • Adjustable think time per position (1s / 3s / 5s / 10s)
  • Tactical motif detection (forks, pins, skewers, checks, etc.)
  • Opening name recognition
  • Checkmate, stalemate, and draw detection
  • Light/dark theme toggle
  • Board flip and turn switching
  • Update check against GitHub releases: automatic at startup (a banner appears when a new version is out) and on demand from Settings → Check for updates

Quick Start (Development)

npm install
npm run dev

Opens the app in your browser at http://localhost:5173.

The Stockfish engine (stockfish-18.js + its ~113 MB .wasm) comes from the stockfish npm package: the dev server serves it straight from node_modules, and npm run build copies it into dist/. Nothing engine-related is committed to the repo.

Testing

npm test        # unit tests (vitest)
npm run lint    # eslint
npm run build   # type-check + production build

The same three steps run in CI on every push and pull request.

Download

Prebuilt binaries are on the releases page:

  • Windows — Chess.Solver.Setup.<version>.exe, a per-user installer (no administrator rights required). Run it and the app is added to the Start Menu with a desktop shortcut (SmartScreen may warn on first run because the binary is unsigned; choose "More info → Run anyway").
  • macOS — Chess.Solver-<version>-universal.dmg, a universal (Intel + Apple Silicon) disk image. The app is not notarized, so on first launch right-click the app → Open → Open to get past Gatekeeper.

Release binaries are built by the release workflow on tagged commits.

Build Standalone Desktop App

npm install
npm run electron

Builds the production bundle and launches it as a standalone Electron desktop app.

Build Installers

npm run dist

Builds for the platform you run it on and outputs to release/:

  • On Windows: release/Chess Solver Setup <version>.exe — per-user NSIS installer — plus release/win-unpacked/, the unpacked app folder it installs from
  • On macOS: release/Chess Solver-<version>-universal.dmg — universal disk image for Intel and Apple Silicon

.dmg files can only be built on macOS; CI's release workflow uses a macOS runner for that.

First-time build (Windows)

The first npm run dist on a machine downloads the winCodeSign toolchain, which contains symbolic links into a macOS subfolder. Windows blocks symlink creation unless one of these is true:

  • The PowerShell session is running as Administrator, or
  • Developer Mode is enabled in Settings → Privacy & Security → For developers

Run the first build under one of those conditions. Subsequent builds reuse the cached toolchain and do not need elevated privileges.

Install as a Desktop App (Windows)

npm run dist produces the installer itself — run release/Chess Solver Setup <version>.exe.

It installs per user into %LOCALAPPDATA%\Programs\Chess Solver (no administrator rights, no UAC prompt), creates desktop and Start Menu shortcuts, and registers an entry under Settings -> Apps so it can be uninstalled normally. Re-running a newer installer upgrades in place.

To pin to the taskbar, right-click the desktop shortcut -> Pin to taskbar (Windows blocks programmatic taskbar pinning).

App Icon

The app icon is a chess-knight glyph on a purple #863bff rounded square. Windows embeds build/icon.ico; macOS converts build/icon.png (1024×1024) to .icns at package time. To regenerate both after editing the design, run:

powershell -ExecutionPolicy Bypass -File build/make-icon.ps1      # icon.ico (256..16)
powershell -ExecutionPolicy Bypass -File build/make-icon-png.ps1  # icon.png (1024)

Both scripts use GDI+ with no external dependencies. Rerun npm run dist afterwards to embed the result.

How to Use

  1. The board starts with the standard chess position. Stockfish begins analyzing automatically.
  2. Select a piece from the palette below the board, then click any square to place it.
  3. Use Remove to erase pieces from the board.
  4. Toggle White/Black to move to change the side to analyze.
  5. The analysis panel shows the top engine moves with evaluations, tactical motifs, and principal variations. Use the 1 / 3 / 5 selector to trade breadth for depth.
  6. Click any analysis line to play that move on the board.
  7. Hover over a line to highlight the move on the board.
  8. Use Reset to restore the starting position or Clear to empty the board.
  9. Open the ⚙ settings menu (top left) to change the engine's think time, see the app version, or check for updates. A dot on the gear and a banner under the header mean a new release is available.

Tech Stack

  • React 19 + TypeScript
  • Vite (dev server serves COOP/COEP headers so SharedArrayBuffer is available for the threaded Stockfish build)
  • Stockfish 18 WASM (multi-threaded NNUE build, pthread workers), from the stockfish npm package
  • chess.js for move validation
  • react-chessboard for the board UI
  • Electron for desktop runtime, electron-builder for packaging
  • Vitest for unit tests, GitHub Actions for CI

License

MIT

About

Desktop chess analysis app for Windows and macOS powered by Stockfish 18. Set up any position and get engine-recommended moves with evaluations, tactical motifs, and principal variations.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages