# mammut001/qwerty-learner architecture

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

- Interactive diagram: https://gitdiagram.com/mammut001/qwerty-learner
- Repository: https://github.com/mammut001/qwerty-learner
- Video tour (about a minute): https://gitdiagram.com/mammut001/qwerty-learner/video

## Overview

Qwerty Français is a French-learning and TCF Canada preparation app. Learners practice vocabulary by typing or tapping, study grammar and levels, take placement tests and TCF mock exams, and track progress through a study plan and review tools. The frontend stores practice records locally and can sync study-plan data to a backend; account, moderation, and admin features support that workflow. Backend implementation details are only partly sampled, so unsampled subsystem links are omitted unless documented in the README or source index.

Main entry points: [`deploy/worker.mjs`](https://github.com/mammut001/qwerty-learner/blob/master/deploy/worker.mjs) (Study API routing), [`src/pages/Typing/index.tsx`](https://github.com/mammut001/qwerty-learner/blob/master/src/pages/Typing/index.tsx) (Typing practice), [`src/services/studyPlanSync.ts`](https://github.com/mammut001/qwerty-learner/blob/master/src/services/studyPlanSync.ts) (Study-plan sync), [`src/pages/StudyPlan/index.tsx`](https://github.com/mammut001/qwerty-learner/blob/master/src/pages/StudyPlan/index.tsx) (Study plan)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_practice["Practice and vocabulary"]
  node_typing["Typing practice<br/>[index.tsx]"]
  node_tap["Tap practice<br/>[index.tsx]"]
  node_dictionary["Dictionary<br/>[index.tsx]"]
  node_wordlists["Word lists<br/>[wordListFetcher.ts]"]
  node_pronunciation["Pronunciation"]
  node_localrecords[("Practice records<br/>[index.ts]")]
end

subgraph group_learning["Courses and assessment"]
  node_placement["Placement test<br/>[index.tsx]"]
  node_levels["Level courses<br/>[index.tsx]"]
  node_grammar["Grammar and tenses<br/>[index.tsx]"]
  node_conjugation["Conjugation practice<br/>[index.tsx]"]
  node_tcf["TCF mock exams<br/>[index.tsx]"]
end

subgraph group_progress["Progress and study plan"]
  node_planui["Study plan<br/>[index.tsx]"]
  node_analytics["Progress and reports<br/>[index.tsx]"]
  node_errorbook["Error book and reviews<br/>[index.tsx]"]
end

subgraph group_platform["Accounts and services"]
  node_sync["Study-plan sync<br/>[studyPlanSync.ts]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_profile[("Local learner profile<br/>[localProfile.ts]")]
end

subgraph group_backend["Study backend and admin"]
  node_api["Study API routing<br/>[worker.mjs]"]
  node_model["Study state model<br/>[study-model.mjs]"]
  node_features["Study features<br/>[study-features.mjs]"]
  node_echelledata["Échelle content<br/>[echelle-data.mjs]"]
  node_ai["AI scoring"]
  node_admin["Admin and cohorts<br/>[study-admin.mjs]"]
  node_cohorts[("Cohort management<br/>[study-cohorts.mjs]")]
end

node_learner(("Learner"))

node_learner -->|"practices vocabulary"| node_typing
node_learner -->|"practices without keyboard"| node_tap
node_learner -->|"looks up words"| node_dictionary
node_typing -->|"loads word lists"| node_wordlists
node_typing -->|"saves practice"| node_localrecords
node_learner -->|"plays word audio"| node_pronunciation
node_learner -->|"takes placement test"| node_placement
node_learner -->|"studies level content"| node_levels
node_learner -->|"practices grammar"| node_grammar
node_learner -->|"practices verbs"| node_conjugation
node_learner -->|"takes mock exams"| node_tcf
node_learner -->|"follows study plan"| node_planui
node_learner -->|"reviews progress"| node_analytics
node_learner -->|"reviews mistakes"| node_errorbook
node_planui -->|"syncs study state"| node_sync
node_sync -->|"uses learner profile"| node_profile
node_sync -->|"sends sync requests"| node_api
node_auth -->|"identifies learner"| node_profile
node_api -->|"normalizes state"| node_model
node_model -->|"supplies study summaries"| node_features
node_ai -->|"uses scoring content"| node_echelledata
node_admin -->|"manages cohorts"| node_cohorts
node_api -->|"routes admin requests"| node_admin
node_api -->|"requests AI scoring"| node_ai

click node_typing "https://github.com/mammut001/qwerty-learner/blob/master/src/pages/Typing/index.tsx"
click node_tap "https://github.com/mammut001/qwerty-learner/blob/master/src/pages/Tap/index.tsx"
click node_dictionary "https://github.com/mammut001/qwerty-learner/blob/master/src/pages/Dictionary/index.tsx"
click node_wordlists "https://github.com/mammut001/qwerty-learner/blob/master/src/utils/wordListFetcher.ts"
click node_pronunciation "https://github.com/mammut001/qwerty-learner/blob/master/src/hooks/usePronunciation.ts"
click node_localrecords "https://github.com/mammut001/qwerty-learner/blob/master/src/utils/db/index.ts"
click node_placement "https://github.com/mammut001/qwerty-learner/blob/master/src/pages/PlacementTest/index.tsx"
click node_levels "https://github.com/mammut001/qwerty-learner/blob/master/src/pages/LevelDetail/index.tsx"
click node_grammar "https://github.com/mammut001/qwerty-learner/blob/master/src/pages/GrammarSession/index.tsx"
click node_conjugation "https://github.com/mammut001/qwerty-learner/blob/master/src/pages/Conjugation/index.tsx"
click node_tcf "https://github.com/mammut001/qwerty-learner/blob/master/src/pages/TcfHub/index.tsx"
click node_planui "https://github.com/mammut001/qwerty-learner/blob/master/src/pages/StudyPlan/index.tsx"
click node_analytics "https://github.com/mammut001/qwerty-learner/blob/master/src/pages/Analysis/index.tsx"
click node_errorbook "https://github.com/mammut001/qwerty-learner/blob/master/src/pages/ErrorBook/index.tsx"
click node_sync "https://github.com/mammut001/qwerty-learner/blob/master/src/services/studyPlanSync.ts"
click node_auth "https://github.com/mammut001/qwerty-learner/blob/master/src/services/auth.ts"
click node_profile "https://github.com/mammut001/qwerty-learner/blob/master/src/services/localProfile.ts"
click node_api "https://github.com/mammut001/qwerty-learner/blob/master/deploy/worker.mjs"
click node_model "https://github.com/mammut001/qwerty-learner/blob/master/server/study-model.mjs"
click node_features "https://github.com/mammut001/qwerty-learner/blob/master/server/study-features.mjs"
click node_echelledata "https://github.com/mammut001/qwerty-learner/blob/master/server/echelle-data.mjs"
click node_ai "https://github.com/mammut001/qwerty-learner/blob/master/server/echelle-ai-harness.mjs"
click node_admin "https://github.com/mammut001/qwerty-learner/blob/master/server/study-admin.mjs"
click node_cohorts "https://github.com/mammut001/qwerty-learner/blob/master/server/study-cohorts.mjs"

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_typing,node_tap,node_dictionary,node_wordlists,node_pronunciation,node_localrecords toneBlue
class node_placement,node_levels,node_grammar,node_conjugation,node_tcf toneAmber
class node_planui,node_analytics,node_errorbook toneMint
class node_sync,node_auth,node_profile toneRose
class node_api,node_model,node_features,node_echelledata,node_ai,node_admin,node_cohorts,node_learner toneIndigo
```

## Components

### Practice and vocabulary

- [Typing practice](https://github.com/mammut001/qwerty-learner/blob/master/src/pages/Typing/index.tsx): `src/pages/Typing/index.tsx`
- [Tap practice](https://github.com/mammut001/qwerty-learner/blob/master/src/pages/Tap/index.tsx): `src/pages/Tap/index.tsx`
- [Dictionary](https://github.com/mammut001/qwerty-learner/blob/master/src/pages/Dictionary/index.tsx): `src/pages/Dictionary/index.tsx`
- [Word lists](https://github.com/mammut001/qwerty-learner/blob/master/src/utils/wordListFetcher.ts): `src/utils/wordListFetcher.ts`
- [Pronunciation](https://github.com/mammut001/qwerty-learner/blob/master/src/hooks/usePronunciation.ts): `src/hooks/usePronunciation.ts`
- [Practice records](https://github.com/mammut001/qwerty-learner/blob/master/src/utils/db/index.ts): `src/utils/db/index.ts`

### Courses and assessment

- [Placement test](https://github.com/mammut001/qwerty-learner/blob/master/src/pages/PlacementTest/index.tsx): `src/pages/PlacementTest/index.tsx`
- [Level courses](https://github.com/mammut001/qwerty-learner/blob/master/src/pages/LevelDetail/index.tsx): `src/pages/LevelDetail/index.tsx`
- [Grammar and tenses](https://github.com/mammut001/qwerty-learner/blob/master/src/pages/GrammarSession/index.tsx): `src/pages/GrammarSession/index.tsx`
- [Conjugation practice](https://github.com/mammut001/qwerty-learner/blob/master/src/pages/Conjugation/index.tsx): `src/pages/Conjugation/index.tsx`
- [TCF mock exams](https://github.com/mammut001/qwerty-learner/blob/master/src/pages/TcfHub/index.tsx): `src/pages/TcfHub/index.tsx`

### Progress and study plan

- [Study plan](https://github.com/mammut001/qwerty-learner/blob/master/src/pages/StudyPlan/index.tsx): `src/pages/StudyPlan/index.tsx`
- [Progress and reports](https://github.com/mammut001/qwerty-learner/blob/master/src/pages/Analysis/index.tsx): `src/pages/Analysis/index.tsx`
- [Error book and reviews](https://github.com/mammut001/qwerty-learner/blob/master/src/pages/ErrorBook/index.tsx): `src/pages/ErrorBook/index.tsx`

### Accounts and services

- [Study-plan sync](https://github.com/mammut001/qwerty-learner/blob/master/src/services/studyPlanSync.ts): `src/services/studyPlanSync.ts`
- [Authentication](https://github.com/mammut001/qwerty-learner/blob/master/src/services/auth.ts): `src/services/auth.ts`
- [Local learner profile](https://github.com/mammut001/qwerty-learner/blob/master/src/services/localProfile.ts): `src/services/localProfile.ts`

### Study backend and admin

- [Study API routing](https://github.com/mammut001/qwerty-learner/blob/master/deploy/worker.mjs): `deploy/worker.mjs`
- [Study state model](https://github.com/mammut001/qwerty-learner/blob/master/server/study-model.mjs): `server/study-model.mjs`
- [Study features](https://github.com/mammut001/qwerty-learner/blob/master/server/study-features.mjs): `server/study-features.mjs`
- [Échelle content](https://github.com/mammut001/qwerty-learner/blob/master/server/echelle-data.mjs): `server/echelle-data.mjs`
- [AI scoring](https://github.com/mammut001/qwerty-learner/blob/master/server/echelle-ai-harness.mjs): `server/echelle-ai-harness.mjs`
- [Admin and cohorts](https://github.com/mammut001/qwerty-learner/blob/master/server/study-admin.mjs): `server/study-admin.mjs`
- [Cohort management](https://github.com/mammut001/qwerty-learner/blob/master/server/study-cohorts.mjs): `server/study-cohorts.mjs`

### Other components

- **Learner**

## Connections

- Learner → Typing practice: practices vocabulary (evidence: `README.md`)
- Learner → Tap practice: practices without keyboard (evidence: `README.md`)
- Learner → Dictionary: looks up words (evidence: `README.md`)
- Typing practice → Word lists: loads word lists
- Typing practice → Practice records: saves practice (evidence: `src/utils/db/index.ts`)
- Learner → Pronunciation: plays word audio (evidence: `README.md`)
- Learner → Placement test: takes placement test (evidence: `README.md`)
- Learner → Level courses: studies level content (evidence: `README.md`)
- Learner → Grammar and tenses: practices grammar (evidence: `README.md`)
- Learner → Conjugation practice: practices verbs (evidence: `README.md`)
- Learner → TCF mock exams: takes mock exams (evidence: `README.md`)
- Learner → Study plan: follows study plan (evidence: `README.md`)
- Learner → Progress and reports: reviews progress (evidence: `README.md`)
- Learner → Error book and reviews: reviews mistakes (evidence: `README.md`)
- Study plan → Study-plan sync: syncs study state
- Study-plan sync → Local learner profile: uses learner profile (evidence: `src/services/studyPlanSync.ts`)
- Study-plan sync → Study API routing: sends sync requests (evidence: `README.md`)
- Authentication → Local learner profile: identifies learner (evidence: `src/components/AuthGate.tsx`)
- Study API routing → Study state model: normalizes state (evidence: `deploy/worker.mjs`)
- Study state model → Study features: supplies study summaries (evidence: `deploy/study-worker-features.mjs`)
- AI scoring → Échelle content: uses scoring content (evidence: `server/echelle-ai-harness.mjs`)
- Admin and cohorts → Cohort management: manages cohorts (evidence: `server/study-admin.mjs`)
- Study API routing → Admin and cohorts: routes admin requests (evidence: `deploy/worker.mjs`)
- Study API routing → AI scoring: requests AI scoring (evidence: `deploy/worker.mjs`)
