# lexi-typing **Repository Path**: jasonlong10/lexi-typing ## Basic Information - **Project Name**: lexi-typing - **Description**: LexiTyping 是一个通过键盘打字来记忆英语单词的学习工具。将枯燥的背单词和机械的打字练习合二为一,让用户在敲击键盘的过程中自然地记住英语词汇。 背单词太枯燥,打字太无聊。为什么不合二为一?LexiTyping 让你在练习键盘打字的同时记住英语单词。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: https://www.longcode.top/lexi-typing/ - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-02 - **Last Updated**: 2026-04-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LexiTyping > 每次击键,都在进步。Type to Learn, Learn to Type. 体验网址:[https://www.longcode.top/lexi-typing/](https://www.longcode.top/lexi-typing/) [English](#english) | [中文](#中文) --- ## English **LexiTyping** is a free, open-source web app that combines typing practice with English vocabulary learning. Type words to memorize them, backed by the SM-2 spaced repetition algorithm. ### Features - **19 built-in wordbooks** (30,000+ words): CET-4, CET-6, GRE, IELTS, TOEFL, SAT, GMAT, BEC, TOEIC, graduate school, high school, business, programmer vocabulary, IT words, Linux commands, phrases, and sentences - **Word root explorer** — browse 367 roots/prefixes/suffixes with 1060 related words, separate from regular wordbooks - **SM-2 spaced repetition** — automatically schedules review based on your accuracy - **Multiple practice modes** — standard, random order, listen-and-type (dictation), speed race, wrong-word drill, daily challenge - **Favorites** — star words during practice and review them later - **Gamification** — XP, levels, streaks, 12 unlockable achievements - **Keyboard heatmap** — visualize your accuracy per key - **Learning dashboard** — charts and stats powered by Recharts - **Pronunciation** — American/British via Youdao API, falls back to browser TTS offline - **Dark/Light theme** - **CSV import** — bring your own word lists - **PWA** — installable, works offline - **Cloud sync** (optional, requires Supabase) — cross-device sync, leaderboard, daily challenge rankings - **Accessibility** — aria-labels, keyboard navigation, skip-to-content, aria-live regions ### Tech Stack | Technology | Purpose | | --------------------- | ------------------------------------ | | React 19 + TypeScript | Frontend framework | | Vite 8 | Build tool | | Tailwind CSS 4 | Styling | | Zustand | State management | | Dexie.js | IndexedDB persistence (no 5MB limit) | | Supabase | Optional backend (Auth + PostgreSQL) | | Framer Motion | Animations | | Recharts | Learning statistics charts | ### Quick Start ```bash git clone https://github.com/YOUR_USERNAME/lexityping.git cd lexityping npm install npm run dev ``` Open [http://localhost:5173](http://localhost:5173) in your browser. ### Cloud Features (Optional) LexiTyping works fully offline by default. To enable login, cloud sync, and leaderboard: 1. Create a project at [supabase.com](https://supabase.com) 2. Run `supabase/migrations/001_init.sql` in the SQL Editor 3. Copy `.env.example` to `.env.local` and fill in your Supabase keys 4. (Optional) Enable GitHub OAuth in Supabase Authentication settings ### Deployment See [docs/deploy.md](docs/deploy.md) for full deployment instructions: - **Self-hosted Nginx** — recommended for China mainland users - **Cloudflare Pages** — free, global CDN - **Vercel** — free, but not accessible in China mainland ### Adding a New Wordbook 1. Create a JSON file in `src/data/dictionaries/` 2. Follow the existing format: `{ id, name, category, description, words: [{ word, meaning, phonetic }] }` 3. Register it in `src/data/wordbooks.ts` ### Contributing Contributions are welcome! Please: 1. Fork this repository 2. Create a feature branch (`git checkout -b feature/amazing-feature`) 3. Commit your changes (`git commit -m 'Add amazing feature'`) 4. Push to the branch (`git push origin feature/amazing-feature`) 5. Open a Pull Request ### License [MIT](LICENSE) --- ## 中文 **LexiTyping** 是一个免费开源的打字背单词工具。通过键盘打字来记忆英语词汇,内置 SM-2 间隔重复算法,让你在练习打字的同时高效记单词。 ### 功能亮点 - **19 个内置词库**(30,000+ 词):中考、高考 3500、四六级、考研、雅思、托福、GRE、SAT、GMAT、BEC、托业、商务英语、程序员英语、IT 词汇、Linux 命令、常用词组、经典好句 - **词根专栏** — 367 个词根词缀 + 1060 个相关单词,独立浏览学习,不混入普通词库 - **SM-2 间隔重复** — 根据打字准确率自动安排复习 - **多种练习模式** — 标准、随机、听音打字、速度赛、错词地狱、每日挑战 - **收藏功能** — 打字时收藏单词,集中复习 - **游戏化** — 经验值、等级、连续天数、12 个成就 - **键盘热力图** — 可视化每个按键的准确率 - **学习仪表盘** — 图表统计学习进度 - **真人发音** — 美式/英式(有道词典 API),离线降级为浏览器 TTS - **深色/浅色主题** - **CSV 导入** — 自定义词库 - **PWA** — 可安装到桌面,离线可用 - **云同步**(可选,需配置 Supabase)— 跨设备同步、排行榜、每日挑战排名 - **无障碍** — aria-label、键盘导航、skip-to-content ### 快速开始 ```bash git clone https://github.com/YOUR_USERNAME/lexityping.git cd lexityping npm install npm run dev ``` 浏览器打开 [http://localhost:5173](http://localhost:5173) ### 项目结构 ``` lexi-typing/ ├── public/ # 静态资源(favicon、PWA manifest、Service Worker) ├── src/ │ ├── components/ # React 组件(15 个,含 WordRootExplorer) │ ├── data/ # 词库数据(19 个词库 JSON + 词根数据 + 元数据) │ ├── db/ # IndexedDB 封装 │ ├── hooks/ # 自定义 Hooks(打字引擎、发音、计时器、云同步) │ ├── lib/ # Supabase 客户端 │ ├── stores/ # Zustand 状态管理 │ ├── types/ # TypeScript 类型定义 │ └── utils/ # 工具函数(SM-2 算法、统计、CSV 解析) ├── supabase/ # 数据库迁移脚本 ├── docs/ # 部署文档 ├── .env.example # 环境变量模板 └── vercel.json # Vercel 部署配置 ``` ### 路线图 | 版本 | 状态 | 内容 | | ---- | --- | ----------------------------------------- | | v1.0 | 已完成 | 核心打字 + 8 词库 + SM-2 + 游戏化 | | v1.5 | 已完成 | IndexedDB + PWA + 数据导出/导入 + 速度赛 + 错词地狱 | | v2.0 | 当前 | Supabase Auth + 云同步 + 排行榜 + 每日挑战 + 无障碍 v1 | | v2.5 | 计划中 | AI 智能推词 + 发音评分 + 打字录像回放 + 好友 PK | | v3.0 | 计划中 | 多语言支持(待TTS方案成熟) + 社区 + 词库市场 + 班级系统 | ### 许可证 [MIT](LICENSE)