# yyegor/govori_krasivo_test architecture

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

- Interactive diagram: https://gitdiagram.com/yyegor/govori_krasivo_test
- Repository: https://github.com/yyegor/govori_krasivo_test

## Overview

Govori Krasivo is a speech-therapy platform with a learner-facing lesson and audio-recording flow, plus a therapist console for assembling courses and browsing speech-text material. Learners open a week, work through its video-and-task stages, record audio in the browser, and submit it to the Flask server for file storage. Therapists use the console to select client/video data and save week configurations. Google Sheets and Docs provide documented client, video, and text-library data. The excerpts show these routes and integrations, but not a complete chat exchange or how saved configurations are later loaded into lessons.

Main entry points: [`server_gk.py`](https://github.com/yyegor/govori_krasivo_test/blob/main/server_gk.py) (Flask routes), [`logo_stuff.py`](https://github.com/yyegor/govori_krasivo_test/blob/main/logo_stuff.py) (Course setup routes), [`ext_data.py`](https://github.com/yyegor/govori_krasivo_test/blob/main/ext_data.py) (Google data access), [`static/js/mic_app.js`](https://github.com/yyegor/govori_krasivo_test/blob/main/static/js/mic_app.js) (Recording controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learner["Learner experience"]
  node_week_page["Week page"]
  node_lesson_flow["Lesson flow<br/>[buttons.js]"]
  node_recorder_ui["Recording controls<br/>[mic_app.js]"]
  node_recorder["Audio recorder"]
  node_wav_worker["WAV encoder"]
  node_peak_meter["Peak meter"]
end

subgraph group_server["Application server"]
  node_flask["Flask routes<br/>[server_gk.py]"]
  node_audio_files[("Recorded audio")]
  node_week_configs[("Week configuration files")]
  node_database[("SQLite database<br/>[app.db]")]
  node_models["User and lesson models<br/>[models.py]"]
  node_config["App configuration<br/>[config.py]"]
end

subgraph group_therapist["Therapist console"]
  node_cabinet["Therapist cabinet"]
  node_cabinet_ui["Cabinet interactions<br/>[cabinet.js]"]
  node_course_setup["Course setup routes<br/>[logo_stuff.py]"]
  node_text_library_ui["Text suggestions"]
end

subgraph group_integrations["Data integrations"]
  node_google_data["Google data access<br/>[ext_data.py]"]
  node_sheets["Google Sheets"]
  node_docs["Google Docs"]
end

node_learner(("Learner"))
node_therapist(("Therapist"))

node_learner -->|"opens"| node_week_page
node_week_page -.->|"runs"| node_lesson_flow
node_learner -->|"records speech"| node_recorder_ui
node_recorder_ui -->|"starts recording"| node_recorder
node_recorder_ui -->|"displays levels"| node_peak_meter
node_recorder -->|"encodes audio"| node_wav_worker
node_recorder_ui -->|"posts audio"| node_flask
node_flask -->|"writes recording"| node_audio_files
node_therapist -->|"opens"| node_cabinet
node_cabinet -.->|"uses"| node_cabinet_ui
node_cabinet_ui -->|"saves week"| node_course_setup
node_course_setup -->|"writes configuration"| node_week_configs
node_course_setup -->|"loads client and video data"| node_google_data
node_therapist -->|"browses suggestions"| node_text_library_ui
node_course_setup -->|"requests tagged texts"| node_google_data
node_google_data -->|"reads spreadsheet data"| node_sheets
node_google_data -->|"reads text library"| node_docs
node_flask -->|"registers routes"| node_course_setup
node_flask -->|"loads settings"| node_config
node_google_data -->|"uses credentials and IDs"| node_config
node_models -->|"maps models"| node_database
node_flask -->|"renders for learner"| node_week_page

click node_week_page "https://github.com/yyegor/govori_krasivo_test/blob/main/templates/user_week_template.html"
click node_lesson_flow "https://github.com/yyegor/govori_krasivo_test/blob/main/static/js/buttons.js"
click node_recorder_ui "https://github.com/yyegor/govori_krasivo_test/blob/main/static/js/mic_app.js"
click node_recorder "https://github.com/yyegor/govori_krasivo_test/blob/main/static/js/mic_RecorderService.js"
click node_wav_worker "https://github.com/yyegor/govori_krasivo_test/blob/main/static/js/mic_encoder-wav-worker.js"
click node_peak_meter "https://github.com/yyegor/govori_krasivo_test/blob/main/static/js/mic_WebAudioPeakMeter.js"
click node_flask "https://github.com/yyegor/govori_krasivo_test/blob/main/server_gk.py"
click node_audio_files "https://github.com/yyegor/govori_krasivo_test/tree/main/user_content_audio"
click node_week_configs "https://github.com/yyegor/govori_krasivo_test/tree/main/static/weeks"
click node_database "https://github.com/yyegor/govori_krasivo_test/blob/main/app.db"
click node_models "https://github.com/yyegor/govori_krasivo_test/blob/main/models.py"
click node_cabinet "https://github.com/yyegor/govori_krasivo_test/blob/main/templates/logo_cabinet_v2.html"
click node_cabinet_ui "https://github.com/yyegor/govori_krasivo_test/blob/main/static/js/cabinet.js"
click node_course_setup "https://github.com/yyegor/govori_krasivo_test/blob/main/logo_stuff.py"
click node_text_library_ui "https://github.com/yyegor/govori_krasivo_test/blob/main/templates/logo_text_sugg.html"
click node_google_data "https://github.com/yyegor/govori_krasivo_test/blob/main/ext_data.py"
click node_config "https://github.com/yyegor/govori_krasivo_test/blob/main/config.py"

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_week_page,node_lesson_flow,node_recorder_ui,node_recorder,node_wav_worker,node_peak_meter toneBlue
class node_flask,node_audio_files,node_week_configs,node_database,node_models,node_config toneAmber
class node_cabinet,node_cabinet_ui,node_course_setup,node_text_library_ui,node_therapist toneMint
class node_google_data,node_sheets,node_docs toneRose
class node_learner toneIndigo
```

## Components

### Learner experience

- [Week page](https://github.com/yyegor/govori_krasivo_test/blob/main/templates/user_week_template.html): `templates/user_week_template.html`
- [Lesson flow](https://github.com/yyegor/govori_krasivo_test/blob/main/static/js/buttons.js): `static/js/buttons.js`
- [Recording controls](https://github.com/yyegor/govori_krasivo_test/blob/main/static/js/mic_app.js): `static/js/mic_app.js`
- [Audio recorder](https://github.com/yyegor/govori_krasivo_test/blob/main/static/js/mic_RecorderService.js): `static/js/mic_RecorderService.js`
- [WAV encoder](https://github.com/yyegor/govori_krasivo_test/blob/main/static/js/mic_encoder-wav-worker.js): `static/js/mic_encoder-wav-worker.js`
- [Peak meter](https://github.com/yyegor/govori_krasivo_test/blob/main/static/js/mic_WebAudioPeakMeter.js): `static/js/mic_WebAudioPeakMeter.js`

### Application server

- [Flask routes](https://github.com/yyegor/govori_krasivo_test/blob/main/server_gk.py): `server_gk.py`
- [Recorded audio](https://github.com/yyegor/govori_krasivo_test/tree/main/user_content_audio): `user_content_audio`
- [Week configuration files](https://github.com/yyegor/govori_krasivo_test/tree/main/static/weeks): `static/weeks`
- [SQLite database](https://github.com/yyegor/govori_krasivo_test/blob/main/app.db): `app.db`
- [User and lesson models](https://github.com/yyegor/govori_krasivo_test/blob/main/models.py): `models.py`
- [App configuration](https://github.com/yyegor/govori_krasivo_test/blob/main/config.py): `config.py`

### Therapist console

- [Therapist cabinet](https://github.com/yyegor/govori_krasivo_test/blob/main/templates/logo_cabinet_v2.html): `templates/logo_cabinet_v2.html`
- [Cabinet interactions](https://github.com/yyegor/govori_krasivo_test/blob/main/static/js/cabinet.js): `static/js/cabinet.js`
- [Course setup routes](https://github.com/yyegor/govori_krasivo_test/blob/main/logo_stuff.py): `logo_stuff.py`
- [Text suggestions](https://github.com/yyegor/govori_krasivo_test/blob/main/templates/logo_text_sugg.html): `templates/logo_text_sugg.html`

### Data integrations

- [Google data access](https://github.com/yyegor/govori_krasivo_test/blob/main/ext_data.py): `ext_data.py`
- **Google Sheets**
- **Google Docs**

### Other components

- **Learner**
- **Therapist**

## Connections

- Learner → Week page: opens
- Week page → Lesson flow: runs
- Learner → Recording controls: records speech (evidence: `static/js/mic_app.js`)
- Recording controls → Audio recorder: starts recording (evidence: `static/js/mic_app.js`)
- Recording controls → Peak meter: displays levels (evidence: `static/js/mic_app.js`)
- Audio recorder → WAV encoder: encodes audio (evidence: `static/js/mic_RecorderService.js`)
- Recording controls → Flask routes: posts audio (evidence: `static/js/mic_app.js`)
- Flask routes → Recorded audio: writes recording (evidence: `server_gk.py`)
- Therapist → Therapist cabinet: opens
- Therapist cabinet → Cabinet interactions: uses
- Cabinet interactions → Course setup routes: saves week (evidence: `static/js/cabinet.js`)
- Course setup routes → Week configuration files: writes configuration (evidence: `logo_stuff.py`)
- Course setup routes → Google data access: loads client and video data (evidence: `logo_stuff.py`)
- Therapist → Text suggestions: browses suggestions
- Course setup routes → Google data access: requests tagged texts (evidence: `logo_stuff.py`)
- Google data access → Google Sheets: reads spreadsheet data (evidence: `ext_data.py`)
- Google data access → Google Docs: reads text library (evidence: `ext_data.py`)
- Flask routes → Course setup routes: registers routes (evidence: `server_gk.py`)
- Flask routes → App configuration: loads settings (evidence: `server_gk.py`)
- Google data access → App configuration: uses credentials and IDs (evidence: `ext_data.py`)
- User and lesson models → SQLite database: maps models (evidence: `models.py`)
- Flask routes → Week page: renders for learner (evidence: `server_gk.py`)
