A Progressive Web App that reads imported EPUB files of Chinese text and displays adaptive pinyin annotations above words. Inspired by DU Chinese, optimized for intermediate-to-advanced readers (HSK 5+) who want help only on rare words and proper nouns.
- EPUB import — drag-and-drop, fully client-side.
- Adaptive pinyin — an HSK-level threshold decides which words get pinyin. Compounds and out-of-vocabulary words the HSK list only covers per-character (一个, 不吃, …) inherit a level from their characters, so common words stay clean at a high threshold while genuinely rare words keep their pinyin.
- Per-word overrides — mark words "I know this" / "Learning"; persists across all books. "Learning" always shows pinyin; "known" always hides it.
- Dictionary on tap — CC-CEDICT-backed definitions with browser TTS.
- Vocabulary & lookup history — tapping a word logs it to a passive history (never forces pinyin); review it on the Vocabulary page, promote to learning/known, and export everything to Anki-compatible TSV.
- Bookmarks — save and jump back to any page.
- Offline-first PWA — installable to phone home screen; reads work offline after first load.
- Local library — multiple books stored in IndexedDB, progress tracked per book.
bun install
bun run devThere is no bundled fallback dictionary — the app loads the real, verified
CC-CEDICT from /dict.json, so build it once before reading:
bun run build:dictIf dict.json is missing the app surfaces a clear "run bun run build:dict"
error rather than degrading silently.
Open http://localhost:5173, drop an EPUB, and read.
This downloads CC-CEDICT (CC-BY-SA) plus the HSK 3.0 word and character lists
(elkmovie/hsk30) automatically if they're missing, caches them under
data/sources/, and writes public/dict.json, which the PWA loads on first
launch. The character list drives the per-character HSK derivation for common
compounds. To use your own copies instead, place them at
data/sources/cedict_ts.u8, data/sources/hsk-wordlist.txt, and
data/sources/hsk-charlist.txt (or per-band files in data/sources/hsk/).
bun run test # vitest run (use `bun run`, not `bun test`, since `bun test` invokes bun's native runner)
bun run typecheck # tsc -b --noEmit
bun run lint # eslint
bun run e2e # playwright e2e smokeSee docs/design.md.
Briefly: React + Vite + TypeScript PWA. EPUBs parsed client-side. Chinese text
segmented via Intl.Segmenter (native browser API). Dictionary + HSK metadata
loaded from /dict.json. All state in IndexedDB via Dexie. A Repository
adapter pattern keeps cloud sync as a drop-in future addition.