I have been typing for twenty years and I still slow down on =>.
Not on words. Words are fine. It is {}, [], &&, ::, ?., !== — the keys my fingers only ever meet inside code, and never inside the paragraphs every typing trainer feeds you.
So I built the one I wanted: Typre. It only serves real code.
Free, no account needed, open source.
What it actually is
2,170 hand-picked snippets across 14 languages, in 15, 30 and 60 second runs.
Everything is real code you would plausibly write — a Go error check, a SQL join, a React hook, a Rust match. Nothing generated, nothing padded with filler to hit a character count.
const results = await Promise.all(
urls.map((url) => fetch(url).then((r) => r.json())),
)
That is a snippet. You type it exactly, brackets and all.
Four things I made sure to get right
No repeated snippets. Snippets come from a shuffle bag — you go through the entire pool before seeing any of them twice, and that survives a page reload. Most trainers pick at random, so you hit the same line three times in ten runs and start typing from memory instead of reading.
A separate pool per run length. A 15 second run gives you one short idiom, not the first three lines of something longer that you never get to finish. Each language has its own short, medium and long pools.
A drill of nothing but punctuation. {} [] <> | ~ ^ && => !== ?. ?? <=> and nothing else. This is the one I use most.
A shortcut trainer. 61 VS Code and Vim shortcuts, where you actually press the chord and it checks the modifiers. Vim sequences like dd, gg, :wq are handled as sequences, not chords.
Plus the usual: WPM, raw WPM, accuracy, consistency, the characters you mistype most, XP and levels, a daily streak, per-language leaderboards, real-time races against another person, and challenge links to beat someone's score.
Two technical decisions worth explaining
Every snippet ships in the bundle. All 2,170 of them. That is most of why the JavaScript is 269 KB gzipped rather than something smaller — and it is deliberate. It means the whole app works with no network at all. Install it, get on a plane, keep practising. A typing trainer that needs a round trip to give you the next line is a typing trainer that stutters.
Syntax highlighting is real TextMate grammars, loaded per language. Shiki, the engine VS Code uses. Naively imported it costs about 11 MB across 309 files. Using createHighlighterCore with the JavaScript regex engine instead of the Oniguruma WASM build, plus a dynamic import per language, brings first load down to roughly 69 KB — core, one grammar, one theme. You only pay for the languages you actually open.
What is not good about it
Fair is fair:
WPM is measured client-side. Anyone with DevTools can submit a fake score for their own account. The database rejects impossible values and RLS stops you writing as someone else, but there is no server-side verification of a run. Treat the leaderboard as a bit of fun, not a record book.
It needs a physical keyboard. On a phone there is nothing to practise on, so it says so rather than pretending.
It has 2 users. I am one of them.
What I would like from you
Sixty seconds and an honest opinion.
Not "nice project" — I mean the thing that annoyed you. The snippet that felt wrong for the language. The metric you did not understand. The moment you almost closed the tab.
There is a report button inside the app: it captures the last few console errors, the build hash, your viewport and browser, and mails it to me the second you hit send. One click, no form, no account.
typre.dev — and the source is MIT if you want to see how any of it works.
Built with React 19, TypeScript, Vite, Tailwind v4, Zustand, Shiki and Supabase.
This article was originally published by DEV Community and written by Typre.
Read original article on DEV Community