# manoj-engineer/k8squest architecture

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

- Interactive diagram: https://gitdiagram.com/manoj-engineer/k8squest
- Repository: https://github.com/manoj-engineer/k8squest

## Overview

K8sQuest is a local, terminal-based game for learning Kubernetes through 50 broken-resource missions. The player starts the game, selects a mission, investigates and fixes resources with kubectl in another terminal, then checks or validates the result to earn progress and XP. The README documents hints, guides, debriefs, resets, and safety features; the source excerpts show the engine’s dependencies on the UI, player naming, and safety modules. Unsampled level and world behavior is represented at directory level, with README-backed relationships.

Main entry points: [`engine/engine.py`](https://github.com/manoj-engineer/k8squest/blob/main/engine/engine.py) (Game engine), [`engine/reset.py`](https://github.com/manoj-engineer/k8squest/blob/main/engine/reset.py) (Level reset), [`tools/progress_tracker.py`](https://github.com/manoj-engineer/k8squest/blob/main/tools/progress_tracker.py) (Progress report), [`engine/retro_ui.py`](https://github.com/manoj-engineer/k8squest/blob/main/engine/retro_ui.py) (Retro interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Game experience"]
  node_engine["Game engine<br/>[engine.py]"]
  node_ui["Retro interface<br/>[retro_ui.py]"]
  node_identity["Player identity<br/>[player_name.py]"]
end

subgraph group_curriculum["Challenge curriculum"]
  node_world1["Core basics"]
  node_world2["Deployments"]
  node_world3["Networking"]
  node_world4["Storage"]
  node_world5["Security operations"]
end

subgraph group_cluster["Kubernetes practice"]
  node_cluster[("Kubernetes cluster")]
  node_kubectl["kubectl"]
  node_safety["Command safeguards<br/>[safety.py]"]
  node_reset["Level reset<br/>[reset.py]"]
end

subgraph group_learning["Progress and learning"]
  node_hints["Hints and guides<br/>[engine.py]"]
  node_debriefs["Mission debriefs<br/>[engine.py]"]
  node_progress["Progress tracking<br/>[engine.py]"]
  node_tracker["Progress report"]
  node_certificate["World certificates<br/>[certificate.py]"]
end

node_player(("Player"))

node_player -->|"starts and selects"| node_engine
node_engine -->|"renders with"| node_ui
node_engine -->|"gets player name"| node_identity
node_engine -->|"loads missions"| node_world1
node_engine -->|"loads missions"| node_world2
node_engine -->|"loads missions"| node_world3
node_engine -->|"loads missions"| node_world4
node_engine -->|"loads missions"| node_world5
node_player -->|"investigates and fixes"| node_kubectl
node_engine -->|"checks resources"| node_kubectl
node_kubectl -->|"reads and changes"| node_cluster
node_engine -->|"validates commands"| node_safety
node_engine -->|"deploys and validates"| node_cluster
node_player -->|"requests hints or guides"| node_engine
node_engine -->|"shows help"| node_hints
node_engine -->|"shows after completion"| node_debriefs
node_engine -->|"records completion"| node_progress
node_tracker -.->|"reports status"| node_progress
node_player -->|"requests reset"| node_reset
node_reset -->|"resets resources"| node_kubectl
node_progress -.->|"supplies achievement details"| node_certificate

click node_engine "https://github.com/manoj-engineer/k8squest/blob/main/engine/engine.py"
click node_ui "https://github.com/manoj-engineer/k8squest/blob/main/engine/retro_ui.py"
click node_identity "https://github.com/manoj-engineer/k8squest/blob/main/engine/player_name.py"
click node_world1 "https://github.com/manoj-engineer/k8squest/tree/main/worlds/world-1-basics"
click node_world2 "https://github.com/manoj-engineer/k8squest/tree/main/worlds/world-2-deployments"
click node_world3 "https://github.com/manoj-engineer/k8squest/tree/main/worlds/world-3-networking"
click node_world4 "https://github.com/manoj-engineer/k8squest/tree/main/worlds/world-4-storage"
click node_world5 "https://github.com/manoj-engineer/k8squest/tree/main/worlds/world-5-security"
click node_safety "https://github.com/manoj-engineer/k8squest/blob/main/engine/safety.py"
click node_reset "https://github.com/manoj-engineer/k8squest/blob/main/engine/reset.py"
click node_hints "https://github.com/manoj-engineer/k8squest/blob/main/engine/engine.py"
click node_debriefs "https://github.com/manoj-engineer/k8squest/blob/main/engine/engine.py"
click node_progress "https://github.com/manoj-engineer/k8squest/blob/main/engine/engine.py"
click node_tracker "https://github.com/manoj-engineer/k8squest/blob/main/tools/progress_tracker.py"
click node_certificate "https://github.com/manoj-engineer/k8squest/blob/main/engine/certificate.py"

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_engine,node_ui,node_identity toneBlue
class node_world1,node_world2,node_world3,node_world4,node_world5 toneAmber
class node_cluster,node_kubectl,node_safety,node_reset toneMint
class node_hints,node_debriefs,node_progress,node_tracker,node_certificate toneRose
class node_player toneIndigo
```

## Components

### Game experience

- [Game engine](https://github.com/manoj-engineer/k8squest/blob/main/engine/engine.py): `engine/engine.py`
- [Retro interface](https://github.com/manoj-engineer/k8squest/blob/main/engine/retro_ui.py): `engine/retro_ui.py`
- [Player identity](https://github.com/manoj-engineer/k8squest/blob/main/engine/player_name.py): `engine/player_name.py`

### Challenge curriculum

- [Core basics](https://github.com/manoj-engineer/k8squest/tree/main/worlds/world-1-basics): `worlds/world-1-basics`
- [Deployments](https://github.com/manoj-engineer/k8squest/tree/main/worlds/world-2-deployments): `worlds/world-2-deployments`
- [Networking](https://github.com/manoj-engineer/k8squest/tree/main/worlds/world-3-networking): `worlds/world-3-networking`
- [Storage](https://github.com/manoj-engineer/k8squest/tree/main/worlds/world-4-storage): `worlds/world-4-storage`
- [Security operations](https://github.com/manoj-engineer/k8squest/tree/main/worlds/world-5-security): `worlds/world-5-security`

### Kubernetes practice

- **Kubernetes cluster**
- **kubectl**
- [Command safeguards](https://github.com/manoj-engineer/k8squest/blob/main/engine/safety.py): `engine/safety.py`
- [Level reset](https://github.com/manoj-engineer/k8squest/blob/main/engine/reset.py): `engine/reset.py`

### Progress and learning

- [Hints and guides](https://github.com/manoj-engineer/k8squest/blob/main/engine/engine.py): `engine/engine.py`
- [Mission debriefs](https://github.com/manoj-engineer/k8squest/blob/main/engine/engine.py): `engine/engine.py`
- [Progress tracking](https://github.com/manoj-engineer/k8squest/blob/main/engine/engine.py): `engine/engine.py`
- [Progress report](https://github.com/manoj-engineer/k8squest/blob/main/tools/progress_tracker.py): `tools/progress_tracker.py`
- [World certificates](https://github.com/manoj-engineer/k8squest/blob/main/engine/certificate.py): `engine/certificate.py`

### Other components

- **Player**

## Connections

- Player → Game engine: starts and selects (evidence: `README.md`)
- Game engine → Retro interface: renders with (evidence: `engine/engine.py`)
- Game engine → Player identity: gets player name (evidence: `engine/engine.py`)
- Game engine → Core basics: loads missions (evidence: `README.md`)
- Game engine → Deployments: loads missions (evidence: `README.md`)
- Game engine → Networking: loads missions (evidence: `README.md`)
- Game engine → Storage: loads missions (evidence: `README.md`)
- Game engine → Security operations: loads missions (evidence: `README.md`)
- Player → kubectl: investigates and fixes (evidence: `README.md`)
- Game engine → kubectl: checks resources (evidence: `README.md`)
- kubectl → Kubernetes cluster: reads and changes (evidence: `README.md`)
- Game engine → Command safeguards: validates commands (evidence: `engine/engine.py`)
- Game engine → Kubernetes cluster: deploys and validates (evidence: `README.md`)
- Player → Game engine: requests hints or guides (evidence: `README.md`)
- Game engine → Hints and guides: shows help (evidence: `README.md`)
- Game engine → Mission debriefs: shows after completion (evidence: `README.md`)
- Game engine → Progress tracking: records completion (evidence: `README.md`)
- Progress report → Progress tracking: reports status
- Player → Level reset: requests reset (evidence: `README.md`)
- Level reset → kubectl: resets resources (evidence: `engine/reset.py`)
- Progress tracking → World certificates: supplies achievement details
