How harigittihub/sprechen works
Sprechen is a browser-based German speaking-practice app. Learners choose a CEFR level and practice direction, receive a sentence prompt, speak or type a response, and get a similarity score with word-level feedback before retrying or moving on. The app also offers sentence audio and hints, session history and progress counters, plus informational pages. Speech recognition and synthesis use browser APIs; the sampled code shows in-memory session state rather than persistent storage. Some supporting components and utility details were not excerpted, so their internal links are omitted.
Main entry points: App.jsx Practice flow · main.jsx App routing · Layout.jsx Shared layout · PracticeContext.jsx Session state
Components 23
Practice experience
- Practice flow
src/App.jsx - Level and mode
src/components/LevelSelector.jsx - Sentence prompt
src/components/SentenceCard.jsx - Answer input
src/components/SpeechRecorder.jsx - Answer feedback
src/components/ValidationResult.jsx - Practice history
src/components/HistoryModal.jsx
Practice content and state
- Sentence bank
src/data/sentences.js - Session state
src/context/PracticeContext.jsx - Scoring and diff
src/utils/validationUtils.js
Speech processing
- Speech recognition
src/utils/speechUtils.js - Speech synthesis
src/utils/ttsUtils.js
Site shell and pages
- Landing hero
src/components/LandingHero.jsx - Animated background
src/components/FloatingWordsBackground.jsx - Site header
src/components/Header.jsx - Site footer
src/components/Footer.jsx - Shared layout
src/components/Layout.jsx - About page
src/pages/About.jsx - CEFR guide
src/pages/CefrLevels.jsx - Contact page
src/pages/Contact.jsx - Privacy page
src/pages/Privacy.jsx - Terms page
src/pages/Terms.jsx - App routing
src/main.jsx
Other components
- Learner
Connections 29
- Learner → Practice flow: practices with
- Practice flow → Level and mode: renders
src/App.jsx - Practice flow → Sentence prompt: renders
src/App.jsx - Practice flow → Answer input: renders
src/App.jsx - Practice flow → Answer feedback: renders
src/App.jsx - Practice flow → Sentence bank: selects prompts
src/App.jsx - Practice flow → Scoring and diff: scores answers
src/App.jsx - Practice flow → Session state: updates progress
src/App.jsx - Answer input → Speech recognition: recognizes speech
src/components/SpeechRecorder.jsx - Sentence prompt → Speech synthesis: plays prompt
src/components/SentenceCard.jsx - Answer feedback → Scoring and diff: builds word diff
src/components/ValidationResult.jsx - Answer feedback → Speech synthesis: plays answer
src/components/ValidationResult.jsx - Shared layout → Site header: renders
src/components/Layout.jsx - Shared layout → Site footer: renders
src/components/Layout.jsx - Shared layout → Animated background: renders
src/components/Layout.jsx - Shared layout → Practice history: renders
src/components/Layout.jsx - Site header → Session state: reads session state
src/components/Header.jsx - Practice history → Session state: reads history state
- Practice history → Speech synthesis: plays history audio
src/components/HistoryModal.jsx - Landing hero → Sentence bank: uses sentences
src/components/LandingHero.jsx - Level and mode → Sentence bank: uses level data
src/components/LevelSelector.jsx - App routing → Session state: provides state
src/main.jsx - App routing → Shared layout: routes through
src/main.jsx - App routing → Practice flow: routes to
src/main.jsx - App routing → CEFR guide: routes to
src/main.jsx - App routing → About page: routes to
src/main.jsx - App routing → Contact page: routes to
src/main.jsx - App routing → Privacy page: routes to
src/main.jsx - App routing → Terms page: routes to
src/main.jsx