# meizcalv890/speaktrainer architecture

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

- Interactive diagram: https://gitdiagram.com/meizcalv890/speaktrainer
- Repository: https://github.com/meizcalv890/speaktrainer

## Overview

SpeakTrainer is a browser-based speaking-practice app. A learner selects practice text, records speech, receives transcript feedback and a scored comparison, then can review saved sessions in the dashboard/history. Custom materials and preferences support that workflow. The sampled app wiring establishes the main calls; README claims interactive and responsive practice, while unsampled HTML/CSS details and some material integrations are not mapped beyond their documented or excerpted capabilities.

Main entry points: [`js/app.js`](https://github.com/meizcalv890/speaktrainer/blob/main/js/app.js) (Practice interface), [`js/storage.js`](https://github.com/meizcalv890/speaktrainer/blob/main/js/storage.js) (Browser storage), [`js/materials.js`](https://github.com/meizcalv890/speaktrainer/blob/main/js/materials.js) (Materials manager), [`js/speech.js`](https://github.com/meizcalv890/speaktrainer/blob/main/js/speech.js) (Speech capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_practice["Practice workflow"]
  node_app["Practice interface<br/>[app.js]"]
  node_speech["Speech capture<br/>[speech.js]"]
  node_analysis["Speech analysis<br/>[analyzer.js]"]
  node_comparison["Transcript comparison<br/>[analyzer.js]"]
end

subgraph group_insights["Progress insights"]
  node_dashboard["Dashboard<br/>[dashboard.js]"]
  node_history["Session history<br/>[dashboard.js]"]
end

subgraph group_library["Practice library"]
  node_materials["Materials manager<br/>[materials.js]"]
  node_material_import["Material import/export<br/>[materials.js]"]
end

subgraph group_persistence["Local persistence"]
  node_local_storage[("Browser storage<br/>[storage.js]")]
  node_preferences["Practice preferences<br/>[storage.js]"]
end

node_learner(("Learner"))
node_speech_api["Browser speech recognition"]

node_learner -->|"uses"| node_app
node_app -->|"starts capture"| node_speech
node_speech -->|"recognizes speech"| node_speech_api
node_app -->|"analyzes transcript"| node_analysis
node_app -->|"renders alignment"| node_comparison
node_app -->|"saves session"| node_local_storage
node_app -->|"refreshes dashboard"| node_dashboard
node_app -->|"refreshes history"| node_history
node_dashboard -->|"reads sessions"| node_local_storage
node_history -->|"reads sessions"| node_local_storage
node_app -->|"manages materials"| node_materials
node_materials -->|"stores materials"| node_local_storage
node_app -->|"saves preferences"| node_preferences
node_preferences -->|"persists settings"| node_local_storage
node_materials -->|"imports and exports"| node_material_import

click node_app "https://github.com/meizcalv890/speaktrainer/blob/main/js/app.js"
click node_speech "https://github.com/meizcalv890/speaktrainer/blob/main/js/speech.js"
click node_analysis "https://github.com/meizcalv890/speaktrainer/blob/main/js/analyzer.js"
click node_comparison "https://github.com/meizcalv890/speaktrainer/blob/main/js/analyzer.js"
click node_dashboard "https://github.com/meizcalv890/speaktrainer/blob/main/js/dashboard.js"
click node_history "https://github.com/meizcalv890/speaktrainer/blob/main/js/dashboard.js"
click node_materials "https://github.com/meizcalv890/speaktrainer/blob/main/js/materials.js"
click node_material_import "https://github.com/meizcalv890/speaktrainer/blob/main/js/materials.js"
click node_local_storage "https://github.com/meizcalv890/speaktrainer/blob/main/js/storage.js"
click node_preferences "https://github.com/meizcalv890/speaktrainer/blob/main/js/storage.js"

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_app,node_speech,node_analysis,node_comparison,node_speech_api toneBlue
class node_dashboard,node_history toneAmber
class node_materials,node_material_import toneMint
class node_local_storage,node_preferences toneRose
class node_learner toneIndigo
```

## Components

### Practice workflow

- [Practice interface](https://github.com/meizcalv890/speaktrainer/blob/main/js/app.js): `js/app.js`
- [Speech capture](https://github.com/meizcalv890/speaktrainer/blob/main/js/speech.js): `js/speech.js`
- [Speech analysis](https://github.com/meizcalv890/speaktrainer/blob/main/js/analyzer.js): `js/analyzer.js`
- [Transcript comparison](https://github.com/meizcalv890/speaktrainer/blob/main/js/analyzer.js): `js/analyzer.js`

### Progress insights

- [Dashboard](https://github.com/meizcalv890/speaktrainer/blob/main/js/dashboard.js): `js/dashboard.js`
- [Session history](https://github.com/meizcalv890/speaktrainer/blob/main/js/dashboard.js): `js/dashboard.js`

### Practice library

- [Materials manager](https://github.com/meizcalv890/speaktrainer/blob/main/js/materials.js): `js/materials.js`
- [Material import/export](https://github.com/meizcalv890/speaktrainer/blob/main/js/materials.js): `js/materials.js`

### Local persistence

- [Browser storage](https://github.com/meizcalv890/speaktrainer/blob/main/js/storage.js): `js/storage.js`
- [Practice preferences](https://github.com/meizcalv890/speaktrainer/blob/main/js/storage.js): `js/storage.js`

### Other components

- **Learner**
- **Browser speech recognition**

## Connections

- Learner → Practice interface: uses (evidence: `README.md`)
- Practice interface → Speech capture: starts capture (evidence: `js/app.js`)
- Speech capture → Browser speech recognition: recognizes speech (evidence: `js/speech.js`)
- Practice interface → Speech analysis: analyzes transcript (evidence: `js/app.js`)
- Practice interface → Transcript comparison: renders alignment (evidence: `js/app.js`)
- Practice interface → Browser storage: saves session (evidence: `js/app.js`)
- Practice interface → Dashboard: refreshes dashboard (evidence: `js/app.js`)
- Practice interface → Session history: refreshes history (evidence: `js/app.js`)
- Dashboard → Browser storage: reads sessions (evidence: `js/dashboard.js`)
- Session history → Browser storage: reads sessions (evidence: `js/dashboard.js`)
- Practice interface → Materials manager: manages materials (evidence: `js/app.js`)
- Materials manager → Browser storage: stores materials (evidence: `js/materials.js`)
- Practice interface → Practice preferences: saves preferences (evidence: `js/app.js`)
- Practice preferences → Browser storage: persists settings (evidence: `js/storage.js`)
- Materials manager → Material import/export: imports and exports (evidence: `js/materials.js`)
