How motiandalou/typeflow works
TypeFlow is a browser-based English typing trainer. Users choose a built-in passage or paste their own text on the home page, then practice in a routed typing session; the session displays character-level feedback and timing/statistics, and completed runs are recorded for the history page. The app also offers word lookup and pronunciation during practice. Text and session history are held in client-side state, with history persisted in localStorage. Edges reflect shown imports, calls, and documented capabilities; the ResultDialog-to-session relationship is unverified.
Main entry points: Practice.tsx Practice session · Home.tsx Text selection · typingStore.ts Typing state · App.tsx Route shell
Components 18
App navigation
- Route shell
src/App.tsx - Text selection
src/pages/Home.tsx
Practice content
- Paste dialog
src/components/PasteDialog.tsx - Passage library
src/data/texts.ts - Practice session
src/pages/Practice.tsx
Typing engine
- Character feedback
src/components/TypingText.tsx - Typing metrics
src/hooks/useTyping.ts - Session timer
src/hooks/useTimer.ts - Stats display
src/components/StatsBar.tsx - Result dialog
src/components/ResultDialog.tsx - Typing sounds
src/lib/sound.ts
Session and history
- Typing state
src/store/typingStore.ts - History view
src/pages/History.tsx
Other components
- Learner
- Browser audio
- Translation API
- Speech synthesis
- Browser storage
Connections 22
- Learner → Text selection: selects text
README.md - Learner → Paste dialog: pastes text
README.md - Route shell → Text selection: routes to
src/App.tsx - Route shell → Practice session: routes to
src/App.tsx - Route shell → History view: routes to
src/App.tsx - Text selection → Passage library: reads
src/pages/Home.tsx - Text selection → Paste dialog: renders
src/pages/Home.tsx - Text selection → Typing state: sets text
src/pages/Home.tsx - Text selection → Practice session: navigates to
src/pages/Home.tsx - Practice session → Typing state: reads and updates
src/pages/Practice.tsx - Practice session → Typing metrics: calculates
src/pages/Practice.tsx - Practice session → Session timer: tracks time
src/pages/Practice.tsx - Practice session → Character feedback: renders
src/pages/Practice.tsx - Practice session → Stats display: renders
src/pages/Practice.tsx - Practice session → Typing sounds: plays
src/pages/Practice.tsx - Typing sounds → Browser audio: plays audio
src/lib/sound.ts - Practice session → Translation API: queries
src/pages/Practice.tsx - Practice session → Speech synthesis: speaks word
src/pages/Practice.tsx - Practice session → Result dialog: may display
- Practice session → Typing state: records completion
src/pages/Practice.tsx - Typing state → Browser storage: persists history
src/store/typingStore.ts - History view → Typing state: reads history
src/pages/History.tsx