# ferryfif-warrior/cyberattack-simulation-edu architecture

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

- Interactive diagram: https://gitdiagram.com/ferryfif-warrior/cyberattack-simulation-edu
- Repository: https://github.com/ferryfif-warrior/cyberattack-simulation-edu

## Overview

Security Cat is a web-based cybersecurity learning and simulation application. A learner browses the lab catalog, opens a simulation and level, plays a floor using movement and interaction controls, chooses a response, and receives score/progress results. The server validates attempts, computes completion and badges, and persists per-user progress; dashboard and profile/authentication support the surrounding learning experience. The sampled controller shows server-side attempt scoring and persistence, while the tree shows additional simulation UI and content modules. Routing and several listed capabilities are represented only at the enclosing module level where source was not sampled.

Main entry points: [`resources/js/features/simulation/components/GameContainer.tsx`](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/features/simulation/components/GameContainer.tsx) (Game interface), [`routes/web.php`](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/DashboardController.php`](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/app/Http/Controllers/DashboardController.php) (Learner dashboard), [`resources/js/Pages/Simulation/Play.tsx`](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/Pages/Simulation/Play.tsx) (Play page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_landing["Landing and learning"]
  node_catalog["Lab catalog<br/>[Index.tsx]"]
  node_sim_detail["Simulation detail<br/>[Detail.tsx]"]
  node_level_detail["Level detail<br/>[LevelDetail.tsx]"]
  node_dashboard["Learner dashboard"]
end

subgraph group_identity["Accounts"]
  node_auth_routes["Auth routes<br/>[auth.php]"]
  node_auth_controllers["Login and registration"]
  node_user[("User account<br/>[User.php]")]
end

subgraph group_game["Simulation runtime"]
  node_play_page["Play page<br/>[Play.tsx]"]
  node_game_ui["Game interface<br/>[GameContainer.tsx]"]
  node_movement["Movement and interaction"]
  node_choice_ui["Choice and narrative<br/>[ChoicePanel.tsx]"]
  node_content["Floor content<br/>[registry.ts]"]
  node_game_store["Simulation state"]
end

subgraph group_progress["Progress tracking"]
  node_client_api["Progress API client<br/>[api.ts]"]
  node_api_routes["Simulation API routes<br/>[api.php]"]
  node_attempt_controller["Attempt and progress API"]
  node_sim_config["Simulation configuration<br/>[simulation.php]"]
  node_progress_model[("Simulation progress")]
end

node_learner(("Learner"))

node_learner -->|"opens pages"| node_web_routes
node_web_routes -->|"dispatches"| node_landing
node_web_routes -->|"dispatches"| node_dashboard
node_learner -->|"authenticates"| node_auth_routes
node_auth_routes -->|"dispatches"| node_auth_controllers
node_auth_controllers -->|"creates account"| node_user
node_learner -->|"browses labs"| node_catalog
node_catalog -->|"opens simulation"| node_sim_detail
node_sim_detail -->|"selects level"| node_level_detail
node_level_detail -->|"starts floor"| node_play_page
node_play_page -->|"renders"| node_game_ui
node_game_ui -->|"uses controls"| node_movement
node_game_ui -->|"presents choices"| node_choice_ui
node_game_ui -->|"loads content"| node_content
node_game_ui -->|"updates state"| node_game_store
node_play_page -->|"requests progress"| node_client_api
node_client_api -->|"sends API request"| node_api_routes
node_api_routes -->|"dispatches"| node_attempt_controller
node_attempt_controller -->|"reads level settings"| node_sim_config
node_attempt_controller -->|"reads and writes"| node_progress_model
node_progress_model -->|"belongs to"| node_user
node_dashboard -->|"reads lab catalog"| node_sim_config
node_dashboard -->|"returns overview"| node_learner

click node_web_routes "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/routes/web.php"
click node_landing "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/app/Http/Controllers/LandingController.php"
click node_catalog "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/Pages/Simulations/Index.tsx"
click node_sim_detail "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/Pages/Simulation/Detail.tsx"
click node_level_detail "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/Pages/Simulation/LevelDetail.tsx"
click node_dashboard "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/app/Http/Controllers/DashboardController.php"
click node_auth_routes "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/routes/auth.php"
click node_auth_controllers "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/app/Http/Controllers/Auth/RegisterController.php"
click node_user "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/app/Models/User.php"
click node_play_page "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/Pages/Simulation/Play.tsx"
click node_game_ui "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/features/simulation/components/GameContainer.tsx"
click node_movement "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/features/simulation/engine/useKeyboardMovement.ts"
click node_choice_ui "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/features/simulation/components/ChoicePanel.tsx"
click node_content "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/features/simulation/data/registry.ts"
click node_game_store "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/features/simulation/store/useSimulationStore.ts"
click node_client_api "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/features/simulation/lib/api.ts"
click node_api_routes "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/routes/api.php"
click node_attempt_controller "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/app/Http/Controllers/Api/SimulationAttemptController.php"
click node_sim_config "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/config/simulation.php"
click node_progress_model "https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/app/Models/SimulationProgress.php"

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_web_routes,node_landing,node_catalog,node_sim_detail,node_level_detail,node_dashboard toneBlue
class node_auth_routes,node_auth_controllers,node_user toneAmber
class node_play_page,node_game_ui,node_movement,node_choice_ui,node_content,node_game_store toneMint
class node_client_api,node_api_routes,node_attempt_controller,node_sim_config,node_progress_model toneRose
class node_learner toneIndigo
```

## Components

### Web experience

- [Web routes](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/routes/web.php): `routes/web.php`
- [Landing and learning](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/app/Http/Controllers/LandingController.php): `app/Http/Controllers/LandingController.php`
- [Lab catalog](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/Pages/Simulations/Index.tsx): `resources/js/Pages/Simulations/Index.tsx`
- [Simulation detail](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/Pages/Simulation/Detail.tsx): `resources/js/Pages/Simulation/Detail.tsx`
- [Level detail](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/Pages/Simulation/LevelDetail.tsx): `resources/js/Pages/Simulation/LevelDetail.tsx`
- [Learner dashboard](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`

### Accounts

- [Auth routes](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/routes/auth.php): `routes/auth.php`
- [Login and registration](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/app/Http/Controllers/Auth/RegisterController.php): `app/Http/Controllers/Auth/RegisterController.php`
- [User account](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/app/Models/User.php): `app/Models/User.php`

### Simulation runtime

- [Play page](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/Pages/Simulation/Play.tsx): `resources/js/Pages/Simulation/Play.tsx`
- [Game interface](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/features/simulation/components/GameContainer.tsx): `resources/js/features/simulation/components/GameContainer.tsx`
- [Movement and interaction](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/features/simulation/engine/useKeyboardMovement.ts): `resources/js/features/simulation/engine/useKeyboardMovement.ts`
- [Choice and narrative](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/features/simulation/components/ChoicePanel.tsx): `resources/js/features/simulation/components/ChoicePanel.tsx`
- [Floor content](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/features/simulation/data/registry.ts): `resources/js/features/simulation/data/registry.ts`
- [Simulation state](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/features/simulation/store/useSimulationStore.ts): `resources/js/features/simulation/store/useSimulationStore.ts`

### Progress tracking

- [Progress API client](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/resources/js/features/simulation/lib/api.ts): `resources/js/features/simulation/lib/api.ts`
- [Simulation API routes](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/routes/api.php): `routes/api.php`
- [Attempt and progress API](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/app/Http/Controllers/Api/SimulationAttemptController.php): `app/Http/Controllers/Api/SimulationAttemptController.php`
- [Simulation configuration](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/config/simulation.php): `config/simulation.php`
- [Simulation progress](https://github.com/ferryfif-warrior/cyberattack-simulation-edu/blob/main/app/Models/SimulationProgress.php): `app/Models/SimulationProgress.php`

### Other components

- **Learner**

## Connections

- Learner → Web routes: opens pages
- Web routes → Landing and learning: dispatches
- Web routes → Learner dashboard: dispatches
- Learner → Auth routes: authenticates
- Auth routes → Login and registration: dispatches
- Login and registration → User account: creates account
- Learner → Lab catalog: browses labs
- Lab catalog → Simulation detail: opens simulation
- Simulation detail → Level detail: selects level
- Level detail → Play page: starts floor
- Play page → Game interface: renders
- Game interface → Movement and interaction: uses controls
- Game interface → Choice and narrative: presents choices
- Game interface → Floor content: loads content
- Game interface → Simulation state: updates state
- Play page → Progress API client: requests progress
- Progress API client → Simulation API routes: sends API request
- Simulation API routes → Attempt and progress API: dispatches
- Attempt and progress API → Simulation configuration: reads level settings
- Attempt and progress API → Simulation progress: reads and writes
- Simulation progress → User account: belongs to
- Learner dashboard → Simulation configuration: reads lab catalog
- Learner dashboard → Learner: returns overview
