Skip to content

Repository files navigation

PawnLens

Live demo License: GPL v3 React Vite Engine Backend PRs welcome

▶ Try it live — pawnlens.pages.dev

Understand your chess mistakes — for free, with no limits and no login.
A full game-review and training suite that runs 100% in the browser: your CPU does the analysis, your data never leaves your machine.


Why PawnLens?

Most sites gate real game review behind a paywall (chess.com allows ~1 free review a day). PawnLens gives you unlimited reviews and a complete training loop, built entirely on free and open data:

  • No server — Stockfish 18 runs as WebAssembly in your browser. Zero hosting cost, infinite scale.
  • No login, no tracking — history lives in your browser's local storage.
  • Not a chess.com clone — the focus is learning from your own mistakes, not playing or social features.

Table of contents

Features

Game review

  • Pull recent games by chess.com / lichess username, or paste / upload a PGN.
  • Stockfish 18 analysis of every move — eval bar, whole-game eval graph, best-move arrows.
  • Own move classification: Sharp · Best · Solid · Fine · Loose · Slip · Drop (not chess.com's copyrighted system).
  • Plain-English coach explaining why a move was wrong — hanging pieces, forks, pins, skewers, allowed mates, bad trades — plus the better plan. No LLM, no cost.
  • Accuracy (harmonic mean, so blunders actually hurt) + a rough performance rating.
  • Turning points, per-phase accuracy, the engine's top lines (deeper on demand), and how strong players handled the position (lichess Masters).
  • Result-aware: shows resignation / time / checkmate / draw.

Learn actively (right in the review)

  • Guess-the-move — play your move before the answer is revealed and get graded.
  • Show threats — highlights hanging pieces + an arrow for the opponent's threat.
  • Try the better move — play the engine's move and continue the line vs the engine.
  • Free explore — an analysis board with live eval and take-backs.
  • Auto-narration, move sounds, board & piece themes, light/dark, keyboard nav.

Train

  • One ranked queue mixing your own blunders and an 11,000-puzzle tactics bank (themes + ratings), scheduled with FSRS spaced repetition and an adjusting puzzle rating.
  • Filter by theme (endgames, mates, middlegame) or drill a specific weakness in one click.

Openings & endgames

  • Openings trainer — learn any of 3,807 named openings; you play your side, the bot answers.
  • Endgame trainer — convert the classic technique wins against the engine.

Weakness analyzer

  • Cross-game report that names your recurring mistakes, shows the exact moves as evidence, and jumps you straight into that position. Accuracy trend, mistake-by-move heatmap, worst openings.

How it works

flowchart LR
    A[chess.com / lichess API<br/>or pasted PGN] --> B[Analyze in browser<br/>Stockfish 18 WASM]
    B --> C[Classify moves +<br/>rule-based coach]
    C --> D[Review UI<br/>board, eval, arrows, coach]
    C --> E[Local history<br/>localStorage]
    E --> F[Weakness analyzer]
    E --> G[Train: your mistakes<br/>+ tactics bank, FSRS]
    F -->|drill this| G
    style B fill:#26c2a3,color:#14210f
    style C fill:#7dc96b,color:#14210f
Loading

Everything after the fetch happens on the client — no backend is involved.

Quick start

git clone https://github.com/Chaganti-Reddy/pawnlens.git
cd pawnlens
npm install
npm run dev       # http://localhost:5173
npm run build     # production build → dist/
npm run preview   # serve the build locally
npm run lint      # oxlint

Deploy the static dist/ folder to any host. Drop-in configs are included for Cloudflare (wrangler.jsonc, Workers static assets) and Netlify (netlify.toml) — see docs/DEPLOY.md. The only requirement is an SPA fallback (serve index.html for unknown routes).

First analysis downloads the ~7 MB Stockfish engine once, then it's cached.

The learning loop

flowchart TD
    R[Review a game] --> M[See your mistakes explained]
    M --> W[Weakness analyzer spots patterns]
    W --> T[Train: drill those mistakes + tactics]
    T --> O[Openings & endgames practice]
    O --> R
Loading

Tech stack

Area Choice
UI React 19 + Vite 8
Engine Stockfish 18 (lite, single-thread) via WebAssembly Web Worker
Chess logic chess.js
Board react-chessboard v5
Routing react-router
i18n react-i18next (all copy in src/locales)
Icons react-icons (no emoji in the UI)
Scheduling FSRS-4.5 (custom implementation)
Storage Browser localStorage

Project structure

public/engine/         Stockfish 18 .js + .wasm (GPLv3)
src/engine/            UCI Web Worker wrapper (serialized analyze queue)
src/lib/               analysis, classification, coach, openings/tactics data,
                       FSRS scheduler, puzzle rating, threats, sound, theme
src/components/        board, eval bar/graph, coach card, stats, compare, settings…
src/pages/             Home, Review, Train, Endgames, OpeningsDrill, Weakness
src/data/              openings.json, puzzles.json, endgames.json, cburnett pieces
src/locales/           en.json (i18n source of truth)

See docs/ARCHITECTURE.md for a deeper tour.

Data & attribution

All bundled data is free/open (see NOTICE.md):

  • Stockfish.js — GPLv3 (chess.com / nmrugg).
  • Openings book — lichess-org/chess-openings, CC0 (3,807 lines).
  • Tactics puzzles — subset of the Lichess puzzle database, CC0.
  • cburnett piece set — Colin M.L. Burnett, GPLv2+ (via lichess).

PawnLens is not affiliated with chess.com or lichess; it only uses their public, documented APIs and open data.

Screenshots

PawnLens ships light and dark themes (plus board & piece sets).

Light Dark
Game review
coach, eval, arrows, engine lines, turning points
Review – light Review – dark
Train
your mistakes + 11k tactics, FSRS, puzzle rating
Train – light Train – dark
Weakness analyzer
recurring patterns with evidence + one-click drilling
Weaknesses – light Weaknesses – dark

Contributing

Contributions welcome — see CONTRIBUTING.md and the code of conduct. Ground rule: keep it free and client-side (no paid APIs, no servers). Run npm run lint and npm run build before opening a PR.

License

GPL-3.0 — because PawnLens bundles the GPLv3 Stockfish engine, the combined work is GPLv3.

About

Free, unlimited chess game review in your browser — Stockfish 18 (WASM), 11k tactics, FSRS trainer, openings & endgames, weakness analyzer.

Topics

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages