Fredrik Johansson 1e812be8a2
All checks were successful
Docker / build-and-push (push) Successful in 36s
Add favicon
Bold "T" mark in the shared mono-green style used by sibling projects (wisp, fullhouse).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-19 19:50:43 +02:00
2026-07-19 19:50:43 +02:00
2026-07-19 19:50:43 +02:00

typo

A typing test built from your own code. Every snippet is real, shipped code pulled from real repos — flit, wisp, keep, stash, delve-term, goonk itself — not generic pangrams or Lorem Ipsum.

No backend, no build step — plain HTML/CSS/JS served statically, with snippets baked into snippets.json.

Stats

  • WPM — (correct characters / 5) / minutes elapsed, the standard typing-test formula. Timing starts on the first keystroke, not page load.
  • Accuracy — correct keystrokes / total keystrokes, including ones you backspaced over. Tracked at the keydown level (comparing the pressed key against the exact next expected character), not just diffed after the fact.
  • Keys/sec — total keystrokes / elapsed seconds, live.

Mistakes are highlighted in place rather than blocking progress — you can backspace to fix them or keep going, same as most real typing tests. Tabs in the original source are shown as two spaces so you never need to press Tab.

Adding snippets

Edit snippets.json — each entry is { repo, file, lang, code }. Keep snippets short (10-20 lines), self-contained, and free of exotic Unicode in comments (em dashes etc. are typeable but annoying) if you want them pleasant to type.

Local development

Run with npm:

npm install
npm run dev

This serves the app on http://localhost:8850.

Any static file server still works, e.g.:

python3 -m http.server 8850

Status

Built and verified via simulated typing sessions (not just static review): focus handling, live character-by-character highlighting, newline handling for multi-line snippets, and the WPM/accuracy/KPS math all confirmed against both artificially fast and realistic human-speed input. Caught and fixed two real bugs in the process — a focus-stealing issue caused by a stray tabindex on the code display, and a modal overlay that was invisibly covering the whole page and intercepting every click because its CSS unconditionally overrode the hidden attribute.

License

MIT.

Description
No description provided
Readme 54 KiB
Languages
CSS 44%
JavaScript 35.3%
HTML 20.1%
Dockerfile 0.6%