# madhan369/java-quiz-mastery architecture

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

- Interactive diagram: https://gitdiagram.com/madhan369/java-quiz-mastery
- Repository: https://github.com/madhan369/java-quiz-mastery

## Overview

TechQuiz Mastery is a browser-based Java knowledge quiz. Learners choose a topic and session length, answer randomized questions with immediate explanations, then see results and review answers. The single JavaScript module implements the quiz workflow, review filters, keyboard navigation, theme preference, and canvas confetti; HTML and CSS provide the page and presentation. Source excerpts are partial, so links for theme persistence, visual styling, and some setup details are not asserted beyond README documentation.

Main entry points: [`script.js`](https://github.com/madhan369/java-quiz-mastery/blob/main/script.js) (Quiz state and flow), [`index.html`](https://github.com/madhan369/java-quiz-mastery/blob/main/index.html) (Quiz page), [`style.css`](https://github.com/madhan369/java-quiz-mastery/blob/main/style.css) (Themes and layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_quiz["Quiz experience"]
  node_quiz_logic["Quiz state and flow<br/>[script.js]"]
  node_question_bank["Question bank<br/>[script.js]"]
  node_keyboard["Keyboard navigation<br/>[script.js]"]
end

subgraph group_feedback["Results and feedback"]
  node_answer_feedback["Answer feedback<br/>[script.js]"]
  node_score_results["Score results<br/>[script.js]"]
  node_answer_review["Answer review<br/>[script.js]"]
  node_confetti["Confetti animation<br/>[script.js]"]
end

subgraph group_presentation["Presentation"]
  node_page["Quiz page<br/>[index.html]"]
  node_styles["Themes and layout<br/>[style.css]"]
  node_theme_preference["Theme preference<br/>[script.js]"]
end

node_learner(("Learner"))
node_browser_storage[("Browser localStorage")]

node_learner -->|"uses"| node_page
node_page -.->|"loads"| node_quiz_logic
node_learner -->|"selects and answers"| node_quiz_logic
node_quiz_logic -->|"selects questions"| node_question_bank
node_quiz_logic -->|"submits answers"| node_answer_feedback
node_quiz_logic -->|"ends quiz"| node_score_results
node_score_results -->|"builds history"| node_answer_review
node_learner -->|"filters answers"| node_answer_review
node_score_results -.->|"celebrates high score"| node_confetti
node_learner -->|"uses shortcuts"| node_keyboard
node_keyboard -->|"triggers actions"| node_quiz_logic
node_learner -.->|"sets theme"| node_theme_preference
node_theme_preference -.->|"persists preference"| node_browser_storage
node_page -.->|"styled by"| node_styles

click node_page "https://github.com/madhan369/java-quiz-mastery/blob/main/index.html"
click node_styles "https://github.com/madhan369/java-quiz-mastery/blob/main/style.css"
click node_quiz_logic "https://github.com/madhan369/java-quiz-mastery/blob/main/script.js"
click node_question_bank "https://github.com/madhan369/java-quiz-mastery/blob/main/script.js"
click node_answer_feedback "https://github.com/madhan369/java-quiz-mastery/blob/main/script.js"
click node_score_results "https://github.com/madhan369/java-quiz-mastery/blob/main/script.js"
click node_answer_review "https://github.com/madhan369/java-quiz-mastery/blob/main/script.js"
click node_confetti "https://github.com/madhan369/java-quiz-mastery/blob/main/script.js"
click node_theme_preference "https://github.com/madhan369/java-quiz-mastery/blob/main/script.js"
click node_keyboard "https://github.com/madhan369/java-quiz-mastery/blob/main/script.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_quiz_logic,node_question_bank,node_keyboard toneBlue
class node_answer_feedback,node_score_results,node_answer_review,node_confetti,node_browser_storage toneAmber
class node_page,node_styles,node_theme_preference toneMint
class node_learner toneIndigo
```

## Components

### Quiz experience

- [Quiz state and flow](https://github.com/madhan369/java-quiz-mastery/blob/main/script.js): `script.js`
- [Question bank](https://github.com/madhan369/java-quiz-mastery/blob/main/script.js): `script.js`
- [Keyboard navigation](https://github.com/madhan369/java-quiz-mastery/blob/main/script.js): `script.js`

### Results and feedback

- [Answer feedback](https://github.com/madhan369/java-quiz-mastery/blob/main/script.js): `script.js`
- [Score results](https://github.com/madhan369/java-quiz-mastery/blob/main/script.js): `script.js`
- [Answer review](https://github.com/madhan369/java-quiz-mastery/blob/main/script.js): `script.js`
- [Confetti animation](https://github.com/madhan369/java-quiz-mastery/blob/main/script.js): `script.js`

### Presentation

- [Quiz page](https://github.com/madhan369/java-quiz-mastery/blob/main/index.html): `index.html`
- [Themes and layout](https://github.com/madhan369/java-quiz-mastery/blob/main/style.css): `style.css`
- [Theme preference](https://github.com/madhan369/java-quiz-mastery/blob/main/script.js): `script.js`

### Other components

- **Learner**
- **Browser localStorage**

## Connections

- Learner → Quiz page: uses (evidence: `README.md`)
- Quiz page → Quiz state and flow: loads
- Learner → Quiz state and flow: selects and answers (evidence: `script.js`)
- Quiz state and flow → Question bank: selects questions (evidence: `script.js`)
- Quiz state and flow → Answer feedback: submits answers (evidence: `script.js`)
- Quiz state and flow → Score results: ends quiz (evidence: `script.js`)
- Score results → Answer review: builds history (evidence: `script.js`)
- Learner → Answer review: filters answers (evidence: `script.js`)
- Score results → Confetti animation: celebrates high score (evidence: `README.md`)
- Learner → Keyboard navigation: uses shortcuts (evidence: `script.js`)
- Keyboard navigation → Quiz state and flow: triggers actions (evidence: `script.js`)
- Learner → Theme preference: sets theme (evidence: `README.md`)
- Theme preference → Browser localStorage: persists preference (evidence: `README.md`)
- Quiz page → Themes and layout: styled by
