# scott910512-source/japan architecture

> Architecture diagram of the GitHub repository scott910512-source/japan, 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/scott910512-source/japan
- Repository: https://github.com/scott910512-source/japan

## Overview

JS일본어 is a Korean-language Japanese-learning PWA. Its principal workflow starts at Home, builds a daily study plan from fresh, due, and weak material, presents study cards, records learner verdicts, and updates review progress. The product also includes a substantial JLPT N3 curriculum, listening and speaking practice, quizzes and other learning modes, progress views, and account sync. README and source-index evidence support the broad feature links; unsampled screen internals and some runtime connections are not asserted.

Main entry points: [`src/App.jsx`](https://github.com/scott910512-source/japan/blob/main/src/App.jsx) (App flow), [`src/app/useStudyQueue.js`](https://github.com/scott910512-source/japan/blob/main/src/app/useStudyQueue.js) (Study queue), [`src/app/useVerdicts.js`](https://github.com/scott910512-source/japan/blob/main/src/app/useVerdicts.js) (Study verdicts), [`src/app/useAccountSync.js`](https://github.com/scott910512-source/japan/blob/main/src/app/useAccountSync.js) (Account sync)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_app["App flow<br/>[App.jsx]"]
  node_screenmap["Feature routing<br/>[screens.js]"]
end

subgraph group_learning["Study and review"]
  node_daily["Daily planning<br/>[daily.js]"]
  node_queue["Study queue<br/>[useStudyQueue.js]"]
  node_study["Card study<br/>[Study.jsx]"]
  node_verdicts["Study verdicts<br/>[useVerdicts.js]"]
  node_review["Review engine<br/>[review.js]"]
  node_weak["Weakness tracking<br/>[weak.js]"]
  node_reviewhub["Review hub<br/>[ReviewHub.jsx]"]
end

subgraph group_courses["Courses and practice"]
  node_n3["JLPT N3 course"]
  node_n3data["N3 content"]
  node_listen["Listening practice<br/>[Listen.jsx]"]
  node_listenflow["Listening session"]
  node_speech["Speech services<br/>[tts.js]"]
  node_othermodes["Other study modes"]
end

subgraph group_state["Progress and accounts"]
  node_progress["Progress views<br/>[Log.jsx]"]
  node_storage[("Local learning data<br/>[storage.js]")]
  node_account["Account sync<br/>[useAccountSync.js]"]
end

node_learner(("Learner"))
node_supabase[("Supabase")]

node_learner -->|"opens"| node_app
node_app -->|"routes screens"| node_screenmap
node_app -->|"starts study"| node_queue
node_queue -->|"builds plan"| node_daily
node_queue -->|"opens deck"| node_study
node_study -->|"submits verdicts"| node_verdicts
node_verdicts -->|"updates memory"| node_review
node_verdicts -->|"records weakness"| node_weak
node_queue -->|"opens review"| node_reviewhub
node_reviewhub -->|"selects review"| node_queue
node_app -->|"offers course"| node_n3
node_n3 -->|"uses curriculum"| node_n3data
node_app -->|"offers listening"| node_listen
node_listen -->|"runs session"| node_listenflow
node_listenflow -->|"speaks cards"| node_speech
node_app -->|"offers practice"| node_othermodes
node_app -->|"shows progress"| node_progress
node_app -->|"loads and saves"| node_storage
node_verdicts -->|"updates streak"| node_storage
node_app -->|"coordinates account"| node_account
node_account -->|"loads vault key"| node_storage
node_account -->|"syncs account"| node_supabase

click node_app "https://github.com/scott910512-source/japan/blob/main/src/App.jsx"
click node_screenmap "https://github.com/scott910512-source/japan/blob/main/src/app/screens.js"
click node_daily "https://github.com/scott910512-source/japan/blob/main/src/lib/daily.js"
click node_queue "https://github.com/scott910512-source/japan/blob/main/src/app/useStudyQueue.js"
click node_study "https://github.com/scott910512-source/japan/blob/main/src/screens/Study.jsx"
click node_verdicts "https://github.com/scott910512-source/japan/blob/main/src/app/useVerdicts.js"
click node_review "https://github.com/scott910512-source/japan/blob/main/src/lib/review.js"
click node_weak "https://github.com/scott910512-source/japan/blob/main/src/lib/weak.js"
click node_reviewhub "https://github.com/scott910512-source/japan/blob/main/src/screens/ReviewHub.jsx"
click node_n3 "https://github.com/scott910512-source/japan/tree/main/src/screens/n3"
click node_n3data "https://github.com/scott910512-source/japan/tree/main/src/data/n3"
click node_listen "https://github.com/scott910512-source/japan/blob/main/src/screens/Listen.jsx"
click node_listenflow "https://github.com/scott910512-source/japan/blob/main/src/hooks/useListenSession.js"
click node_speech "https://github.com/scott910512-source/japan/blob/main/src/lib/tts.js"
click node_othermodes "https://github.com/scott910512-source/japan/tree/main/src/screens"
click node_progress "https://github.com/scott910512-source/japan/blob/main/src/screens/Log.jsx"
click node_storage "https://github.com/scott910512-source/japan/blob/main/src/lib/storage.js"
click node_account "https://github.com/scott910512-source/japan/blob/main/src/app/useAccountSync.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_screenmap toneBlue
class node_daily,node_queue,node_study,node_verdicts,node_review,node_weak,node_reviewhub,node_supabase toneAmber
class node_n3,node_n3data,node_listen,node_listenflow,node_speech,node_othermodes toneMint
class node_progress,node_storage,node_account toneRose
class node_learner toneIndigo
```

## Components

### App shell

- [App flow](https://github.com/scott910512-source/japan/blob/main/src/App.jsx): `src/App.jsx`
- [Feature routing](https://github.com/scott910512-source/japan/blob/main/src/app/screens.js): `src/app/screens.js`

### Study and review

- [Daily planning](https://github.com/scott910512-source/japan/blob/main/src/lib/daily.js): `src/lib/daily.js`
- [Study queue](https://github.com/scott910512-source/japan/blob/main/src/app/useStudyQueue.js): `src/app/useStudyQueue.js`
- [Card study](https://github.com/scott910512-source/japan/blob/main/src/screens/Study.jsx): `src/screens/Study.jsx`
- [Study verdicts](https://github.com/scott910512-source/japan/blob/main/src/app/useVerdicts.js): `src/app/useVerdicts.js`
- [Review engine](https://github.com/scott910512-source/japan/blob/main/src/lib/review.js): `src/lib/review.js`
- [Weakness tracking](https://github.com/scott910512-source/japan/blob/main/src/lib/weak.js): `src/lib/weak.js`
- [Review hub](https://github.com/scott910512-source/japan/blob/main/src/screens/ReviewHub.jsx): `src/screens/ReviewHub.jsx`

### Courses and practice

- [JLPT N3 course](https://github.com/scott910512-source/japan/tree/main/src/screens/n3): `src/screens/n3`
- [N3 content](https://github.com/scott910512-source/japan/tree/main/src/data/n3): `src/data/n3`
- [Listening practice](https://github.com/scott910512-source/japan/blob/main/src/screens/Listen.jsx): `src/screens/Listen.jsx`
- [Listening session](https://github.com/scott910512-source/japan/blob/main/src/hooks/useListenSession.js): `src/hooks/useListenSession.js`
- [Speech services](https://github.com/scott910512-source/japan/blob/main/src/lib/tts.js): `src/lib/tts.js`
- [Other study modes](https://github.com/scott910512-source/japan/tree/main/src/screens): `src/screens`

### Progress and accounts

- [Progress views](https://github.com/scott910512-source/japan/blob/main/src/screens/Log.jsx): `src/screens/Log.jsx`
- [Local learning data](https://github.com/scott910512-source/japan/blob/main/src/lib/storage.js): `src/lib/storage.js`
- [Account sync](https://github.com/scott910512-source/japan/blob/main/src/app/useAccountSync.js): `src/app/useAccountSync.js`

### Other components

- **Learner**
- **Supabase**

## Connections

- Learner → App flow: opens (evidence: `README.md`)
- App flow → Feature routing: routes screens (evidence: `src/App.jsx`)
- App flow → Study queue: starts study (evidence: `README.md`)
- Study queue → Daily planning: builds plan (evidence: `src/app/useStudyQueue.js`)
- Study queue → Card study: opens deck (evidence: `README.md`)
- Card study → Study verdicts: submits verdicts (evidence: `README.md`)
- Study verdicts → Review engine: updates memory (evidence: `src/app/useVerdicts.js`)
- Study verdicts → Weakness tracking: records weakness (evidence: `src/app/useVerdicts.js`)
- Study queue → Review hub: opens review (evidence: `src/app/useStudyQueue.js`)
- Review hub → Study queue: selects review (evidence: `README.md`)
- App flow → JLPT N3 course: offers course (evidence: `README.md`)
- JLPT N3 course → N3 content: uses curriculum (evidence: `README.md`)
- App flow → Listening practice: offers listening (evidence: `README.md`)
- Listening practice → Listening session: runs session (evidence: `src/hooks/useListenSession.js`)
- Listening session → Speech services: speaks cards (evidence: `src/hooks/useListenSession.js`)
- App flow → Other study modes: offers practice (evidence: `README.md`)
- App flow → Progress views: shows progress (evidence: `README.md`)
- App flow → Local learning data: loads and saves (evidence: `README.md`)
- Study verdicts → Local learning data: updates streak (evidence: `src/app/useVerdicts.js`)
- App flow → Account sync: coordinates account (evidence: `src/App.jsx`)
- Account sync → Local learning data: loads vault key (evidence: `src/app/useAccountSync.js`)
- Account sync → Supabase: syncs account (evidence: `README.md`)
