Hanzi Training is a web application designed to help users learn and practice Chinese characters (Hanzi) through interactive exercises, quizzes, and handwriting recognition. The app provides a variety of training sets, dictionary lookup, and stroke order practice to support learners at all levels.
- Interactive Training: Practice writing Hanzi with real-time feedback and stroke order recognition.
- Dictionary Lookup: Search for Chinese characters and view their meanings, pronunciations, and example words.
- Custom Training Sets: Use built-in or custom sets to focus on specific characters or vocabulary.
- Quiz Mode: Test your knowledge with quizzes and track your progress.
- Handwriting Recognition: Draw characters on a canvas and get instant feedback.
- Settings: Customize your learning experience with various configuration options.
- Clone the repository:
git clone https://github.com/simonkoennecke/hanzi-trainer.git
cd hanzi-trainer- Install dependencies:
npm install
# or
yarn installStart the development server:
npm run dev
# or
yarn devOpen your browser and navigate to http://localhost:5173 (or the port shown in your terminal).
To build the app for production:
npm run build
# or
yarn buildThe output will be in the dist/ directory.
To check for linting errors:
npm run lint
# or
yarn lintsrc/- Main source codePage/- Application pages (Dictionary, Training, Settings, etc.)Geometry/- Geometry and handwriting recognition utilitiesContext/- React context providers and configurationassets/- Static assets
public/- Static files and data (character sets, manifest, etc.)audios/- Audio files are sourced from the audio-cmn project.
script/- Utility scripts for data processing to create the FUSE index
public/characters.json- List of Chinese characterspublic/default-training-sets.json- Predefined training setspublic/fuse-index.json- Search index for fast dictionary lookuppublic/audios/index.json- JSON array with available pinyin's
Contributions are welcome! Please open issues or submit pull requests for bug fixes, new features, or improvements.
This project is licensed under the MIT License.