# burakwa/frog-hsd-hackathon architecture

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

- Interactive diagram: https://gitdiagram.com/burakwa/frog-hsd-hackathon
- Repository: https://github.com/burakwa/frog-hsd-hackathon

## Overview

FrogFriends is a Turkish-language speech-learning platform for children. A child enters the learning panel, chooses among four practice modes, speaks or completes activities, receives feedback, and accumulates progress; parents can review progress and request AI reports. The graph preserves the documented game modes and parent features. Some page and integration wiring is represented only by README statements or SOURCE INDEX references; unsampled implementation details are not assumed.

Main entry points: [`src/app/panel/oyunlar/ses-tekrari/page.tsx`](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/oyunlar/ses-tekrari/page.tsx) (Sound repetition), [`src/app/panel/oyunlar/page.tsx`](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/oyunlar/page.tsx) (Games menu), [`src/hooks/useProgress.ts`](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/hooks/useProgress.ts) (Progress tracking), [`src/app/panel/veli-paneli/page.tsx`](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/veli-paneli/page.tsx) (Parent dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning experience"]
  node_home["Landing page<br/>[page.tsx]"]
  node_games_menu["Games menu<br/>[page.tsx]"]
  node_repeat_game["Sound repetition<br/>[page.tsx]"]
  node_syllable_game["Syllable hunt<br/>[page.tsx]"]
  node_sentence_game["Sentence builder<br/>[page.tsx]"]
  node_story_game["Story reading<br/>[page.tsx]"]
  node_exercise_data["Exercise content<br/>[exercises.ts]"]
end

subgraph group_speech["Speech and feedback"]
  node_speech_capture["Speech recognition"]
  node_speech_synthesis["Speech synthesis"]
  node_pronunciation["Pronunciation scoring<br/>[analyze.ts]"]
  node_feedback["Speech feedback"]
end

subgraph group_progress["Accounts and progress"]
  node_progress_hook["Progress tracking<br/>[useProgress.ts]"]
  node_auth_hook["Authentication<br/>[useAuth.ts]"]
  node_progress_page["Progress view<br/>[page.tsx]"]
  node_parent_page["Parent dashboard<br/>[page.tsx]"]
end

subgraph group_reports["AI reporting"]
  node_ai_hook["AI analysis hook<br/>[useAIAnalysis.ts]"]
  node_analysis_api["Speech analysis API<br/>[route.ts]"]
  node_report_api["Progress report API<br/>[route.ts]"]
  node_ai_service["AI analysis service<br/>[openrouter.ts]"]
end

node_child(("Child learner"))
node_parent(("Parent"))
node_speech_api{{"Browser speech APIs"}}
node_supabase[("Supabase")]
node_openrouter{{"OpenRouter"}}

node_child -->|"opens"| node_home
node_child -->|"chooses games"| node_games_menu
node_parent -->|"reviews progress"| node_parent_page
node_games_menu -->|"offers mode"| node_repeat_game
node_games_menu -->|"offers mode"| node_syllable_game
node_games_menu -->|"offers mode"| node_sentence_game
node_games_menu -->|"offers mode"| node_story_game
node_repeat_game -->|"uses"| node_speech_capture
node_repeat_game -->|"uses"| node_speech_synthesis
node_repeat_game -->|"scores speech"| node_pronunciation
node_speech_capture -->|"recognizes speech"| node_speech_api
node_speech_synthesis -->|"speaks prompts"| node_speech_api
node_pronunciation -->|"provides result"| node_feedback
node_repeat_game -->|"loads exercises"| node_exercise_data
node_repeat_game -->|"records session"| node_progress_hook
node_progress_page -->|"reads progress"| node_progress_hook
node_parent_page -->|"reads progress"| node_progress_hook
node_parent_page -->|"requests report"| node_ai_hook
node_auth_hook -->|"authenticates and reads profile"| node_supabase
node_progress_hook -->|"gets user"| node_auth_hook
node_progress_hook -->|"loads and saves sessions"| node_supabase
node_ai_hook -->|"posts analysis"| node_analysis_api
node_ai_hook -->|"posts report request"| node_report_api
node_analysis_api -->|"requests analysis"| node_ai_service
node_report_api -->|"generates report"| node_ai_service
node_ai_service -->|"calls model API"| node_openrouter
node_report_api -->|"saves and fetches reports"| node_supabase

click node_home "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/page.tsx"
click node_games_menu "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/oyunlar/page.tsx"
click node_repeat_game "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/oyunlar/ses-tekrari/page.tsx"
click node_syllable_game "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/oyunlar/hece-avi/page.tsx"
click node_sentence_game "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/oyunlar/cumle-soyle/page.tsx"
click node_story_game "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/oyunlar/sesli-masal/page.tsx"
click node_exercise_data "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/lib/data/exercises.ts"
click node_speech_capture "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/hooks/useSpeechRecognition.ts"
click node_speech_synthesis "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/hooks/useSpeechSynthesis.ts"
click node_pronunciation "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/lib/comparison/analyze.ts"
click node_feedback "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/components/speech/PronunciationFeedback.tsx"
click node_progress_hook "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/hooks/useProgress.ts"
click node_auth_hook "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/hooks/useAuth.ts"
click node_progress_page "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/ilerleme/page.tsx"
click node_parent_page "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/veli-paneli/page.tsx"
click node_ai_hook "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/hooks/useAIAnalysis.ts"
click node_analysis_api "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/api/ai-analyze/route.ts"
click node_report_api "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/api/ai-report/route.ts"
click node_ai_service "https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/lib/ai/openrouter.ts"

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_home,node_games_menu,node_repeat_game,node_syllable_game,node_sentence_game,node_story_game,node_exercise_data,node_speech_api toneBlue
class node_speech_capture,node_speech_synthesis,node_pronunciation,node_feedback,node_supabase toneAmber
class node_progress_hook,node_auth_hook,node_progress_page,node_parent_page,node_openrouter toneMint
class node_ai_hook,node_analysis_api,node_report_api,node_ai_service toneRose
class node_child,node_parent toneIndigo
```

## Components

### Learning experience

- [Landing page](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Games menu](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/oyunlar/page.tsx): `src/app/panel/oyunlar/page.tsx`
- [Sound repetition](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/oyunlar/ses-tekrari/page.tsx): `src/app/panel/oyunlar/ses-tekrari/page.tsx`
- [Syllable hunt](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/oyunlar/hece-avi/page.tsx): `src/app/panel/oyunlar/hece-avi/page.tsx`
- [Sentence builder](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/oyunlar/cumle-soyle/page.tsx): `src/app/panel/oyunlar/cumle-soyle/page.tsx`
- [Story reading](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/oyunlar/sesli-masal/page.tsx): `src/app/panel/oyunlar/sesli-masal/page.tsx`
- [Exercise content](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/lib/data/exercises.ts): `src/lib/data/exercises.ts`

### Speech and feedback

- [Speech recognition](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/hooks/useSpeechRecognition.ts): `src/hooks/useSpeechRecognition.ts`
- [Speech synthesis](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/hooks/useSpeechSynthesis.ts): `src/hooks/useSpeechSynthesis.ts`
- [Pronunciation scoring](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/lib/comparison/analyze.ts): `src/lib/comparison/analyze.ts`
- [Speech feedback](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/components/speech/PronunciationFeedback.tsx): `src/components/speech/PronunciationFeedback.tsx`

### Accounts and progress

- [Progress tracking](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/hooks/useProgress.ts): `src/hooks/useProgress.ts`
- [Authentication](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/hooks/useAuth.ts): `src/hooks/useAuth.ts`
- [Progress view](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/ilerleme/page.tsx): `src/app/panel/ilerleme/page.tsx`
- [Parent dashboard](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/panel/veli-paneli/page.tsx): `src/app/panel/veli-paneli/page.tsx`

### AI reporting

- [AI analysis hook](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/hooks/useAIAnalysis.ts): `src/hooks/useAIAnalysis.ts`
- [Speech analysis API](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/api/ai-analyze/route.ts): `src/app/api/ai-analyze/route.ts`
- [Progress report API](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/app/api/ai-report/route.ts): `src/app/api/ai-report/route.ts`
- [AI analysis service](https://github.com/burakwa/frog-hsd-hackathon/blob/main/src/lib/ai/openrouter.ts): `src/lib/ai/openrouter.ts`

### Other components

- **Child learner**
- **Parent**
- **Browser speech APIs**
- **Supabase**
- **OpenRouter**

## Connections

- Child learner → Landing page: opens (evidence: `README.md`)
- Child learner → Games menu: chooses games (evidence: `README.md`)
- Parent → Parent dashboard: reviews progress (evidence: `README.md`)
- Games menu → Sound repetition: offers mode (evidence: `README.md`)
- Games menu → Syllable hunt: offers mode (evidence: `README.md`)
- Games menu → Sentence builder: offers mode (evidence: `README.md`)
- Games menu → Story reading: offers mode (evidence: `README.md`)
- Sound repetition → Speech recognition: uses (evidence: `src/app/panel/oyunlar/ses-tekrari/page.tsx`)
- Sound repetition → Speech synthesis: uses (evidence: `src/app/panel/oyunlar/ses-tekrari/page.tsx`)
- Sound repetition → Pronunciation scoring: scores speech (evidence: `src/app/panel/oyunlar/ses-tekrari/page.tsx`)
- Speech recognition → Browser speech APIs: recognizes speech (evidence: `README.md`)
- Speech synthesis → Browser speech APIs: speaks prompts (evidence: `README.md`)
- Pronunciation scoring → Speech feedback: provides result (evidence: `src/components/speech/PronunciationFeedback.tsx`)
- Sound repetition → Exercise content: loads exercises (evidence: `src/app/panel/oyunlar/ses-tekrari/page.tsx`)
- Sound repetition → Progress tracking: records session (evidence: `src/app/panel/oyunlar/ses-tekrari/page.tsx`)
- Progress view → Progress tracking: reads progress (evidence: `src/app/panel/ilerleme/page.tsx`)
- Parent dashboard → Progress tracking: reads progress (evidence: `src/app/panel/veli-paneli/page.tsx`)
- Parent dashboard → AI analysis hook: requests report (evidence: `src/app/panel/veli-paneli/page.tsx`)
- Authentication → Supabase: authenticates and reads profile (evidence: `src/hooks/useAuth.ts`)
- Progress tracking → Authentication: gets user (evidence: `src/hooks/useProgress.ts`)
- Progress tracking → Supabase: loads and saves sessions (evidence: `src/hooks/useProgress.ts`)
- AI analysis hook → Speech analysis API: posts analysis (evidence: `src/hooks/useAIAnalysis.ts`)
- AI analysis hook → Progress report API: posts report request (evidence: `src/hooks/useAIAnalysis.ts`)
- Speech analysis API → AI analysis service: requests analysis (evidence: `src/app/api/ai-analyze/route.ts`)
- Progress report API → AI analysis service: generates report (evidence: `src/app/api/ai-report/route.ts`)
- AI analysis service → OpenRouter: calls model API (evidence: `src/lib/ai/openrouter.ts`)
- Progress report API → Supabase: saves and fetches reports (evidence: `src/app/api/ai-report/route.ts`)
