How tnm/hsk works
HSK Cards is a browser-based vocabulary flashcard app. The user selects an HSK level, the app fetches its CSV deck and parses cards, then presents cards for flipping and navigation while tracking learned status. Shuffle, unlearned filtering, focus mode, keyboard/touch interaction, and dark mode are additional study capabilities. FlashcardApp owns deck loading and study state; browser local storage preserves preferences and progress. Some component internals and persistence details are outside the excerpts, so only documented or visible relationships are shown.
Main entry points: FlashcardApp.tsx Study orchestrator · App.tsx App entry · deckParsers.ts CSV parser · DeckImporter.tsx Deck importer
Components 13
Application
- App entry
src/App.tsx - Study orchestrator
src/components/FlashcardApp.tsx
Decks and parsing
- HSK 1–6 CSV
public/data - CSV parser
src/services/deckParsers.ts - Deck importer
src/components/DeckImporter.tsx
Study experience
- Study components
src/components - Flashcard view
src/components/Flashcard.tsx - Study controls
src/components/Controls.tsx - Deck selector
src/components/DeckSelector.tsx - Card navigation
src/components/Navigation.tsx - Focus controls
src/components/FocusControls.tsx
Browser state
- Local storage
Other components
- Learner
Connections 10
- Learner → App entry: studies with
README.md - App entry → Study orchestrator: renders
src/App.tsx - Study orchestrator → HSK 1–6 CSV: fetches
src/components/FlashcardApp.tsx - Study orchestrator → CSV parser: parses with
src/components/FlashcardApp.tsx - Deck importer → CSV parser: uses parser
src/components/DeckImporter.tsx - Study orchestrator → Study components: renders
src/components/FlashcardApp.tsx - Study orchestrator → Local storage: reads and writes
src/components/FlashcardApp.tsx - Study orchestrator → Flashcard view: renders
src/components/FlashcardApp.tsx - Study orchestrator → Deck selector: renders
src/components/FlashcardApp.tsx - Study orchestrator → Focus controls: renders
src/components/FlashcardApp.tsx