# andycheng0224/radiographer-exam-bank architecture

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

- Interactive diagram: https://gitdiagram.com/andycheng0224/radiographer-exam-bank
- Repository: https://github.com/andycheng0224/radiographer-exam-bank

## Overview

This is a React-based radiographer exam question bank. The main learner workflow is to choose a subject and year range, load matching questions, take a timed quiz, review the result, and continue with saved wrong or bookmarked questions. Browser storage supports drafts and study records; growth and recommendations provide a separate progress-tracking branch. The excerpts and source index establish the main route, data, scoring, and storage links; some unsampled page internals are represented at page level.

Main entry points: [`src/App.jsx`](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/App.jsx) (SPA router), [`src/utils/storageUtils.js`](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/storageUtils.js) (Study record storage), [`src/utils/questionDataLoader.js`](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/questionDataLoader.js) (Question data loader), [`src/pages/QuizPage.jsx`](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/QuizPage.jsx) (Timed quiz)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application routes"]
  node_router["SPA router<br/>[App.jsx]"]
  node_home["Question bank home<br/>[HomePage.jsx]"]
  node_exam_catalog["Exam catalog"]
  node_public_info["Public info pages<br/>[PublicInfoPage.jsx]"]
  node_settings["Settings<br/>[SettingsPage.jsx]"]
end

subgraph group_study["Exam practice"]
  node_quiz["Timed quiz<br/>[QuizPage.jsx]"]
  node_quiz_session["Quiz draft state"]
  node_scoring["Scoring and answers<br/>[quizUtils.js]"]
  node_result["Quiz results<br/>[ResultPage.jsx]"]
  node_question_detail["Question detail"]
  node_question_display["Question rendering"]
end

subgraph group_review["Review and progress"]
  node_wrong_book["Wrong book<br/>[WrongBookPage.jsx]"]
  node_bookmarks["Bookmarked questions<br/>[BookmarkPage.jsx]"]
  node_review_select["Review selection"]
  node_review_quiz["Wrong-question quiz"]
  node_review_result["Review results"]
  node_wrong_review_logic["Review question logic"]
  node_growth["Growth dashboard<br/>[GrowthPage.jsx]"]
  node_growth_logic["Study analytics<br/>[growthUtils.js]"]
  node_recommendations["Study recommendations"]
end

subgraph group_data["Question data"]
  node_data_loader["Question data loader"]
  node_static_data[("Static question files")]
  node_subjects["Subject definitions<br/>[subjects.js]"]
  node_subject_utils["Subject normalization<br/>[subjectUtils.js]"]
end

subgraph group_shared["Shared services"]
  node_storage[("Study record storage<br/>[storageUtils.js]")]
  node_browser_storage[("Browser localStorage<br/>[browserStorage.js]")]
  node_shared_ui["Shared navigation UI<br/>[Navbar.jsx]"]
  node_back_link["Back navigation<br/>[BackLink.jsx]"]
end

node_learner(("Learner"))

node_learner -->|"opens routes"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_exam_catalog
node_router -->|"routes to"| node_public_info
node_router -->|"routes to"| node_settings
node_router -->|"routes to"| node_quiz
node_router -->|"routes to"| node_result
node_router -->|"routes to"| node_question_detail
node_router -->|"routes to"| node_wrong_book
node_router -->|"routes to"| node_bookmarks
node_router -->|"routes to"| node_review_select
node_router -->|"routes to"| node_review_quiz
node_router -->|"routes to"| node_review_result
node_router -->|"routes to"| node_growth
node_home -->|"loads metadata"| node_data_loader
node_home -->|"reads study stats"| node_storage
node_quiz -->|"loads questions"| node_data_loader
node_quiz -->|"calculates results"| node_scoring
node_quiz -->|"saves draft"| node_quiz_session
node_quiz -->|"records answers"| node_storage
node_result -->|"uses scoring"| node_scoring
node_result -->|"reads records"| node_storage
node_question_detail -->|"loads question"| node_data_loader
node_question_detail -->|"renders question"| node_question_display
node_wrong_book -->|"resolves questions"| node_data_loader
node_wrong_book -->|"reads wrong records"| node_storage
node_bookmarks -->|"resolves questions"| node_data_loader
node_bookmarks -->|"reads bookmarks"| node_storage
node_review_select -->|"selects questions"| node_wrong_review_logic
node_review_quiz -->|"builds review set"| node_wrong_review_logic
node_review_quiz -->|"loads questions"| node_data_loader
node_review_quiz -->|"calculates results"| node_scoring
node_review_quiz -->|"records answers"| node_storage
node_review_result -->|"reads records"| node_storage
node_growth -->|"summarizes activity"| node_growth_logic
node_growth -->|"gets guidance"| node_recommendations
node_growth_logic -->|"reads study history"| node_storage
node_data_loader -->|"fetches JSON"| node_static_data
node_data_loader -->|"normalizes subjects"| node_subjects
node_data_loader -->|"normalizes keys"| node_subject_utils
node_storage -->|"reads and writes"| node_browser_storage
node_quiz -->|"renders questions"| node_question_display
node_quiz -->|"uses navigation"| node_shared_ui
node_home -->|"uses navigation"| node_shared_ui
node_wrong_review_logic -->|"reads review data"| node_storage

click node_router "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/App.jsx"
click node_home "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/HomePage.jsx"
click node_exam_catalog "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/ExamCatalogPage.jsx"
click node_public_info "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/PublicInfoPage.jsx"
click node_settings "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/SettingsPage.jsx"
click node_quiz "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/QuizPage.jsx"
click node_quiz_session "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/quizSessionUtils.js"
click node_scoring "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/quizUtils.js"
click node_result "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/ResultPage.jsx"
click node_question_detail "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/QuestionDetailPage.jsx"
click node_question_display "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/components/QuestionContent.jsx"
click node_wrong_book "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/WrongBookPage.jsx"
click node_bookmarks "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/BookmarkPage.jsx"
click node_review_select "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/WrongReviewSelectPage.jsx"
click node_review_quiz "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/WrongReviewQuizPage.jsx"
click node_review_result "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/WrongReviewResultPage.jsx"
click node_wrong_review_logic "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/wrongReviewUtils.js"
click node_growth "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/GrowthPage.jsx"
click node_growth_logic "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/growthUtils.js"
click node_recommendations "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/recommendationUtils.js"
click node_data_loader "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/questionDataLoader.js"
click node_subjects "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/constants/subjects.js"
click node_subject_utils "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/subjectUtils.js"
click node_storage "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/storageUtils.js"
click node_browser_storage "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/browserStorage.js"
click node_shared_ui "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/components/Navbar.jsx"
click node_back_link "https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/components/BackLink.jsx"

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_router,node_home,node_exam_catalog,node_public_info,node_settings toneBlue
class node_quiz,node_quiz_session,node_scoring,node_result,node_question_detail,node_question_display toneAmber
class node_wrong_book,node_bookmarks,node_review_select,node_review_quiz,node_review_result,node_wrong_review_logic,node_growth,node_growth_logic,node_recommendations toneMint
class node_data_loader,node_static_data,node_subjects,node_subject_utils toneRose
class node_storage,node_browser_storage,node_shared_ui,node_back_link,node_learner toneIndigo
```

## Components

### Application routes

- [SPA router](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/App.jsx): `src/App.jsx`
- [Question bank home](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/HomePage.jsx): `src/pages/HomePage.jsx`
- [Exam catalog](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/ExamCatalogPage.jsx): `src/pages/ExamCatalogPage.jsx`
- [Public info pages](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/PublicInfoPage.jsx): `src/pages/PublicInfoPage.jsx`
- [Settings](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/SettingsPage.jsx): `src/pages/SettingsPage.jsx`

### Exam practice

- [Timed quiz](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/QuizPage.jsx): `src/pages/QuizPage.jsx`
- [Quiz draft state](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/quizSessionUtils.js): `src/utils/quizSessionUtils.js`
- [Scoring and answers](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/quizUtils.js): `src/utils/quizUtils.js`
- [Quiz results](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/ResultPage.jsx): `src/pages/ResultPage.jsx`
- [Question detail](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/QuestionDetailPage.jsx): `src/pages/QuestionDetailPage.jsx`
- [Question rendering](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/components/QuestionContent.jsx): `src/components/QuestionContent.jsx`

### Review and progress

- [Wrong book](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/WrongBookPage.jsx): `src/pages/WrongBookPage.jsx`
- [Bookmarked questions](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/BookmarkPage.jsx): `src/pages/BookmarkPage.jsx`
- [Review selection](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/WrongReviewSelectPage.jsx): `src/pages/WrongReviewSelectPage.jsx`
- [Wrong-question quiz](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/WrongReviewQuizPage.jsx): `src/pages/WrongReviewQuizPage.jsx`
- [Review results](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/WrongReviewResultPage.jsx): `src/pages/WrongReviewResultPage.jsx`
- [Review question logic](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/wrongReviewUtils.js): `src/utils/wrongReviewUtils.js`
- [Growth dashboard](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/pages/GrowthPage.jsx): `src/pages/GrowthPage.jsx`
- [Study analytics](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/growthUtils.js): `src/utils/growthUtils.js`
- [Study recommendations](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/recommendationUtils.js): `src/utils/recommendationUtils.js`

### Question data

- [Question data loader](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/questionDataLoader.js): `src/utils/questionDataLoader.js`
- **Static question files**
- [Subject definitions](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/constants/subjects.js): `src/constants/subjects.js`
- [Subject normalization](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/subjectUtils.js): `src/utils/subjectUtils.js`

### Shared services

- [Study record storage](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/storageUtils.js): `src/utils/storageUtils.js`
- [Browser localStorage](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/utils/browserStorage.js): `src/utils/browserStorage.js`
- [Shared navigation UI](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Back navigation](https://github.com/andycheng0224/radiographer-exam-bank/blob/main/src/components/BackLink.jsx): `src/components/BackLink.jsx`

### Other components

- **Learner**

## Connections

- Learner → SPA router: opens routes (evidence: `src/App.jsx`)
- SPA router → Question bank home: routes to (evidence: `src/App.jsx`)
- SPA router → Exam catalog: routes to (evidence: `src/App.jsx`)
- SPA router → Public info pages: routes to (evidence: `src/App.jsx`)
- SPA router → Settings: routes to (evidence: `src/App.jsx`)
- SPA router → Timed quiz: routes to (evidence: `src/App.jsx`)
- SPA router → Quiz results: routes to (evidence: `src/App.jsx`)
- SPA router → Question detail: routes to (evidence: `src/App.jsx`)
- SPA router → Wrong book: routes to (evidence: `src/App.jsx`)
- SPA router → Bookmarked questions: routes to (evidence: `src/App.jsx`)
- SPA router → Review selection: routes to (evidence: `src/App.jsx`)
- SPA router → Wrong-question quiz: routes to (evidence: `src/App.jsx`)
- SPA router → Review results: routes to (evidence: `src/App.jsx`)
- SPA router → Growth dashboard: routes to (evidence: `src/App.jsx`)
- Question bank home → Question data loader: loads metadata (evidence: `src/pages/HomePage.jsx`)
- Question bank home → Study record storage: reads study stats (evidence: `src/pages/HomePage.jsx`)
- Timed quiz → Question data loader: loads questions (evidence: `src/pages/QuizPage.jsx`)
- Timed quiz → Scoring and answers: calculates results (evidence: `src/pages/QuizPage.jsx`)
- Timed quiz → Quiz draft state: saves draft (evidence: `src/pages/QuizPage.jsx`)
- Timed quiz → Study record storage: records answers (evidence: `src/pages/QuizPage.jsx`)
- Quiz results → Scoring and answers: uses scoring (evidence: `src/pages/ResultPage.jsx`)
- Quiz results → Study record storage: reads records (evidence: `src/pages/ResultPage.jsx`)
- Question detail → Question data loader: loads question (evidence: `src/pages/QuestionDetailPage.jsx`)
- Question detail → Question rendering: renders question (evidence: `src/pages/QuestionDetailPage.jsx`)
- Wrong book → Question data loader: resolves questions (evidence: `src/pages/WrongBookPage.jsx`)
- Wrong book → Study record storage: reads wrong records (evidence: `src/pages/WrongBookPage.jsx`)
- Bookmarked questions → Question data loader: resolves questions (evidence: `src/pages/BookmarkPage.jsx`)
- Bookmarked questions → Study record storage: reads bookmarks (evidence: `src/pages/BookmarkPage.jsx`)
- Review selection → Review question logic: selects questions (evidence: `src/pages/WrongReviewSelectPage.jsx`)
- Wrong-question quiz → Review question logic: builds review set (evidence: `src/pages/WrongReviewQuizPage.jsx`)
- Wrong-question quiz → Question data loader: loads questions (evidence: `src/pages/WrongReviewQuizPage.jsx`)
- Wrong-question quiz → Scoring and answers: calculates results (evidence: `src/pages/WrongReviewQuizPage.jsx`)
- Wrong-question quiz → Study record storage: records answers (evidence: `src/pages/WrongReviewQuizPage.jsx`)
- Review results → Study record storage: reads records (evidence: `src/pages/WrongReviewResultPage.jsx`)
- Growth dashboard → Study analytics: summarizes activity (evidence: `src/pages/GrowthPage.jsx`)
- Growth dashboard → Study recommendations: gets guidance (evidence: `src/pages/GrowthPage.jsx`)
- Study analytics → Study record storage: reads study history (evidence: `src/utils/growthUtils.js`)
- Question data loader → Static question files: fetches JSON (evidence: `README.md`)
- Question data loader → Subject definitions: normalizes subjects (evidence: `src/utils/questionDataLoader.js`)
- Question data loader → Subject normalization: normalizes keys (evidence: `src/utils/questionDataLoader.js`)
- Study record storage → Browser localStorage: reads and writes (evidence: `src/utils/storageUtils.js`)
- Timed quiz → Question rendering: renders questions (evidence: `src/pages/QuizPage.jsx`)
- Timed quiz → Shared navigation UI: uses navigation (evidence: `src/pages/QuizPage.jsx`)
- Question bank home → Shared navigation UI: uses navigation (evidence: `src/pages/HomePage.jsx`)
- Review question logic → Study record storage: reads review data (evidence: `src/utils/wrongReviewUtils.js`)
