# yogchouhan/typing-speed-shooter-game architecture

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

- Interactive diagram: https://gitdiagram.com/yogchouhan/typing-speed-shooter-game
- Repository: https://github.com/yogchouhan/typing-speed-shooter-game

## Overview

This is a browser-based typing shooter. The player starts at the landing screen, plays by typing words that appear as enemies, earns score for matches, and reaches a game-over screen when lives run out. The sampled JavaScript implements word spawning, matching, scoring, lives, and score persistence/navigation; the README describes the screens and gameplay. HTML and CSS contents were not sampled, so their internal wiring and presentation details are not inferred.

Main entry points: [`script.js`](https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/script.js) (Game mechanics), [`main.html`](https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/main.html) (Gameplay screen), [`entry.html`](https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/entry.html) (Landing screen), [`gg.html`](https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/gg.html) (Game-over screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_screens["Game screens"]
  node_landing["Landing screen<br/>[entry.html]"]
  node_gameplay["Gameplay screen<br/>[main.html]"]
  node_gameover["Game-over screen<br/>[gg.html]"]
end

subgraph group_runtime["Gameplay runtime"]
  node_mechanics["Game mechanics<br/>[script.js]"]
  node_wordspawn["Word spawning<br/>[script.js]"]
  node_typingmatch["Typing and matching<br/>[script.js]"]
  node_scorelives["Score and lives<br/>[script.js]"]
  node_scorestore["Score storage<br/>[script.js]"]
end

subgraph group_presentation["Presentation"]
  node_gamecss["Game styling<br/>[style.css]"]
end

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

node_player -->|"opens"| node_landing
node_landing -->|"starts game"| node_gameplay
node_player -->|"types words"| node_gameplay
node_gameplay -->|"hosts"| node_mechanics
node_mechanics -->|"spawns"| node_wordspawn
node_mechanics -->|"checks input"| node_typingmatch
node_typingmatch -->|"updates score"| node_scorelives
node_mechanics -->|"reduces lives"| node_scorelives
node_mechanics -->|"saves score"| node_scorestore
node_scorestore -->|"writes score"| node_browserstorage
node_mechanics -->|"navigates to"| node_gameover
node_gameplay -.->|"styled by"| node_gamecss
node_gameover -->|"shows final stats"| node_player

click node_landing "https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/entry.html"
click node_gameplay "https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/main.html"
click node_gameover "https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/gg.html"
click node_mechanics "https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/script.js"
click node_wordspawn "https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/script.js"
click node_typingmatch "https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/script.js"
click node_scorelives "https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/script.js"
click node_scorestore "https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/script.js"
click node_gamecss "https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/style.css"

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_landing,node_gameplay,node_gameover toneBlue
class node_mechanics,node_wordspawn,node_typingmatch,node_scorelives,node_scorestore,node_browserstorage toneAmber
class node_gamecss toneMint
class node_player toneIndigo
```

## Components

### Game screens

- [Landing screen](https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/entry.html): `entry.html`
- [Gameplay screen](https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/main.html): `main.html`
- [Game-over screen](https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/gg.html): `gg.html`

### Gameplay runtime

- [Game mechanics](https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/script.js): `script.js`
- [Word spawning](https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/script.js): `script.js`
- [Typing and matching](https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/script.js): `script.js`
- [Score and lives](https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/script.js): `script.js`
- [Score storage](https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/script.js): `script.js`

### Presentation

- [Game styling](https://github.com/yogchouhan/typing-speed-shooter-game/blob/main/style.css): `style.css`

### Other components

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

## Connections

- Player → Landing screen: opens (evidence: `README.md`)
- Landing screen → Gameplay screen: starts game (evidence: `README.md`)
- Player → Gameplay screen: types words (evidence: `README.md`)
- Gameplay screen → Game mechanics: hosts (evidence: `script.js`)
- Game mechanics → Word spawning: spawns (evidence: `script.js`)
- Game mechanics → Typing and matching: checks input (evidence: `script.js`)
- Typing and matching → Score and lives: updates score (evidence: `script.js`)
- Game mechanics → Score and lives: reduces lives (evidence: `script.js`)
- Game mechanics → Score storage: saves score (evidence: `script.js`)
- Score storage → Browser storage: writes score (evidence: `script.js`)
- Game mechanics → Game-over screen: navigates to (evidence: `script.js`)
- Gameplay screen → Game styling: styled by
- Game-over screen → Player: shows final stats (evidence: `README.md`)
