type-review: Adaptive, Server‑Free Typing Trainer Open‑Sourced by Li Xiaolai
type-review is a privacy‑first, browser‑only typing trainer that adaptively unlocks letters, offers benchmark testing, detailed per‑key statistics, optional visual keyboards and sound packs, and is built with SolidJS, TypeScript and a strict three‑layer architecture.
Introduction
type-review is a single‑page typing practice application open‑sourced by Li Xiaolai. It runs entirely in the browser, requires no registration, no server backend, and collects no telemetry, making it a privacy‑first tool.
Core Features
Adaptive letter unlocking based on per‑key statistics, confidence calculation, and over‑sampling of the weakest keys; new letters are unlocked only after the current set meets mastery criteria.
Benchmark mode that tests typing speed on real text, measuring word count and elapsed time to evaluate WPM, accuracy and stability.
Per‑key / per‑finger statistics panel showing WPM trends, finger‑speed breakdown, error breakdown, daily streaks and milestone tracking.
Optional visual keyboard that colors keys by mastery, shows real‑time press state, and supports Mac/Windows layouts as well as QWERTY, Colemak and Dvorak keymaps.
Optional keyboard sound packs (mechvibe synthesis, soft packs, real‑sampled typewriter sounds) generated locally with Web Audio.
Shareable result cards via a link #/share/<payload> that display read‑only results without exposing full history.
Technical Architecture
The lightweight stack consists of SolidJS, strict TypeScript, Vite, Vitest + jsdom, Biome and pnpm, with only solid‑js as a runtime dependency.
Architecture is split into three layers:
UI – built with SolidJS.
IO – DOM, IndexedDB and Web Audio adapters.
Engine – pure TypeScript.
Purity rules enforced by src/layer-purity.test.ts prevent the engine from importing IO or UI and IO from importing UI.
Key Design for Low Latency
keydown
→ InputHandler.handleKeyDown
→ Session.input
→ requestAnimationFrame
→ setSnapshot
→ UI partial updateKey events directly modify the Session state in a plain TypeScript class, avoiding reactive tracking of every 60 Hz keyboard event and ensuring a short, deterministic path.
Privacy and Security
No analytics, telemetry, cookies or third‑party fonts.
User data stored in IndexedDB with JSON export and one‑click clear.
Strict security headers: CSP default‑src 'none', frame‑ancestors 'none', COOP/COEP, disabled permissions (camera, microphone, geolocation, payment, USB), X‑Frame‑Options DENY, X‑Content‑Type‑Options nosniff, Referrer‑Policy no‑referrer.
Quick Start
Run locally:
git clone https://github.com/xiaolai/type-review.git
cd type-review
pnpm install
pnpm devAccess the app at http://localhost:5173.
Docker image:
docker run --rm -it -p 80:80 registry.cn-beijing.aliyuncs.com/opencontainers/type-review:latestSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
AI Open-Source Efficiency Guide
With years of experience in cloud computing and DevOps, we daily recommend top open-source projects, use tools to boost coding efficiency, and apply AI to transform your programming workflow.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
