# meherjebali/alghaz architecture

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

- Interactive diagram: https://gitdiagram.com/meherjebali/alghaz
- Repository: https://github.com/meherjebali/alghaz

## Overview

Alghaz is a browser-based Arabic quiz game. A player starts or resets a round; the game selects a question and answer from the question bank, displays a masked answer and letter choices, accepts clicks or keyboard input, and updates lives and score. The main implementation also handles hints and audio feedback. The repository includes a second, similar game script; its relationship to the main page is not established by the excerpts, so it is shown as a separate implementation. The HTML wiring was not sampled.

Main entry points: [`js/index.js`](https://github.com/meherjebali/alghaz/blob/master/js/index.js) (Round controller), [`data.js`](https://github.com/meherjebali/alghaz/blob/master/data.js) (Question bank), [`index.html`](https://github.com/meherjebali/alghaz/blob/master/index.html) (Game page), [`rsc`](https://github.com/meherjebali/alghaz/tree/master/rsc) (Sound effects)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Gameplay"]
  node_game["Round controller<br/>[index.js]"]
  node_alternate["Alternate game script<br/>[index - Copie.js]"]
end

subgraph group_content["Quiz content"]
  node_questions["Question bank<br/>[data.js]"]
end

subgraph group_presentation["Presentation"]
  node_page["Game page<br/>[index.html]"]
  node_styles["Game styling<br/>[style.css]"]
  node_audio["Sound effects"]
end

node_player(("Player"))

node_player -->|"plays"| node_game
node_game -->|"selects from"| node_questions
node_game -->|"updates interface"| node_page
node_game -.->|"triggers playback"| node_audio

click node_game "https://github.com/meherjebali/alghaz/blob/master/js/index.js"
click node_alternate "https://github.com/meherjebali/alghaz/blob/master/js/index%20-%20Copie.js"
click node_questions "https://github.com/meherjebali/alghaz/blob/master/data.js"
click node_page "https://github.com/meherjebali/alghaz/blob/master/index.html"
click node_styles "https://github.com/meherjebali/alghaz/blob/master/css/style.css"
click node_audio "https://github.com/meherjebali/alghaz/tree/master/rsc"

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_alternate toneBlue
class node_questions toneAmber
class node_page,node_styles,node_audio toneMint
class node_player toneIndigo
```

## Components

### Gameplay

- [Round controller](https://github.com/meherjebali/alghaz/blob/master/js/index.js): `js/index.js`
- [Alternate game script](https://github.com/meherjebali/alghaz/blob/master/js/index%20-%20Copie.js): `js/index - Copie.js`

### Quiz content

- [Question bank](https://github.com/meherjebali/alghaz/blob/master/data.js): `data.js`

### Presentation

- [Game page](https://github.com/meherjebali/alghaz/blob/master/index.html): `index.html`
- [Game styling](https://github.com/meherjebali/alghaz/blob/master/css/style.css): `css/style.css`
- [Sound effects](https://github.com/meherjebali/alghaz/tree/master/rsc): `rsc`

### Other components

- **Player**

## Connections

- Player → Round controller: plays (evidence: `js/index.js`)
- Round controller → Question bank: selects from (evidence: `js/index.js`)
- Round controller → Game page: updates interface (evidence: `js/index.js`)
- Round controller → Sound effects: triggers playback
