# harigittihub/sprechen architecture

> Architecture diagram of the GitHub repository harigittihub/sprechen, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harigittihub/sprechen
- Repository: https://github.com/harigittihub/sprechen

## Overview

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: [`src/App.jsx`](https://github.com/harigittihub/sprechen/blob/main/src/App.jsx) (Practice flow), [`src/main.jsx`](https://github.com/harigittihub/sprechen/blob/main/src/main.jsx) (App routing), [`src/components/Layout.jsx`](https://github.com/harigittihub/sprechen/blob/main/src/components/Layout.jsx) (Shared layout), [`src/context/PracticeContext.jsx`](https://github.com/harigittihub/sprechen/blob/main/src/context/PracticeContext.jsx) (Session state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_practice["Practice experience"]
  node_practice_app["Practice flow<br/>[App.jsx]"]
  node_level_selector["Level and mode<br/>[LevelSelector.jsx]"]
  node_sentence_card["Sentence prompt<br/>[SentenceCard.jsx]"]
  node_speech_recorder["Answer input<br/>[SpeechRecorder.jsx]"]
  node_validation_result["Answer feedback"]
  node_learner_history["Practice history<br/>[HistoryModal.jsx]"]
end

subgraph group_content["Practice content and state"]
  node_sentence_bank["Sentence bank<br/>[sentences.js]"]
  node_practice_context["Session state"]
  node_validation_utils["Scoring and diff<br/>[validationUtils.js]"]
end

subgraph group_speech["Speech processing"]
  node_speech_utils["Speech recognition<br/>[speechUtils.js]"]
  node_tts_utils["Speech synthesis<br/>[ttsUtils.js]"]
end

subgraph group_site["Site shell and pages"]
  node_landing_hero["Landing hero<br/>[LandingHero.jsx]"]
  node_background["Animated background"]
  node_header["Site header<br/>[Header.jsx]"]
  node_footer["Site footer<br/>[Footer.jsx]"]
  node_layout["Shared layout<br/>[Layout.jsx]"]
  node_about["About page<br/>[About.jsx]"]
  node_cefr_page["CEFR guide<br/>[CefrLevels.jsx]"]
  node_contact["Contact page<br/>[Contact.jsx]"]
  node_privacy["Privacy page<br/>[Privacy.jsx]"]
  node_terms["Terms page<br/>[Terms.jsx]"]
  node_app_entry["App routing<br/>[main.jsx]"]
end

node_learner(("Learner"))

node_learner -->|"practices with"| node_practice_app
node_practice_app -->|"renders"| node_level_selector
node_practice_app -->|"renders"| node_sentence_card
node_practice_app -->|"renders"| node_speech_recorder
node_practice_app -->|"renders"| node_validation_result
node_practice_app -->|"selects prompts"| node_sentence_bank
node_practice_app -->|"scores answers"| node_validation_utils
node_practice_app -->|"updates progress"| node_practice_context
node_speech_recorder -->|"recognizes speech"| node_speech_utils
node_sentence_card -->|"plays prompt"| node_tts_utils
node_validation_result -->|"builds word diff"| node_validation_utils
node_validation_result -->|"plays answer"| node_tts_utils
node_layout -->|"renders"| node_header
node_layout -->|"renders"| node_footer
node_layout -->|"renders"| node_background
node_layout -->|"renders"| node_learner_history
node_header -->|"reads session state"| node_practice_context
node_learner_history -.->|"reads history state"| node_practice_context
node_learner_history -->|"plays history audio"| node_tts_utils
node_landing_hero -->|"uses sentences"| node_sentence_bank
node_level_selector -->|"uses level data"| node_sentence_bank
node_app_entry -->|"provides state"| node_practice_context
node_app_entry -->|"routes through"| node_layout
node_app_entry -->|"routes to"| node_practice_app
node_app_entry -->|"routes to"| node_cefr_page
node_app_entry -->|"routes to"| node_about
node_app_entry -->|"routes to"| node_contact
node_app_entry -->|"routes to"| node_privacy
node_app_entry -->|"routes to"| node_terms

click node_practice_app "https://github.com/harigittihub/sprechen/blob/main/src/App.jsx"
click node_level_selector "https://github.com/harigittihub/sprechen/blob/main/src/components/LevelSelector.jsx"
click node_sentence_card "https://github.com/harigittihub/sprechen/blob/main/src/components/SentenceCard.jsx"
click node_speech_recorder "https://github.com/harigittihub/sprechen/blob/main/src/components/SpeechRecorder.jsx"
click node_validation_result "https://github.com/harigittihub/sprechen/blob/main/src/components/ValidationResult.jsx"
click node_sentence_bank "https://github.com/harigittihub/sprechen/blob/main/src/data/sentences.js"
click node_practice_context "https://github.com/harigittihub/sprechen/blob/main/src/context/PracticeContext.jsx"
click node_validation_utils "https://github.com/harigittihub/sprechen/blob/main/src/utils/validationUtils.js"
click node_speech_utils "https://github.com/harigittihub/sprechen/blob/main/src/utils/speechUtils.js"
click node_tts_utils "https://github.com/harigittihub/sprechen/blob/main/src/utils/ttsUtils.js"
click node_learner_history "https://github.com/harigittihub/sprechen/blob/main/src/components/HistoryModal.jsx"
click node_landing_hero "https://github.com/harigittihub/sprechen/blob/main/src/components/LandingHero.jsx"
click node_background "https://github.com/harigittihub/sprechen/blob/main/src/components/FloatingWordsBackground.jsx"
click node_header "https://github.com/harigittihub/sprechen/blob/main/src/components/Header.jsx"
click node_footer "https://github.com/harigittihub/sprechen/blob/main/src/components/Footer.jsx"
click node_layout "https://github.com/harigittihub/sprechen/blob/main/src/components/Layout.jsx"
click node_about "https://github.com/harigittihub/sprechen/blob/main/src/pages/About.jsx"
click node_cefr_page "https://github.com/harigittihub/sprechen/blob/main/src/pages/CefrLevels.jsx"
click node_contact "https://github.com/harigittihub/sprechen/blob/main/src/pages/Contact.jsx"
click node_privacy "https://github.com/harigittihub/sprechen/blob/main/src/pages/Privacy.jsx"
click node_terms "https://github.com/harigittihub/sprechen/blob/main/src/pages/Terms.jsx"
click node_app_entry "https://github.com/harigittihub/sprechen/blob/main/src/main.jsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_practice_app,node_level_selector,node_sentence_card,node_speech_recorder,node_validation_result,node_learner_history toneBlue
class node_sentence_bank,node_practice_context,node_validation_utils toneAmber
class node_speech_utils,node_tts_utils toneMint
class node_landing_hero,node_background,node_header,node_footer,node_layout,node_about,node_cefr_page,node_contact,node_privacy,node_terms,node_app_entry toneRose
class node_learner toneIndigo
```

## Components

### Practice experience

- [Practice flow](https://github.com/harigittihub/sprechen/blob/main/src/App.jsx): `src/App.jsx`
- [Level and mode](https://github.com/harigittihub/sprechen/blob/main/src/components/LevelSelector.jsx): `src/components/LevelSelector.jsx`
- [Sentence prompt](https://github.com/harigittihub/sprechen/blob/main/src/components/SentenceCard.jsx): `src/components/SentenceCard.jsx`
- [Answer input](https://github.com/harigittihub/sprechen/blob/main/src/components/SpeechRecorder.jsx): `src/components/SpeechRecorder.jsx`
- [Answer feedback](https://github.com/harigittihub/sprechen/blob/main/src/components/ValidationResult.jsx): `src/components/ValidationResult.jsx`
- [Practice history](https://github.com/harigittihub/sprechen/blob/main/src/components/HistoryModal.jsx): `src/components/HistoryModal.jsx`

### Practice content and state

- [Sentence bank](https://github.com/harigittihub/sprechen/blob/main/src/data/sentences.js): `src/data/sentences.js`
- [Session state](https://github.com/harigittihub/sprechen/blob/main/src/context/PracticeContext.jsx): `src/context/PracticeContext.jsx`
- [Scoring and diff](https://github.com/harigittihub/sprechen/blob/main/src/utils/validationUtils.js): `src/utils/validationUtils.js`

### Speech processing

- [Speech recognition](https://github.com/harigittihub/sprechen/blob/main/src/utils/speechUtils.js): `src/utils/speechUtils.js`
- [Speech synthesis](https://github.com/harigittihub/sprechen/blob/main/src/utils/ttsUtils.js): `src/utils/ttsUtils.js`

### Site shell and pages

- [Landing hero](https://github.com/harigittihub/sprechen/blob/main/src/components/LandingHero.jsx): `src/components/LandingHero.jsx`
- [Animated background](https://github.com/harigittihub/sprechen/blob/main/src/components/FloatingWordsBackground.jsx): `src/components/FloatingWordsBackground.jsx`
- [Site header](https://github.com/harigittihub/sprechen/blob/main/src/components/Header.jsx): `src/components/Header.jsx`
- [Site footer](https://github.com/harigittihub/sprechen/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`
- [Shared layout](https://github.com/harigittihub/sprechen/blob/main/src/components/Layout.jsx): `src/components/Layout.jsx`
- [About page](https://github.com/harigittihub/sprechen/blob/main/src/pages/About.jsx): `src/pages/About.jsx`
- [CEFR guide](https://github.com/harigittihub/sprechen/blob/main/src/pages/CefrLevels.jsx): `src/pages/CefrLevels.jsx`
- [Contact page](https://github.com/harigittihub/sprechen/blob/main/src/pages/Contact.jsx): `src/pages/Contact.jsx`
- [Privacy page](https://github.com/harigittihub/sprechen/blob/main/src/pages/Privacy.jsx): `src/pages/Privacy.jsx`
- [Terms page](https://github.com/harigittihub/sprechen/blob/main/src/pages/Terms.jsx): `src/pages/Terms.jsx`
- [App routing](https://github.com/harigittihub/sprechen/blob/main/src/main.jsx): `src/main.jsx`

### Other components

- **Learner**

## Connections

- Learner → Practice flow: practices with
- Practice flow → Level and mode: renders (evidence: `src/App.jsx`)
- Practice flow → Sentence prompt: renders (evidence: `src/App.jsx`)
- Practice flow → Answer input: renders (evidence: `src/App.jsx`)
- Practice flow → Answer feedback: renders (evidence: `src/App.jsx`)
- Practice flow → Sentence bank: selects prompts (evidence: `src/App.jsx`)
- Practice flow → Scoring and diff: scores answers (evidence: `src/App.jsx`)
- Practice flow → Session state: updates progress (evidence: `src/App.jsx`)
- Answer input → Speech recognition: recognizes speech (evidence: `src/components/SpeechRecorder.jsx`)
- Sentence prompt → Speech synthesis: plays prompt (evidence: `src/components/SentenceCard.jsx`)
- Answer feedback → Scoring and diff: builds word diff (evidence: `src/components/ValidationResult.jsx`)
- Answer feedback → Speech synthesis: plays answer (evidence: `src/components/ValidationResult.jsx`)
- Shared layout → Site header: renders (evidence: `src/components/Layout.jsx`)
- Shared layout → Site footer: renders (evidence: `src/components/Layout.jsx`)
- Shared layout → Animated background: renders (evidence: `src/components/Layout.jsx`)
- Shared layout → Practice history: renders (evidence: `src/components/Layout.jsx`)
- Site header → Session state: reads session state (evidence: `src/components/Header.jsx`)
- Practice history → Session state: reads history state
- Practice history → Speech synthesis: plays history audio (evidence: `src/components/HistoryModal.jsx`)
- Landing hero → Sentence bank: uses sentences (evidence: `src/components/LandingHero.jsx`)
- Level and mode → Sentence bank: uses level data (evidence: `src/components/LevelSelector.jsx`)
- App routing → Session state: provides state (evidence: `src/main.jsx`)
- App routing → Shared layout: routes through (evidence: `src/main.jsx`)
- App routing → Practice flow: routes to (evidence: `src/main.jsx`)
- App routing → CEFR guide: routes to (evidence: `src/main.jsx`)
- App routing → About page: routes to (evidence: `src/main.jsx`)
- App routing → Contact page: routes to (evidence: `src/main.jsx`)
- App routing → Privacy page: routes to (evidence: `src/main.jsx`)
- App routing → Terms page: routes to (evidence: `src/main.jsx`)
