# bhargav-sai90/typing-speed-test architecture

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

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

## Overview

This small browser app tests typing against a randomly fetched quote. The user starts or resets a timed attempt, types the displayed quote, and submits it; the app compares the text and reports the elapsed time or an error. The sampled JavaScript shows the timer, fetch, comparison, and reset behavior. The HTML and CSS are present in the tree but were not sampled, so their internal structure and styling are not detailed.

Main entry points: [`index.js`](https://github.com/bhargav-sai90/typing-speed-test/blob/main/index.js) (Typing Test), [`index.html`](https://github.com/bhargav-sai90/typing-speed-test/blob/main/index.html) (Quote Input)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_app["Typing Test<br/>[index.js]"]
node_quote["Quote Display<br/>[index.html]"]
node_input["Quote Input<br/>[index.html]"]
node_timer["Attempt Timer<br/>[index.js]"]
node_result["Attempt Result<br/>[index.html]"]
node_quote_api["Quote API"]

node_user -->|"starts or resets"| node_app
node_app -->|"fetches quote"| node_quote_api
node_app -->|"displays quote"| node_quote
node_app -->|"updates time"| node_timer
node_user -->|"types text"| node_input
node_app -->|"reads text"| node_input
node_app -->|"writes result"| node_result
node_user -->|"submits attempt"| node_app

click node_app "https://github.com/bhargav-sai90/typing-speed-test/blob/main/index.js"
click node_quote "https://github.com/bhargav-sai90/typing-speed-test/blob/main/index.html"
click node_input "https://github.com/bhargav-sai90/typing-speed-test/blob/main/index.html"
click node_timer "https://github.com/bhargav-sai90/typing-speed-test/blob/main/index.js"
click node_result "https://github.com/bhargav-sai90/typing-speed-test/blob/main/index.html"

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_user toneBlue
class node_app,node_quote,node_input,node_timer,node_result toneTeal
class node_quote_api toneMint
```

## Components

### Other components

- **User**
- [Typing Test](https://github.com/bhargav-sai90/typing-speed-test/blob/main/index.js): `index.js`
- [Quote Display](https://github.com/bhargav-sai90/typing-speed-test/blob/main/index.html): `index.html`
- [Quote Input](https://github.com/bhargav-sai90/typing-speed-test/blob/main/index.html): `index.html`
- [Attempt Timer](https://github.com/bhargav-sai90/typing-speed-test/blob/main/index.js): `index.js`
- [Attempt Result](https://github.com/bhargav-sai90/typing-speed-test/blob/main/index.html): `index.html`
- **Quote API**

## Connections

- User → Typing Test: starts or resets (evidence: `index.js`)
- Typing Test → Quote API: fetches quote (evidence: `index.js`)
- Typing Test → Quote Display: displays quote (evidence: `index.js`)
- Typing Test → Attempt Timer: updates time (evidence: `index.js`)
- User → Quote Input: types text
- Typing Test → Quote Input: reads text (evidence: `index.js`)
- Typing Test → Attempt Result: writes result (evidence: `index.js`)
- User → Typing Test: submits attempt (evidence: `index.js`)
