# swedan/classquest architecture

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

- Interactive diagram: https://gitdiagram.com/swedan/classquest
- Repository: https://github.com/swedan/classquest

## Overview

HCT ClassQuest is a browser-based classroom question game. Teachers load a question bank, navigate its course/category/topic/keyword structure, select questions, reveal answers, record outcomes, and review scores and performance. Teacher controls manage navigation and game progress. A separate prompt builder prepares question-generation prompts for use in an external AI tool; it does not require an AI API. The map groups the documented capabilities, but several are unsampled, so their connections rely on README statements rather than inspected implementation.

Main entry points: [`app.js`](https://github.com/swedan/classquest/blob/main/app.js) (Bank Upload), [`ai-generator.js`](https://github.com/swedan/classquest/blob/main/ai-generator.js) (Prompt Builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Bank and Setup"]
  node_game["ClassQuest Game<br/>[app.js]"]
  node_bank["Bank Upload<br/>[app.js]"]
  node_sheetjs["SheetJS CDN"]
  node_taxonomy["Course and Topics<br/>[app.js]"]
  node_strategy["Question Selection<br/>[app.js]"]
end

subgraph group_gameplay["Question Gameplay"]
  node_question["Question Display<br/>[app.js]"]
  node_mcq["MCQ Support<br/>[app.js]"]
  node_timer["Timer and Reveal<br/>[app.js]"]
  node_scoring["Scoring<br/>[app.js]"]
end

subgraph group_results["Results and Controls"]
  node_stats["Statistics<br/>[app.js]"]
  node_controls["Teacher Controls<br/>[app.js]"]
  node_dialogs["Confirmations<br/>[app.js]"]
end

subgraph group_authoring["Prompt Authoring"]
  node_prompt["Prompt Builder<br/>[ai-generator.js]"]
  node_aitool(("External AI Tool"))
end

node_teacher(("Teacher"))

node_teacher -->|"opens"| node_game
node_teacher -->|"uploads"| node_bank
node_bank -.->|"parses Excel"| node_sheetjs
node_bank -->|"supplies questions"| node_taxonomy
node_taxonomy -->|"narrows questions"| node_strategy
node_strategy -->|"selects"| node_question
node_question -->|"supports"| node_mcq
node_question -->|"uses"| node_timer
node_teacher -->|"reveals answer"| node_timer
node_teacher -.->|"records outcomes"| node_scoring
node_scoring -.->|"summarizes"| node_stats
node_teacher -->|"manages game"| node_controls
node_controls -->|"confirms actions"| node_dialogs
node_teacher -->|"sets requirements"| node_prompt
node_prompt -->|"copies prompt to"| node_aitool

click node_game "https://github.com/swedan/classquest/blob/main/app.js"
click node_bank "https://github.com/swedan/classquest/blob/main/app.js"
click node_taxonomy "https://github.com/swedan/classquest/blob/main/app.js"
click node_strategy "https://github.com/swedan/classquest/blob/main/app.js"
click node_question "https://github.com/swedan/classquest/blob/main/app.js"
click node_mcq "https://github.com/swedan/classquest/blob/main/app.js"
click node_timer "https://github.com/swedan/classquest/blob/main/app.js"
click node_scoring "https://github.com/swedan/classquest/blob/main/app.js"
click node_stats "https://github.com/swedan/classquest/blob/main/app.js"
click node_controls "https://github.com/swedan/classquest/blob/main/app.js"
click node_dialogs "https://github.com/swedan/classquest/blob/main/app.js"
click node_prompt "https://github.com/swedan/classquest/blob/main/ai-generator.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_game,node_bank,node_sheetjs,node_taxonomy,node_strategy toneBlue
class node_question,node_mcq,node_timer,node_scoring toneAmber
class node_stats,node_controls,node_dialogs toneMint
class node_prompt,node_aitool toneRose
class node_teacher toneIndigo
```

## Components

### Bank and Setup

- [ClassQuest Game](https://github.com/swedan/classquest/blob/main/app.js): `app.js`
- [Bank Upload](https://github.com/swedan/classquest/blob/main/app.js): `app.js`
- **SheetJS CDN**
- [Course and Topics](https://github.com/swedan/classquest/blob/main/app.js): `app.js`
- [Question Selection](https://github.com/swedan/classquest/blob/main/app.js): `app.js`

### Question Gameplay

- [Question Display](https://github.com/swedan/classquest/blob/main/app.js): `app.js`
- [MCQ Support](https://github.com/swedan/classquest/blob/main/app.js): `app.js`
- [Timer and Reveal](https://github.com/swedan/classquest/blob/main/app.js): `app.js`
- [Scoring](https://github.com/swedan/classquest/blob/main/app.js): `app.js`

### Results and Controls

- [Statistics](https://github.com/swedan/classquest/blob/main/app.js): `app.js`
- [Teacher Controls](https://github.com/swedan/classquest/blob/main/app.js): `app.js`
- [Confirmations](https://github.com/swedan/classquest/blob/main/app.js): `app.js`

### Prompt Authoring

- [Prompt Builder](https://github.com/swedan/classquest/blob/main/ai-generator.js): `ai-generator.js`
- **External AI Tool**

### Other components

- **Teacher**

## Connections

- Teacher → ClassQuest Game: opens (evidence: `README.md`)
- Teacher → Bank Upload: uploads (evidence: `README.md`)
- Bank Upload → SheetJS CDN: parses Excel (evidence: `README.md`)
- Bank Upload → Course and Topics: supplies questions (evidence: `README.md`)
- Course and Topics → Question Selection: narrows questions (evidence: `README.md`)
- Question Selection → Question Display: selects (evidence: `README.md`)
- Question Display → MCQ Support: supports (evidence: `README.md`)
- Question Display → Timer and Reveal: uses (evidence: `README.md`)
- Teacher → Timer and Reveal: reveals answer (evidence: `app.js`)
- Teacher → Scoring: records outcomes (evidence: `README.md`)
- Scoring → Statistics: summarizes (evidence: `README.md`)
- Teacher → Teacher Controls: manages game (evidence: `app.js`)
- Teacher Controls → Confirmations: confirms actions (evidence: `app.js`)
- Teacher → Prompt Builder: sets requirements (evidence: `ai-generator.js`)
- Prompt Builder → External AI Tool: copies prompt to (evidence: `ai-generator.js`)
