# dumpling-cmd/sensorshub-quiz-game architecture

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

- Interactive diagram: https://gitdiagram.com/dumpling-cmd/sensorshub-quiz-game
- Repository: https://github.com/dumpling-cmd/sensorshub-quiz-game

## Overview

PF101 Knowledge Monitor is a browser-based Python knowledge quiz. Players choose a mode and difficulty, answer timed questions, and receive scored results; solo best scores persist on the device. The sampled code shows question selection, round timing, answer scoring, and result handling in one runtime file. The question bank identifies its data and difficulty/category fields. The README is empty, and the excerpts do not establish how the HTML shell loads the main script, so that connection is marked unverified.

Main entry points: [`script.js`](https://github.com/dumpling-cmd/sensorshub-quiz-game/blob/main/script.js) (Quiz engine), [`index.html`](https://github.com/dumpling-cmd/sensorshub-quiz-game/blob/main/index.html) (Page shell), [`questions.js`](https://github.com/dumpling-cmd/sensorshub-quiz-game/blob/main/questions.js) (Question bank)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Quiz app"]
  node_engine["Quiz engine<br/>[script.js]"]
end

subgraph group_content["Question content"]
  node_bank["Question bank<br/>[questions.js]"]
end

subgraph group_interface["Browser interface"]
  node_shell["Page shell<br/>[index.html]"]
end

node_player(("Player"))
node_storage[("Browser storage")]

node_player -->|"opens"| node_shell
node_shell -->|"loads"| node_bank
node_shell -.->|"runs"| node_engine
node_engine -->|"selects questions"| node_bank
node_engine -->|"saves scores"| node_storage
node_engine -->|"shows results"| node_player

click node_shell "https://github.com/dumpling-cmd/sensorshub-quiz-game/blob/main/index.html"
click node_engine "https://github.com/dumpling-cmd/sensorshub-quiz-game/blob/main/script.js"
click node_bank "https://github.com/dumpling-cmd/sensorshub-quiz-game/blob/main/questions.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_engine toneBlue
class node_bank,node_storage toneAmber
class node_shell toneMint
class node_player toneIndigo
```

## Components

### Quiz app

- [Quiz engine](https://github.com/dumpling-cmd/sensorshub-quiz-game/blob/main/script.js): `script.js`

### Question content

- [Question bank](https://github.com/dumpling-cmd/sensorshub-quiz-game/blob/main/questions.js): `questions.js`

### Browser interface

- [Page shell](https://github.com/dumpling-cmd/sensorshub-quiz-game/blob/main/index.html): `index.html`

### Other components

- **Player**
- **Browser storage**

## Connections

- Player → Page shell: opens
- Page shell → Question bank: loads (evidence: `questions.js`)
- Page shell → Quiz engine: runs
- Quiz engine → Question bank: selects questions (evidence: `script.js`)
- Quiz engine → Browser storage: saves scores (evidence: `script.js`)
- Quiz engine → Player: shows results (evidence: `script.js`)
