WASM & Browser Ext
Year 2026

chessio

Real-Time Stockfish Analysis Overlaid on Chess.com & Lichess

chessio / architecture-overview
chessio
The Problem & Security Risk

Why this system needed to exist

Analyzing games online typically requires uploading PGNs to external cloud servers, introducing latency and server dependency. Furthermore, most engine overlays offer only max-strength moves that look obviously non-human, or lag when calculating complex multi-piece endgames.

The Architectural Solution

How the solution was designed

chessio bundles Stockfish 18 Lite as a WebAssembly binary executing in a Chrome offscreen document via UCI commands. It implements time-capped search limits (searchTime ~0.7-2s) and adaptive depth clamping, along with an adjustable engine strength (Elo 250 to 3600) so suggested moves reflect human-like calculation levels.

Implemented Features & Capabilities

100% offline local WebAssembly execution with zero server dependencies or network overhead
Dynamic board scraping adapters for Chess.com and Lichess with automatic piece and orientation detection
Shadow DOM isolated HUD panel displaying evaluation graph, best moves, and search depth
Adjustable engine strength (Elo ~250 to 3600) with honest rank-1 move synthesis for realistic play
Time-capped search algorithm ensuring fast panel response even on low-end machines
Turn filter ("My moves only") to analyze exclusively during player active turn

Component Architecture

01Manifest V3 Architecture

Uses Chrome Service Worker for message routing and Chrome Offscreen API to host the WebAssembly worker.

02Stockfish 18 Lite WASM

Client-side compiled engine running UCI protocol commands directly within the browser thread pool.

03Shadow DOM Content Script

Isolated styling and event handling injected into the target page to prevent CSS collisions with host websites.

04DOM Scraper & FEN Generator

Robust selectors extracting current piece coordinates and board orientation to construct valid FEN strings.

Technologies & Protocols

Core Engine
Stockfish 18 LiteWebAssembly (WASM)UCI Protocol
Extension Platform
Chrome Extensions Manifest V3Offscreen DocumentsService Workers
Frontend / UI
Vanilla JavaScript (ES6)Shadow DOMCSS3 Transitions
Integrations
Chess.com DOM AdapterLichess DOM Adapter