# andrewlandicho09-dotcom/css-warm architecture

> Architecture diagram of the GitHub repository andrewlandicho09-dotcom/css-warm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/andrewlandicho09-dotcom/css-warm
- Repository: https://github.com/andrewlandicho09-dotcom/css-warm

## Overview

CSS CodeQuest is a browser-based CSS learning game. Players choose Adventure, Practice, or Learn from the hub: Adventure leads through a map into CSS battles, where challenges are graded and victories update progression; Practice offers a live sandbox; Learn presents structured lessons and tracks completion. Progression also supports profile and streak information, while Google sign-in is optional. Page-level behavior is described in the README but those page sources were not excerpted, so those links rely on documented relationships; unsampled implementation details are omitted.

Main entry points: [`index.html`](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/index.html) (Mode Hub), [`game.js`](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/game.js) (Battle Engine), [`progress.js`](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/progress.js) (Player Progress), [`learn.html`](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/learn.html) (Lesson Experience)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Mode Selection"]
  node_hub["Mode Hub<br/>[index.html]"]
  node_map["Adventure Map<br/>[adventure.html]"]
end

subgraph group_learning["Learning Modes"]
  node_sandbox["Practice Sandbox<br/>[practice.html]"]
  node_lesson_ui["Lesson Experience<br/>[learn.html]"]
  node_curriculum["CSS Curriculum<br/>[w3_lessons.js]"]
end

subgraph group_battle["Adventure Battles"]
  node_arena["Battle Arena<br/>[game.html]"]
  node_battle_engine["Battle Engine<br/>[game.js]"]
  node_challenge_data["Stage Challenges<br/>[game-data.js]"]
  node_css_grader["CSS Grader<br/>[css-grader.js]"]
end

subgraph group_player["Player Services"]
  node_progress["Player Progress<br/>[progress.js]"]
  node_progress_store[("Browser Storage")]
  node_auth["Google Auth<br/>[auth.js]"]
end

node_player_actor(("Player"))
node_firebase["Firebase Auth"]

node_player_actor -->|"chooses mode"| node_hub
node_hub -->|"opens adventure"| node_map
node_map -->|"opens battle"| node_arena
node_hub -->|"opens practice"| node_sandbox
node_hub -->|"opens lessons"| node_lesson_ui
node_arena -->|"runs logic"| node_battle_engine
node_battle_engine -->|"loads stages"| node_challenge_data
node_battle_engine -->|"grades CSS"| node_css_grader
node_battle_engine -->|"records results"| node_progress
node_lesson_ui -->|"uses lessons"| node_curriculum
node_lesson_ui -->|"tracks completion"| node_progress
node_hub -->|"shows status"| node_progress
node_progress -->|"reads and writes"| node_progress_store
node_hub -->|"offers sign-in"| node_auth
node_auth -.->|"loads SDK"| node_firebase

click node_hub "https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/index.html"
click node_map "https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/adventure.html"
click node_arena "https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/game.html"
click node_battle_engine "https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/game.js"
click node_challenge_data "https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/game-data.js"
click node_css_grader "https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/css-grader.js"
click node_sandbox "https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/practice.html"
click node_lesson_ui "https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/learn.html"
click node_curriculum "https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/w3_lessons.js"
click node_progress "https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/progress.js"
click node_auth "https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/auth.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,node_map toneBlue
class node_sandbox,node_lesson_ui,node_curriculum toneAmber
class node_arena,node_battle_engine,node_challenge_data,node_css_grader toneMint
class node_progress,node_progress_store,node_auth toneRose
class node_player_actor,node_firebase toneIndigo
```

## Components

### Mode Selection

- [Mode Hub](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/index.html): `index.html`
- [Adventure Map](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/adventure.html): `adventure.html`

### Learning Modes

- [Practice Sandbox](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/practice.html): `practice.html`
- [Lesson Experience](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/learn.html): `learn.html`
- [CSS Curriculum](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/w3_lessons.js): `w3_lessons.js`

### Adventure Battles

- [Battle Arena](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/game.html): `game.html`
- [Battle Engine](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/game.js): `game.js`
- [Stage Challenges](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/game-data.js): `game-data.js`
- [CSS Grader](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/css-grader.js): `css-grader.js`

### Player Services

- [Player Progress](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/progress.js): `progress.js`
- **Browser Storage**
- [Google Auth](https://github.com/andrewlandicho09-dotcom/css-warm/blob/main/auth.js): `auth.js`

### Other components

- **Player**
- **Firebase Auth**

## Connections

- Player → Mode Hub: chooses mode (evidence: `README.md`)
- Mode Hub → Adventure Map: opens adventure (evidence: `README.md`)
- Adventure Map → Battle Arena: opens battle (evidence: `README.md`)
- Mode Hub → Practice Sandbox: opens practice (evidence: `README.md`)
- Mode Hub → Lesson Experience: opens lessons (evidence: `README.md`)
- Battle Arena → Battle Engine: runs logic (evidence: `README.md`)
- Battle Engine → Stage Challenges: loads stages (evidence: `game.js`)
- Battle Engine → CSS Grader: grades CSS (evidence: `game.js`)
- Battle Engine → Player Progress: records results (evidence: `game.js`)
- Lesson Experience → CSS Curriculum: uses lessons (evidence: `README.md`)
- Lesson Experience → Player Progress: tracks completion (evidence: `README.md`)
- Mode Hub → Player Progress: shows status (evidence: `README.md`)
- Player Progress → Browser Storage: reads and writes (evidence: `progress.js`)
- Mode Hub → Google Auth: offers sign-in (evidence: `README.md`)
- Google Auth → Firebase Auth: loads SDK (evidence: `auth.js`)
