# ntcandra/hr-ai-mastery architecture

> Architecture diagram of the GitHub repository ntcandra/hr-ai-mastery, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ntcandra/hr-ai-mastery
- Repository: https://github.com/ntcandra/hr-ai-mastery

## Overview

This is a bilingual AI-learning app: users browse courses, study course material and modules, take quizzes, then review results and learning progress. The sampled source confirms route dispatch, course-detail data access, quiz-session behavior, and progress persistence; several page implementations were not sampled, so their internal wiring is left unspecified.

Main entry points: [`src/App.tsx`](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/App.tsx) (App router), [`src/pages/CourseDetailPage.tsx`](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/CourseDetailPage.tsx) (Course detail), [`src/pages/SmartChapterPage.tsx`](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/SmartChapterPage.tsx) (Module study), [`src/hooks/useProgress.ts`](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/hooks/useProgress.ts) (Progress hook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["App router<br/>[App.tsx]"]
  node_layout["Shared layout<br/>[Layout.tsx]"]
  node_home["Home page<br/>[HomePage.tsx]"]
end

subgraph group_learning["Learning content"]
  node_track["Learning track"]
  node_courses["Course catalog<br/>[CoursesPage.tsx]"]
  node_course["Course detail"]
  node_chapter["Module study"]
  node_reader["Module reader"]
  node_content["Learning content"]
  node_subjects["Subject catalog<br/>[subjects.ts]"]
end

subgraph group_assessment["Quizzes"]
  node_quizpage["Quiz page<br/>[QuizPage.tsx]"]
  node_session["Quiz session<br/>[QuizSession.tsx]"]
  node_questionbank["Question bank<br/>[questions.ts]"]
  node_results["Quiz results<br/>[ResultsPage.tsx]"]
end

subgraph group_progress["Progress tracking"]
  node_progresspage["Progress view<br/>[ProgressPage.tsx]"]
  node_progresshook["Progress hook<br/>[useProgress.ts]"]
  node_storage[("Local progress<br/>[storage.ts]")]
end

node_learner(("Learner"))

node_learner -->|"opens"| node_app
node_app -->|"wraps routes"| node_layout
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_track
node_app -->|"routes to"| node_courses
node_app -->|"routes to"| node_course
node_app -->|"routes to"| node_chapter
node_app -->|"routes to"| node_quizpage
node_app -->|"routes to"| node_results
node_app -->|"routes to"| node_progresspage
node_course -->|"reads subjects"| node_subjects
node_course -->|"reads course content"| node_content
node_course -->|"gets questions"| node_questionbank
node_course -->|"reads progress"| node_progresshook
node_chapter -->|"presents module"| node_reader
node_progresshook -->|"reads and writes"| node_storage

click node_app "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/App.tsx"
click node_layout "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/components/Layout.tsx"
click node_home "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/HomePage.tsx"
click node_track "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/LearningTrackPage.tsx"
click node_courses "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/CoursesPage.tsx"
click node_course "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/CourseDetailPage.tsx"
click node_chapter "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/SmartChapterPage.tsx"
click node_reader "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/components/SmartChapterReader.tsx"
click node_content "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/data/learning-content.ts"
click node_subjects "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/data/subjects.ts"
click node_quizpage "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/QuizPage.tsx"
click node_session "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/components/QuizSession.tsx"
click node_questionbank "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/data/questions.ts"
click node_results "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/ResultsPage.tsx"
click node_progresspage "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/ProgressPage.tsx"
click node_progresshook "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/hooks/useProgress.ts"
click node_storage "https://github.com/ntcandra/hr-ai-mastery/blob/main/src/utils/storage.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_app,node_layout,node_home toneBlue
class node_track,node_courses,node_course,node_chapter,node_reader,node_content,node_subjects toneAmber
class node_quizpage,node_session,node_questionbank,node_results toneMint
class node_progresspage,node_progresshook,node_storage toneRose
class node_learner toneIndigo
```

## Components

### App navigation

- [App router](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/App.tsx): `src/App.tsx`
- [Shared layout](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/components/Layout.tsx): `src/components/Layout.tsx`
- [Home page](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/HomePage.tsx): `src/pages/HomePage.tsx`

### Learning content

- [Learning track](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/LearningTrackPage.tsx): `src/pages/LearningTrackPage.tsx`
- [Course catalog](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/CoursesPage.tsx): `src/pages/CoursesPage.tsx`
- [Course detail](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/CourseDetailPage.tsx): `src/pages/CourseDetailPage.tsx`
- [Module study](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/SmartChapterPage.tsx): `src/pages/SmartChapterPage.tsx`
- [Module reader](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/components/SmartChapterReader.tsx): `src/components/SmartChapterReader.tsx`
- [Learning content](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/data/learning-content.ts): `src/data/learning-content.ts`
- [Subject catalog](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/data/subjects.ts): `src/data/subjects.ts`

### Quizzes

- [Quiz page](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/QuizPage.tsx): `src/pages/QuizPage.tsx`
- [Quiz session](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/components/QuizSession.tsx): `src/components/QuizSession.tsx`
- [Question bank](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/data/questions.ts): `src/data/questions.ts`
- [Quiz results](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/ResultsPage.tsx): `src/pages/ResultsPage.tsx`

### Progress tracking

- [Progress view](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/pages/ProgressPage.tsx): `src/pages/ProgressPage.tsx`
- [Progress hook](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/hooks/useProgress.ts): `src/hooks/useProgress.ts`
- [Local progress](https://github.com/ntcandra/hr-ai-mastery/blob/main/src/utils/storage.ts): `src/utils/storage.ts`

### Other components

- **Learner**

## Connections

- Learner → App router: opens
- App router → Shared layout: wraps routes
- App router → Home page: routes to
- App router → Learning track: routes to
- App router → Course catalog: routes to
- App router → Course detail: routes to
- App router → Module study: routes to
- App router → Quiz page: routes to
- App router → Quiz results: routes to
- App router → Progress view: routes to
- Course detail → Subject catalog: reads subjects
- Course detail → Learning content: reads course content
- Course detail → Question bank: gets questions
- Course detail → Progress hook: reads progress
- Module study → Module reader: presents module
- Progress hook → Local progress: reads and writes
