# abdallahanass/typing-speed-test architecture

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

- Interactive diagram: https://gitdiagram.com/abdallahanass/typing-speed-test
- Repository: https://github.com/abdallahanass/typing-speed-test

## Overview

Typing-Speed-Test is a browser-based typing practice application. A user starts a timed test by typing; the event controller tracks input, advances through randomized prompts, and updates speed, character rate, accuracy, and mistake highlighting. At the time limit, it presents a performance level; a valid username can then trigger a downloadable PDF certificate. The graph follows the sampled event controller as the orchestrator. The README documents the product capabilities, while unsampled HTML and prompt-generation details limit evidence for some wiring.

Main entry points: [`js/eventsModule.js`](https://github.com/abdallahanass/typing-speed-test/blob/main/js/eventsModule.js) (Test Controller), [`js/uiModule.js`](https://github.com/abdallahanass/typing-speed-test/blob/main/js/uiModule.js) (Test Interface), [`js/dataModule.js`](https://github.com/abdallahanass/typing-speed-test/blob/main/js/dataModule.js) (Test State), [`js/cerModule.js`](https://github.com/abdallahanass/typing-speed-test/blob/main/js/cerModule.js) (PDF Generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Test Interaction"]
  node_controller["Test Controller<br/>[eventsModule.js]"]
  node_interface["Test Interface<br/>[uiModule.js]"]
end

subgraph group_content["Prompt Content"]
  node_prompt_generator["Prompt Generator<br/>[wordsModule.js]"]
end

subgraph group_metrics["Scoring and Feedback"]
  node_test_state["Test State<br/>[dataModule.js]"]
  node_scoring["Performance Scoring<br/>[dataModule.js]"]
  node_error_feedback["Typing Feedback<br/>[uiModule.js]"]
  node_level_assessment["Level Assessment<br/>[dataModule.js]"]
end

subgraph group_certificate["Certification"]
  node_certificate_flow["Certificate Flow<br/>[eventsModule.js]"]
  node_pdf_generator["PDF Generator<br/>[cerModule.js]"]
end

node_user(("Typing User"))
node_jspdf["jsPDF Library"]

node_user -->|"types input"| node_controller
node_controller -->|"requests prompts"| node_prompt_generator
node_controller -->|"initializes test"| node_test_state
node_controller -->|"renders prompts"| node_interface
node_controller -->|"reads input"| node_interface
node_controller -->|"updates state"| node_test_state
node_controller -->|"calculates metrics"| node_scoring
node_controller -->|"marks mistakes"| node_error_feedback
node_controller -->|"displays results"| node_interface
node_controller -->|"determines level"| node_level_assessment
node_controller -->|"shows level"| node_interface
node_user -->|"requests certificate"| node_certificate_flow
node_certificate_flow -->|"validates username"| node_interface
node_certificate_flow -->|"reads results"| node_test_state
node_certificate_flow -->|"generates certificate"| node_pdf_generator
node_pdf_generator -->|"creates PDF"| node_jspdf

click node_controller "https://github.com/abdallahanass/typing-speed-test/blob/main/js/eventsModule.js"
click node_interface "https://github.com/abdallahanass/typing-speed-test/blob/main/js/uiModule.js"
click node_prompt_generator "https://github.com/abdallahanass/typing-speed-test/blob/main/js/wordsModule.js"
click node_test_state "https://github.com/abdallahanass/typing-speed-test/blob/main/js/dataModule.js"
click node_scoring "https://github.com/abdallahanass/typing-speed-test/blob/main/js/dataModule.js"
click node_error_feedback "https://github.com/abdallahanass/typing-speed-test/blob/main/js/uiModule.js"
click node_level_assessment "https://github.com/abdallahanass/typing-speed-test/blob/main/js/dataModule.js"
click node_certificate_flow "https://github.com/abdallahanass/typing-speed-test/blob/main/js/eventsModule.js"
click node_pdf_generator "https://github.com/abdallahanass/typing-speed-test/blob/main/js/cerModule.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_controller,node_interface,node_user toneBlue
class node_prompt_generator toneAmber
class node_test_state,node_scoring,node_error_feedback,node_level_assessment toneMint
class node_certificate_flow,node_pdf_generator toneRose
class node_jspdf toneIndigo
```

## Components

### Test Interaction

- [Test Controller](https://github.com/abdallahanass/typing-speed-test/blob/main/js/eventsModule.js): `js/eventsModule.js`
- [Test Interface](https://github.com/abdallahanass/typing-speed-test/blob/main/js/uiModule.js): `js/uiModule.js`

### Prompt Content

- [Prompt Generator](https://github.com/abdallahanass/typing-speed-test/blob/main/js/wordsModule.js): `js/wordsModule.js`

### Scoring and Feedback

- [Test State](https://github.com/abdallahanass/typing-speed-test/blob/main/js/dataModule.js): `js/dataModule.js`
- [Performance Scoring](https://github.com/abdallahanass/typing-speed-test/blob/main/js/dataModule.js): `js/dataModule.js`
- [Typing Feedback](https://github.com/abdallahanass/typing-speed-test/blob/main/js/uiModule.js): `js/uiModule.js`
- [Level Assessment](https://github.com/abdallahanass/typing-speed-test/blob/main/js/dataModule.js): `js/dataModule.js`

### Certification

- [Certificate Flow](https://github.com/abdallahanass/typing-speed-test/blob/main/js/eventsModule.js): `js/eventsModule.js`
- [PDF Generator](https://github.com/abdallahanass/typing-speed-test/blob/main/js/cerModule.js): `js/cerModule.js`

### Other components

- **Typing User**
- **jsPDF Library**

## Connections

- Typing User → Test Controller: types input (evidence: `js/eventsModule.js`)
- Test Controller → Prompt Generator: requests prompts (evidence: `js/eventsModule.js`)
- Test Controller → Test State: initializes test (evidence: `js/eventsModule.js`)
- Test Controller → Test Interface: renders prompts (evidence: `js/eventsModule.js`)
- Test Controller → Test Interface: reads input (evidence: `js/eventsModule.js`)
- Test Controller → Test State: updates state (evidence: `js/eventsModule.js`)
- Test Controller → Performance Scoring: calculates metrics (evidence: `js/eventsModule.js`)
- Test Controller → Typing Feedback: marks mistakes (evidence: `js/eventsModule.js`)
- Test Controller → Test Interface: displays results (evidence: `js/eventsModule.js`)
- Test Controller → Level Assessment: determines level (evidence: `js/eventsModule.js`)
- Test Controller → Test Interface: shows level (evidence: `js/eventsModule.js`)
- Typing User → Certificate Flow: requests certificate (evidence: `js/eventsModule.js`)
- Certificate Flow → Test Interface: validates username (evidence: `js/eventsModule.js`)
- Certificate Flow → Test State: reads results (evidence: `js/eventsModule.js`)
- Certificate Flow → PDF Generator: generates certificate (evidence: `js/eventsModule.js`)
- PDF Generator → jsPDF Library: creates PDF (evidence: `js/cerModule.js`)
