# dhami200/ait-quality-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/dhami200/ait-quality-dashboard
- Repository: https://github.com/dhami200/ait-quality-dashboard

## Overview

Quiz App is a browser-based programming-topic quiz. The primary flow is topic selection, loading topic questions, answering and navigating, then submitting for scoring and answer review; theme control and a help chatbot are supporting capabilities. The repository also contains a separate quiz implementation under `src/js` and a legacy quiz script at the root. Those are shown without assuming they are wired into the documented `src/index.html` flow; unsampled page wiring is represented only where README supports it.

Main entry points: [`src/quiz.js`](https://github.com/dhami200/ait-quality-dashboard/blob/main/src/quiz.js) (Quiz engine), [`src/theme.js`](https://github.com/dhami200/ait-quality-dashboard/blob/main/src/theme.js) (Theme control), [`src/index.html`](https://github.com/dhami200/ait-quality-dashboard/blob/main/src/index.html) (Topic home), [`src/quiz.html`](https://github.com/dhami200/ait-quality-dashboard/blob/main/src/quiz.html) (Quiz page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_quiz["Quiz experience"]
  node_home["Topic home<br/>[index.html]"]
  node_quizpage["Quiz page<br/>[quiz.html]"]
  node_quizengine["Quiz engine<br/>[quiz.js]"]
  node_quizview["Quiz interface<br/>[quiz.html]"]
  node_results["Score and review<br/>[quiz.js]"]
end

subgraph group_content["Question content"]
  node_questionbank["Topic question banks"]
end

subgraph group_support["User support"]
  node_chatui["Chatbot interface<br/>[Chatbot.html]"]
  node_chatbot["Chatbot assistant<br/>[chatbot.js]"]
  node_theme["Theme control<br/>[theme.js]"]
  node_theme_store[("Browser theme storage")]
end

subgraph group_legacy["Legacy quiz"]
  node_topicsets["Legacy embedded questions<br/>[script.js]"]
  node_legacyengine["Legacy quiz renderer<br/>[script.js]"]
  node_alternateengine["Alternate quiz engine<br/>[quiz.js]"]
end

node_learner(("Learner"))
node_system_theme["System appearance setting"]

node_learner -->|"selects topic"| node_home
node_home -->|"opens quiz"| node_quizpage
node_quizpage -.->|"runs"| node_quizengine
node_quizengine -->|"fetches questions"| node_questionbank
node_quizengine -.->|"renders questions"| node_quizview
node_learner -->|"answers questions"| node_quizview
node_quizengine -->|"computes and shows"| node_results
node_learner -->|"asks for help"| node_chatui
node_chatui -.->|"handles messages"| node_chatbot
node_theme -->|"saves preference"| node_theme_store
node_theme_store -->|"restores preference"| node_theme
node_system_theme -->|"provides preference"| node_theme
node_topicsets -.->|"supplies questions"| node_legacyengine
node_learner -.->|"uses standalone quiz"| node_legacyengine
node_alternateengine -->|"fetches questions"| node_questionbank

click node_home "https://github.com/dhami200/ait-quality-dashboard/blob/main/src/index.html"
click node_quizpage "https://github.com/dhami200/ait-quality-dashboard/blob/main/src/quiz.html"
click node_quizengine "https://github.com/dhami200/ait-quality-dashboard/blob/main/src/quiz.js"
click node_quizview "https://github.com/dhami200/ait-quality-dashboard/blob/main/src/features/quiz/components/quiz.html"
click node_results "https://github.com/dhami200/ait-quality-dashboard/blob/main/src/quiz.js"
click node_questionbank "https://github.com/dhami200/ait-quality-dashboard/tree/main/src/data"
click node_topicsets "https://github.com/dhami200/ait-quality-dashboard/blob/main/script.js"
click node_legacyengine "https://github.com/dhami200/ait-quality-dashboard/blob/main/script.js"
click node_alternateengine "https://github.com/dhami200/ait-quality-dashboard/blob/main/src/js/quiz.js"
click node_chatui "https://github.com/dhami200/ait-quality-dashboard/blob/main/src/features/chatbot/components/Chatbot.html"
click node_chatbot "https://github.com/dhami200/ait-quality-dashboard/blob/main/src/features/chatbot/js/chatbot.js"
click node_theme "https://github.com/dhami200/ait-quality-dashboard/blob/main/src/theme.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_home,node_quizpage,node_quizengine,node_quizview,node_results toneBlue
class node_questionbank toneAmber
class node_chatui,node_chatbot,node_theme,node_theme_store toneMint
class node_topicsets,node_legacyengine,node_alternateengine toneRose
class node_learner,node_system_theme toneIndigo
```

## Components

### Quiz experience

- [Topic home](https://github.com/dhami200/ait-quality-dashboard/blob/main/src/index.html): `src/index.html`
- [Quiz page](https://github.com/dhami200/ait-quality-dashboard/blob/main/src/quiz.html): `src/quiz.html`
- [Quiz engine](https://github.com/dhami200/ait-quality-dashboard/blob/main/src/quiz.js): `src/quiz.js`
- [Quiz interface](https://github.com/dhami200/ait-quality-dashboard/blob/main/src/features/quiz/components/quiz.html): `src/features/quiz/components/quiz.html`
- [Score and review](https://github.com/dhami200/ait-quality-dashboard/blob/main/src/quiz.js): `src/quiz.js`

### Question content

- [Topic question banks](https://github.com/dhami200/ait-quality-dashboard/tree/main/src/data): `src/data`

### User support

- [Chatbot interface](https://github.com/dhami200/ait-quality-dashboard/blob/main/src/features/chatbot/components/Chatbot.html): `src/features/chatbot/components/Chatbot.html`
- [Chatbot assistant](https://github.com/dhami200/ait-quality-dashboard/blob/main/src/features/chatbot/js/chatbot.js): `src/features/chatbot/js/chatbot.js`
- [Theme control](https://github.com/dhami200/ait-quality-dashboard/blob/main/src/theme.js): `src/theme.js`
- **Browser theme storage**

### Legacy quiz

- [Legacy embedded questions](https://github.com/dhami200/ait-quality-dashboard/blob/main/script.js): `script.js`
- [Legacy quiz renderer](https://github.com/dhami200/ait-quality-dashboard/blob/main/script.js): `script.js`
- [Alternate quiz engine](https://github.com/dhami200/ait-quality-dashboard/blob/main/src/js/quiz.js): `src/js/quiz.js`

### Other components

- **Learner**
- **System appearance setting**

## Connections

- Learner → Topic home: selects topic (evidence: `README.md`)
- Topic home → Quiz page: opens quiz (evidence: `README.md`)
- Quiz page → Quiz engine: runs
- Quiz engine → Topic question banks: fetches questions (evidence: `src/quiz.js`)
- Quiz engine → Quiz interface: renders questions
- Learner → Quiz interface: answers questions (evidence: `README.md`)
- Quiz engine → Score and review: computes and shows (evidence: `src/quiz.js`)
- Learner → Chatbot interface: asks for help (evidence: `README.md`)
- Chatbot interface → Chatbot assistant: handles messages
- Theme control → Browser theme storage: saves preference (evidence: `src/theme.js`)
- Browser theme storage → Theme control: restores preference (evidence: `src/theme.js`)
- System appearance setting → Theme control: provides preference (evidence: `src/theme.js`)
- Legacy embedded questions → Legacy quiz renderer: supplies questions (evidence: `script.js`)
- Learner → Legacy quiz renderer: uses standalone quiz
- Alternate quiz engine → Topic question banks: fetches questions (evidence: `src/js/quiz.js`)
