How I Built a Wordle for Chinese Idioms with 7,200+ Words, Pinyin & Audio (and achieved a 100 Lighthouse score)
Описание и применение
EasyIdiom – это бесплатная игра‑пазл, основанная на Wordle, но для китайских идиом. Проект использует Preact, pinyin-pro и динамическую клавиатуру, чтобы показывать правильность символов и произношения. Благодаря оптимизации кода и отложенной загрузке сторонних скриптов приложение получает 100/100 баллов Lighthouse и работает быстро на мобильных устройствах.
Задача
Adapting Wordle to Chinese idioms required handling non-alphabetic characters, pronunciation (pinyin), and providing meaningful feedback without spoiling the game.
Результат
EasyIdiom achieved a 100 Lighthouse score, runs offline on mobile, and provides a rich learning experience with pinyin and cultural hints.
Рабочий процесс
- 1. Build a lightweight frontend with Preact + Vite.
- 2. Use pinyin-pro to generate tones and handle polyphones.
- 3. Implement a virtual keyboard that highlights character correctness (green/amber/gray).
- 4. Add progressive clues: definition, pinyin of first character, mystery character location.
- 5. Optimize performance: replace heavy polyfills, split code with dynamic imports, defer third‑party trackers until first interaction.
- 6. Deploy on Vercel CDN for zero cold starts.
- 7. Test on mobile and desktop to confirm 100 Lighthouse score.
Доказательства
achieved a flawless 100/100 Core Web Vitals score on Mobile & Desktop.
We built an interactive virtual keyboard that aggregates pinyin initials and finals dynamically based on candidate idioms, highlighting…
By auditing JavaScript chunks… deferred third‑party trackers until first user interaction…
- Дата записи: 2026-09-11T04:15:31.970Z