# gokarnan/brick-race architecture

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

- Interactive diagram: https://gitdiagram.com/gokarnan/brick-race
- Repository: https://github.com/gokarnan/brick-race

## Overview

Brick Bridge Race is a mobile HTML5 racing game delivered in a single HTML file. The player races across tropical platforms, collects and carries colored bricks, and passes count-changing gates; the game uses those bricks to build bridges over water. AI bots and ten levels provide race progression, while coins earned in play unlock character and brick skins in the shop. The README documents these capabilities and relationships, but no source excerpts are available to verify implementation details.

Main entry points: [`index.html`](https://github.com/gokarnan/brick-race/blob/main/index.html) (Race game)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_race["Race gameplay"]
  node_race_game["Race game<br/>[index.html]"]
  node_platforms["Tropical platforms<br/>[index.html]"]
  node_brick_stack["Brick collection<br/>[index.html]"]
  node_count_gates["Count gates<br/>[index.html]"]
  node_bridge_building["Bridge building<br/>[index.html]"]
  node_ai_bots["AI bots<br/>[index.html]"]
end

subgraph group_progression["Progression and shop"]
  node_levels["Ten levels<br/>[index.html]"]
  node_coins["Coin rewards<br/>[index.html]"]
  node_skin_shop["Skin shop<br/>[index.html]"]
end

node_player(("Player"))

node_player -->|"plays"| node_race_game
node_race_game -->|"races across"| node_platforms
node_race_game -->|"collects bricks"| node_brick_stack
node_race_game -->|"passes"| node_count_gates
node_race_game -->|"auto-builds"| node_bridge_building
node_race_game -->|"races against"| node_ai_bots
node_race_game -->|"progresses through"| node_levels
node_race_game -->|"earns"| node_coins
node_coins -->|"unlock skins"| node_skin_shop

click node_race_game "https://github.com/gokarnan/brick-race/blob/main/index.html"
click node_platforms "https://github.com/gokarnan/brick-race/blob/main/index.html"
click node_brick_stack "https://github.com/gokarnan/brick-race/blob/main/index.html"
click node_count_gates "https://github.com/gokarnan/brick-race/blob/main/index.html"
click node_bridge_building "https://github.com/gokarnan/brick-race/blob/main/index.html"
click node_ai_bots "https://github.com/gokarnan/brick-race/blob/main/index.html"
click node_levels "https://github.com/gokarnan/brick-race/blob/main/index.html"
click node_coins "https://github.com/gokarnan/brick-race/blob/main/index.html"
click node_skin_shop "https://github.com/gokarnan/brick-race/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_race_game,node_platforms,node_brick_stack,node_count_gates,node_bridge_building,node_ai_bots toneBlue
class node_levels,node_coins,node_skin_shop toneAmber
class node_player toneIndigo
```

## Components

### Race gameplay

- [Race game](https://github.com/gokarnan/brick-race/blob/main/index.html): `index.html`
- [Tropical platforms](https://github.com/gokarnan/brick-race/blob/main/index.html): `index.html`
- [Brick collection](https://github.com/gokarnan/brick-race/blob/main/index.html): `index.html`
- [Count gates](https://github.com/gokarnan/brick-race/blob/main/index.html): `index.html`
- [Bridge building](https://github.com/gokarnan/brick-race/blob/main/index.html): `index.html`
- [AI bots](https://github.com/gokarnan/brick-race/blob/main/index.html): `index.html`

### Progression and shop

- [Ten levels](https://github.com/gokarnan/brick-race/blob/main/index.html): `index.html`
- [Coin rewards](https://github.com/gokarnan/brick-race/blob/main/index.html): `index.html`
- [Skin shop](https://github.com/gokarnan/brick-race/blob/main/index.html): `index.html`

### Other components

- **Player**

## Connections

- Player → Race game: plays (evidence: `README.md`)
- Race game → Tropical platforms: races across (evidence: `README.md`)
- Race game → Brick collection: collects bricks (evidence: `README.md`)
- Race game → Count gates: passes (evidence: `README.md`)
- Race game → Bridge building: auto-builds (evidence: `README.md`)
- Race game → AI bots: races against (evidence: `README.md`)
- Race game → Ten levels: progresses through (evidence: `README.md`)
- Race game → Coin rewards: earns (evidence: `README.md`)
- Coin rewards → Skin shop: unlock skins (evidence: `README.md`)
