# murabit101/quiz-app architecture

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

- Interactive diagram: https://gitdiagram.com/murabit101/quiz-app
- Repository: https://github.com/murabit101/quiz-app

## Overview

This is a browser-based quiz app. A user selects a category and starts a quiz; the JavaScript loads and shuffles that category’s questions, presents them with a countdown, checks answers, and displays a final score. The source excerpt directly supports these runtime calls and the category JSON fetches. The HTML, styling, and sound assets are present in the tree, but their wiring is not shown, so they are not connected here.

Main entry points: [`js/main.js`](https://github.com/murabit101/quiz-app/blob/main/js/main.js) (Question loading), [`json/html_questions.json`](https://github.com/murabit101/quiz-app/blob/main/json/html_questions.json) (HTML questions), [`json/css_questions.json`](https://github.com/murabit101/quiz-app/blob/main/json/css_questions.json) (CSS questions), [`json/islamic_questions.json`](https://github.com/murabit101/quiz-app/blob/main/json/islamic_questions.json) (Islamic questions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_quiz_runtime["Quiz runtime"]
  node_quiz_setup["Quiz setup<br/>[main.js]"]
  node_question_loading["Question loading<br/>[main.js]"]
  node_question_flow["Question flow<br/>[main.js]"]
  node_answer_scoring["Answer scoring<br/>[main.js]"]
  node_results["Quiz results<br/>[main.js]"]
end

subgraph group_question_content["Question content"]
  node_html_questions["HTML questions"]
  node_css_questions["CSS questions<br/>[css_questions.json]"]
  node_islamic_questions["Islamic questions"]
end

node_user(("Quiz player"))

node_user -->|"selects and starts"| node_quiz_setup
node_quiz_setup -->|"loads category"| node_question_loading
node_question_loading -->|"fetches questions"| node_html_questions
node_question_loading -->|"fetches questions"| node_css_questions
node_question_loading -->|"fetches questions"| node_islamic_questions
node_question_loading -->|"creates quiz"| node_question_flow
node_question_flow -->|"checks answer"| node_answer_scoring
node_answer_scoring -->|"advances question"| node_question_flow
node_answer_scoring -->|"shows final score"| node_results

click node_quiz_setup "https://github.com/murabit101/quiz-app/blob/main/js/main.js"
click node_question_loading "https://github.com/murabit101/quiz-app/blob/main/js/main.js"
click node_question_flow "https://github.com/murabit101/quiz-app/blob/main/js/main.js"
click node_answer_scoring "https://github.com/murabit101/quiz-app/blob/main/js/main.js"
click node_results "https://github.com/murabit101/quiz-app/blob/main/js/main.js"
click node_html_questions "https://github.com/murabit101/quiz-app/blob/main/json/html_questions.json"
click node_css_questions "https://github.com/murabit101/quiz-app/blob/main/json/css_questions.json"
click node_islamic_questions "https://github.com/murabit101/quiz-app/blob/main/json/islamic_questions.json"

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_setup,node_question_loading,node_question_flow,node_answer_scoring,node_results toneBlue
class node_html_questions,node_css_questions,node_islamic_questions toneAmber
class node_user toneIndigo
```

## Components

### Quiz runtime

- [Quiz setup](https://github.com/murabit101/quiz-app/blob/main/js/main.js): `js/main.js`
- [Question loading](https://github.com/murabit101/quiz-app/blob/main/js/main.js): `js/main.js`
- [Question flow](https://github.com/murabit101/quiz-app/blob/main/js/main.js): `js/main.js`
- [Answer scoring](https://github.com/murabit101/quiz-app/blob/main/js/main.js): `js/main.js`
- [Quiz results](https://github.com/murabit101/quiz-app/blob/main/js/main.js): `js/main.js`

### Question content

- [HTML questions](https://github.com/murabit101/quiz-app/blob/main/json/html_questions.json): `json/html_questions.json`
- [CSS questions](https://github.com/murabit101/quiz-app/blob/main/json/css_questions.json): `json/css_questions.json`
- [Islamic questions](https://github.com/murabit101/quiz-app/blob/main/json/islamic_questions.json): `json/islamic_questions.json`

### Other components

- **Quiz player**

## Connections

- Quiz player → Quiz setup: selects and starts (evidence: `js/main.js`)
- Quiz setup → Question loading: loads category (evidence: `js/main.js`)
- Question loading → HTML questions: fetches questions (evidence: `js/main.js`)
- Question loading → CSS questions: fetches questions (evidence: `js/main.js`)
- Question loading → Islamic questions: fetches questions (evidence: `js/main.js`)
- Question loading → Question flow: creates quiz (evidence: `js/main.js`)
- Question flow → Answer scoring: checks answer (evidence: `js/main.js`)
- Answer scoring → Question flow: advances question (evidence: `js/main.js`)
- Answer scoring → Quiz results: shows final score (evidence: `js/main.js`)
