# belikemustafa/mechatech architecture

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

- Interactive diagram: https://gitdiagram.com/belikemustafa/mechatech
- Repository: https://github.com/belikemustafa/mechatech

## Overview

MechaTech is a browser-based engineering mini-game arcade and timed code-typing studio. The main workflow is: the player chooses a game and settings in the hub, the app mounts that game, the game selects a challenge and presents it, then evaluates the response and updates score or feedback. The README also documents specialized games, language and theme choices, global timers, and visual/audio effects. Edges reflect shown imports or documented capabilities; some game internals and unsampled data wiring are not verified.

Main entry points: [`js/main.js`](https://github.com/belikemustafa/mechatech/blob/main/js/main.js) (Game hub), [`js/games/typingGame.js`](https://github.com/belikemustafa/mechatech/blob/main/js/games/typingGame.js) (Code Type Sprint), [`js/games/scrambleGame.js`](https://github.com/belikemustafa/mechatech/blob/main/js/games/scrambleGame.js) (Syntax Scramble), [`js/games/regexGame.js`](https://github.com/belikemustafa/mechatech/blob/main/js/games/regexGame.js) (Regex Lab)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Arcade app"]
  node_hub["Game hub<br/>[main.js]"]
end

subgraph group_games["Game experiences"]
  node_typing["Code Type Sprint<br/>[typingGame.js]"]
  node_bug["Bug Hunter<br/>[bugGame.js]"]
  node_output["Trace Output<br/>[outputGame.js]"]
  node_bigo["Big-O Radar<br/>[bigOGame.js]"]
  node_scramble["Syntax Scramble<br/>[scrambleGame.js]"]
  node_fill["Code Fill Blitz<br/>[fillGame.js]"]
  node_http["API HTTP Reflex<br/>[httpGame.js]"]
  node_css["CSS Layout Lab<br/>[cssLabGame.js]"]
  node_regex["Regex Lab<br/>[regexGame.js]"]
  node_design["System Design Triage<br/>[sysDesignGame.js]"]
  node_scenario["Cyber Breach and AI<br/>[scenarioGame.js]"]
  node_knowledge["CS Knowledge<br/>[gkData.js]"]
end

subgraph group_content["Challenge content"]
  node_language["Languages<br/>[languages.js]"]
  node_themes["Editor themes<br/>[themes.js]"]
  node_typingdata["Typing challenges<br/>[typingData.js]"]
  node_bugdata["Bug challenges<br/>[bugsData.js]"]
  node_outputdata["Output challenges<br/>[outputData.js]"]
  node_bigodata["Complexity challenges<br/>[bigOData.js]"]
  node_scrambledata["Scramble challenges<br/>[scrambleData.js]"]
  node_filldata["Fill challenges<br/>[fillData.js]"]
  node_httpdata["HTTP challenges<br/>[httpData.js]"]
  node_cssdata["CSS challenges<br/>[cssLabData.js]"]
  node_regexdata["Regex challenges<br/>[regexData.js]"]
  node_designdata["Design challenges<br/>[sysDesignData.js]"]
  node_scenariodata["Security and AI content"]
  node_otherdata["Additional challenge packs"]
end

subgraph group_shared["Shared runtime"]
  node_highlight["Code highlighting<br/>[highlight.js]"]
  node_utils["Game utilities<br/>[utils.js]"]
  node_sound["Sound effects<br/>[sound.js]"]
  node_fx["Visual effects<br/>[fx.js]"]
end

node_player(("Player"))

node_player -->|"chooses game"| node_hub
node_hub -->|"mounts game"| node_typing
node_hub -->|"mounts game"| node_bug
node_hub -->|"mounts game"| node_output
node_hub -->|"mounts game"| node_bigo
node_hub -->|"mounts game"| node_scramble
node_hub -->|"mounts game"| node_fill
node_hub -->|"mounts game"| node_http
node_hub -->|"mounts game"| node_css
node_hub -->|"mounts game"| node_regex
node_hub -->|"mounts game"| node_design
node_hub -->|"mounts game"| node_scenario
node_hub -->|"offers game"| node_knowledge
node_hub -->|"configures languages"| node_language
node_hub -->|"applies themes"| node_themes
node_hub -->|"sets global timer"| node_typing
node_typing -->|"selects snippets"| node_typingdata
node_bug -->|"loads challenges"| node_bugdata
node_output -->|"loads challenges"| node_outputdata
node_bigo -->|"loads challenges"| node_bigodata
node_scramble -->|"selects challenges"| node_scrambledata
node_fill -->|"loads challenges"| node_filldata
node_http -->|"loads challenges"| node_httpdata
node_css -->|"loads challenges"| node_cssdata
node_regex -->|"loads challenges"| node_regexdata
node_design -->|"loads challenges"| node_designdata
node_scenario -->|"uses content"| node_scenariodata
node_typing -->|"uses language metadata"| node_language
node_scramble -->|"uses language metadata"| node_language
node_typing -->|"tokenizes code"| node_highlight
node_scramble -->|"highlights code"| node_highlight
node_regex -->|"selects samples"| node_utils
node_typing -->|"filters snippets"| node_utils
node_scramble -->|"shuffles lines"| node_utils
node_typing -->|"plays feedback"| node_sound
node_regex -->|"shakes feedback"| node_fx
node_css -->|"uses effects"| node_fx
node_http -->|"uses effects"| node_fx
node_design -->|"uses effects"| node_fx
node_player -.->|"plays other games"| node_otherdata

click node_hub "https://github.com/belikemustafa/mechatech/blob/main/js/main.js"
click node_language "https://github.com/belikemustafa/mechatech/blob/main/js/data/languages.js"
click node_themes "https://github.com/belikemustafa/mechatech/blob/main/js/data/themes.js"
click node_typing "https://github.com/belikemustafa/mechatech/blob/main/js/games/typingGame.js"
click node_bug "https://github.com/belikemustafa/mechatech/blob/main/js/games/bugGame.js"
click node_output "https://github.com/belikemustafa/mechatech/blob/main/js/games/outputGame.js"
click node_bigo "https://github.com/belikemustafa/mechatech/blob/main/js/games/bigOGame.js"
click node_scramble "https://github.com/belikemustafa/mechatech/blob/main/js/games/scrambleGame.js"
click node_fill "https://github.com/belikemustafa/mechatech/blob/main/js/games/fillGame.js"
click node_http "https://github.com/belikemustafa/mechatech/blob/main/js/games/httpGame.js"
click node_css "https://github.com/belikemustafa/mechatech/blob/main/js/games/cssLabGame.js"
click node_regex "https://github.com/belikemustafa/mechatech/blob/main/js/games/regexGame.js"
click node_design "https://github.com/belikemustafa/mechatech/blob/main/js/games/sysDesignGame.js"
click node_scenario "https://github.com/belikemustafa/mechatech/blob/main/js/games/scenarioGame.js"
click node_knowledge "https://github.com/belikemustafa/mechatech/blob/main/js/data/gkData.js"
click node_typingdata "https://github.com/belikemustafa/mechatech/blob/main/js/data/typingData.js"
click node_bugdata "https://github.com/belikemustafa/mechatech/blob/main/js/data/bugsData.js"
click node_outputdata "https://github.com/belikemustafa/mechatech/blob/main/js/data/outputData.js"
click node_bigodata "https://github.com/belikemustafa/mechatech/blob/main/js/data/bigOData.js"
click node_scrambledata "https://github.com/belikemustafa/mechatech/blob/main/js/data/scrambleData.js"
click node_filldata "https://github.com/belikemustafa/mechatech/blob/main/js/data/fillData.js"
click node_httpdata "https://github.com/belikemustafa/mechatech/blob/main/js/data/httpData.js"
click node_cssdata "https://github.com/belikemustafa/mechatech/blob/main/js/data/cssLabData.js"
click node_regexdata "https://github.com/belikemustafa/mechatech/blob/main/js/data/regexData.js"
click node_designdata "https://github.com/belikemustafa/mechatech/blob/main/js/data/sysDesignData.js"
click node_scenariodata "https://github.com/belikemustafa/mechatech/tree/main/js/data"
click node_otherdata "https://github.com/belikemustafa/mechatech/tree/main/js/data"
click node_highlight "https://github.com/belikemustafa/mechatech/blob/main/js/highlight.js"
click node_utils "https://github.com/belikemustafa/mechatech/blob/main/js/utils.js"
click node_sound "https://github.com/belikemustafa/mechatech/blob/main/js/sound.js"
click node_fx "https://github.com/belikemustafa/mechatech/blob/main/js/fx.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_hub toneBlue
class node_typing,node_bug,node_output,node_bigo,node_scramble,node_fill,node_http,node_css,node_regex,node_design,node_scenario,node_knowledge toneAmber
class node_language,node_themes,node_typingdata,node_bugdata,node_outputdata,node_bigodata,node_scrambledata,node_filldata,node_httpdata,node_cssdata,node_regexdata,node_designdata,node_scenariodata,node_otherdata toneMint
class node_highlight,node_utils,node_sound,node_fx toneRose
class node_player toneIndigo
```

## Components

### Arcade app

- [Game hub](https://github.com/belikemustafa/mechatech/blob/main/js/main.js): `js/main.js`

### Game experiences

- [Code Type Sprint](https://github.com/belikemustafa/mechatech/blob/main/js/games/typingGame.js): `js/games/typingGame.js`
- [Bug Hunter](https://github.com/belikemustafa/mechatech/blob/main/js/games/bugGame.js): `js/games/bugGame.js`
- [Trace Output](https://github.com/belikemustafa/mechatech/blob/main/js/games/outputGame.js): `js/games/outputGame.js`
- [Big-O Radar](https://github.com/belikemustafa/mechatech/blob/main/js/games/bigOGame.js): `js/games/bigOGame.js`
- [Syntax Scramble](https://github.com/belikemustafa/mechatech/blob/main/js/games/scrambleGame.js): `js/games/scrambleGame.js`
- [Code Fill Blitz](https://github.com/belikemustafa/mechatech/blob/main/js/games/fillGame.js): `js/games/fillGame.js`
- [API HTTP Reflex](https://github.com/belikemustafa/mechatech/blob/main/js/games/httpGame.js): `js/games/httpGame.js`
- [CSS Layout Lab](https://github.com/belikemustafa/mechatech/blob/main/js/games/cssLabGame.js): `js/games/cssLabGame.js`
- [Regex Lab](https://github.com/belikemustafa/mechatech/blob/main/js/games/regexGame.js): `js/games/regexGame.js`
- [System Design Triage](https://github.com/belikemustafa/mechatech/blob/main/js/games/sysDesignGame.js): `js/games/sysDesignGame.js`
- [Cyber Breach and AI](https://github.com/belikemustafa/mechatech/blob/main/js/games/scenarioGame.js): `js/games/scenarioGame.js`
- [CS Knowledge](https://github.com/belikemustafa/mechatech/blob/main/js/data/gkData.js): `js/data/gkData.js`

### Challenge content

- [Languages](https://github.com/belikemustafa/mechatech/blob/main/js/data/languages.js): `js/data/languages.js`
- [Editor themes](https://github.com/belikemustafa/mechatech/blob/main/js/data/themes.js): `js/data/themes.js`
- [Typing challenges](https://github.com/belikemustafa/mechatech/blob/main/js/data/typingData.js): `js/data/typingData.js`
- [Bug challenges](https://github.com/belikemustafa/mechatech/blob/main/js/data/bugsData.js): `js/data/bugsData.js`
- [Output challenges](https://github.com/belikemustafa/mechatech/blob/main/js/data/outputData.js): `js/data/outputData.js`
- [Complexity challenges](https://github.com/belikemustafa/mechatech/blob/main/js/data/bigOData.js): `js/data/bigOData.js`
- [Scramble challenges](https://github.com/belikemustafa/mechatech/blob/main/js/data/scrambleData.js): `js/data/scrambleData.js`
- [Fill challenges](https://github.com/belikemustafa/mechatech/blob/main/js/data/fillData.js): `js/data/fillData.js`
- [HTTP challenges](https://github.com/belikemustafa/mechatech/blob/main/js/data/httpData.js): `js/data/httpData.js`
- [CSS challenges](https://github.com/belikemustafa/mechatech/blob/main/js/data/cssLabData.js): `js/data/cssLabData.js`
- [Regex challenges](https://github.com/belikemustafa/mechatech/blob/main/js/data/regexData.js): `js/data/regexData.js`
- [Design challenges](https://github.com/belikemustafa/mechatech/blob/main/js/data/sysDesignData.js): `js/data/sysDesignData.js`
- [Security and AI content](https://github.com/belikemustafa/mechatech/tree/main/js/data): `js/data`
- [Additional challenge packs](https://github.com/belikemustafa/mechatech/tree/main/js/data): `js/data`

### Shared runtime

- [Code highlighting](https://github.com/belikemustafa/mechatech/blob/main/js/highlight.js): `js/highlight.js`
- [Game utilities](https://github.com/belikemustafa/mechatech/blob/main/js/utils.js): `js/utils.js`
- [Sound effects](https://github.com/belikemustafa/mechatech/blob/main/js/sound.js): `js/sound.js`
- [Visual effects](https://github.com/belikemustafa/mechatech/blob/main/js/fx.js): `js/fx.js`

### Other components

- **Player**

## Connections

- Player → Game hub: chooses game
- Game hub → Code Type Sprint: mounts game (evidence: `js/main.js`)
- Game hub → Bug Hunter: mounts game (evidence: `js/main.js`)
- Game hub → Trace Output: mounts game (evidence: `js/main.js`)
- Game hub → Big-O Radar: mounts game (evidence: `js/main.js`)
- Game hub → Syntax Scramble: mounts game (evidence: `js/main.js`)
- Game hub → Code Fill Blitz: mounts game (evidence: `js/main.js`)
- Game hub → API HTTP Reflex: mounts game (evidence: `js/main.js`)
- Game hub → CSS Layout Lab: mounts game (evidence: `js/main.js`)
- Game hub → Regex Lab: mounts game (evidence: `js/main.js`)
- Game hub → System Design Triage: mounts game (evidence: `js/main.js`)
- Game hub → Cyber Breach and AI: mounts game (evidence: `js/main.js`)
- Game hub → CS Knowledge: offers game (evidence: `js/main.js`)
- Game hub → Languages: configures languages (evidence: `js/main.js`)
- Game hub → Editor themes: applies themes (evidence: `js/main.js`)
- Game hub → Code Type Sprint: sets global timer (evidence: `js/main.js`)
- Code Type Sprint → Typing challenges: selects snippets (evidence: `js/games/typingGame.js`)
- Bug Hunter → Bug challenges: loads challenges (evidence: `js/games/bugGame.js`)
- Trace Output → Output challenges: loads challenges (evidence: `js/games/outputGame.js`)
- Big-O Radar → Complexity challenges: loads challenges (evidence: `js/games/bigOGame.js`)
- Syntax Scramble → Scramble challenges: selects challenges (evidence: `js/games/scrambleGame.js`)
- Code Fill Blitz → Fill challenges: loads challenges (evidence: `js/games/fillGame.js`)
- API HTTP Reflex → HTTP challenges: loads challenges (evidence: `js/games/httpGame.js`)
- CSS Layout Lab → CSS challenges: loads challenges (evidence: `js/games/cssLabGame.js`)
- Regex Lab → Regex challenges: loads challenges (evidence: `js/games/regexGame.js`)
- System Design Triage → Design challenges: loads challenges (evidence: `js/games/sysDesignGame.js`)
- Cyber Breach and AI → Security and AI content: uses content (evidence: `js/main.js`)
- Code Type Sprint → Languages: uses language metadata (evidence: `js/games/typingGame.js`)
- Syntax Scramble → Languages: uses language metadata (evidence: `js/games/scrambleGame.js`)
- Code Type Sprint → Code highlighting: tokenizes code (evidence: `js/games/typingGame.js`)
- Syntax Scramble → Code highlighting: highlights code (evidence: `js/games/scrambleGame.js`)
- Regex Lab → Game utilities: selects samples (evidence: `js/games/regexGame.js`)
- Code Type Sprint → Game utilities: filters snippets (evidence: `js/games/typingGame.js`)
- Syntax Scramble → Game utilities: shuffles lines (evidence: `js/games/scrambleGame.js`)
- Code Type Sprint → Sound effects: plays feedback (evidence: `js/games/typingGame.js`)
- Regex Lab → Visual effects: shakes feedback (evidence: `js/games/regexGame.js`)
- CSS Layout Lab → Visual effects: uses effects (evidence: `js/games/cssLabGame.js`)
- API HTTP Reflex → Visual effects: uses effects (evidence: `js/games/httpGame.js`)
- System Design Triage → Visual effects: uses effects (evidence: `js/games/sysDesignGame.js`)
- Player → Additional challenge packs: plays other games
