# iyadeh/securelab architecture

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

- Interactive diagram: https://gitdiagram.com/iyadeh/securelab
- Repository: https://github.com/iyadeh/securelab

## Overview

SecureLab is a web-based cybersecurity learning product. Learners browse structured learning paths, work through lessons, run vulnerability labs, and review progress and achievements; account and security settings are supporting workflows. Laravel controllers serve Inertia pages to the React client, with Eloquent-backed domain state and dedicated progress and lab-simulation services. The file tree and sampled excerpts support these major capabilities, but several routes, controllers, and service implementations were not sampled, so uncertain internal call wiring is omitted.

Main entry points: [`routes/web.php`](https://github.com/iyadeh/securelab/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/LearningPathController.php`](https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/LearningPathController.php) (Learning paths), [`config/database.php`](https://github.com/iyadeh/securelab/blob/main/config/database.php) (Application database), [`app/Services/LearningProgressService.php`](https://github.com/iyadeh/securelab/blob/main/app/Services/LearningProgressService.php) (Progress calculations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_routes["Web routes<br/>[web.php]"]
  node_client["Inertia client<br/>[app.tsx]"]
  node_blade["HTML shell<br/>[app.blade.php]"]
  node_dashboard["Dashboard"]
  node_dashboard_ui["Dashboard view<br/>[dashboard.tsx]"]
end

subgraph group_learning["Learning journey"]
  node_paths_controller["Learning paths"]
  node_paths_ui["Path views<br/>[learning-paths.tsx]"]
  node_path_detail_ui["Path detail"]
  node_lesson_controller["Lesson delivery"]
  node_lesson_ui["Lesson view<br/>[lesson.tsx]"]
  node_curriculum["Curriculum models<br/>[LearningPath.php]"]
end

subgraph group_labs["Security labs"]
  node_lab_controller["Lab catalog<br/>[LabController.php]"]
  node_lab_sim_controller["Lab simulation"]
  node_lab_runtime["Simulation runtime"]
  node_simulators["Vulnerability simulators"]
  node_lab_ui["Lab pages<br/>[labs.tsx]"]
  node_workspace_ui["Lab workspace<br/>[lab-workspace.tsx]"]
end

subgraph group_progress["Progress and awards"]
  node_progress_service["Progress calculations"]
  node_lesson_progress_controller["Lesson progress"]
  node_progress_controller["Progress summary"]
  node_progress_ui["Progress view<br/>[progress.tsx]"]
  node_achievement_controller["Achievements"]
  node_achievement_service["Award logic"]
  node_achievement_ui["Achievement view<br/>[achievements.tsx]"]
end

subgraph group_account["Accounts"]
  node_account_controller["Profile settings"]
  node_security_controller["Security settings"]
  node_auth_provider["Authentication setup"]
  node_user_model["User account<br/>[User.php]"]
end

node_learner(("Learner"))
node_database[("Application database<br/>[database.php]")]

node_learner -->|"sends requests"| node_routes
node_routes -->|"dispatches"| node_dashboard
node_routes -->|"dispatches"| node_paths_controller
node_routes -->|"dispatches"| node_lesson_controller
node_routes -->|"dispatches"| node_lesson_progress_controller
node_routes -->|"dispatches"| node_lab_controller
node_routes -->|"dispatches"| node_lab_sim_controller
node_routes -->|"dispatches"| node_progress_controller
node_routes -->|"dispatches"| node_achievement_controller
node_routes -->|"dispatches"| node_account_controller
node_routes -->|"dispatches"| node_security_controller
node_client -->|"mounts through"| node_blade
node_dashboard -->|"calculates overview"| node_progress_service
node_dashboard -->|"renders props"| node_dashboard_ui
node_paths_controller -->|"calculates path state"| node_progress_service
node_paths_controller -->|"renders props"| node_paths_ui
node_paths_controller -->|"renders props"| node_path_detail_ui
node_paths_controller -->|"loads curriculum"| node_curriculum
node_lesson_controller -->|"renders lesson"| node_lesson_ui
node_lesson_progress_controller -->|"updates progress"| node_progress_service
node_progress_controller -->|"calculates summary"| node_progress_service
node_progress_controller -->|"renders props"| node_progress_ui
node_achievement_controller -->|"checks awards"| node_achievement_service
node_achievement_controller -->|"renders props"| node_achievement_ui
node_lab_controller -->|"renders catalog"| node_lab_ui
node_lab_sim_controller -->|"runs simulation"| node_lab_runtime
node_lab_runtime -->|"dispatches simulation"| node_simulators
node_lab_sim_controller -->|"returns results"| node_workspace_ui
node_account_controller -->|"updates account"| node_user_model
node_security_controller -->|"updates credentials"| node_user_model
node_auth_provider -->|"configures authentication"| node_user_model
node_dashboard -->|"reads records"| node_database
node_paths_controller -->|"reads curriculum"| node_database
node_progress_service -->|"reads progress"| node_database
node_lesson_progress_controller -->|"persists progress"| node_database
node_lab_sim_controller -->|"persists lab state"| node_database
node_achievement_service -->|"stores awards"| node_database
node_user_model -->|"persists account"| node_database

click node_routes "https://github.com/iyadeh/securelab/blob/main/routes/web.php"
click node_client "https://github.com/iyadeh/securelab/blob/main/resources/js/app.tsx"
click node_blade "https://github.com/iyadeh/securelab/blob/main/resources/views/app.blade.php"
click node_dashboard "https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/DashboardController.php"
click node_dashboard_ui "https://github.com/iyadeh/securelab/blob/main/resources/js/pages/dashboard.tsx"
click node_paths_controller "https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/LearningPathController.php"
click node_paths_ui "https://github.com/iyadeh/securelab/blob/main/resources/js/pages/learning-paths.tsx"
click node_path_detail_ui "https://github.com/iyadeh/securelab/blob/main/resources/js/pages/learning-path-detail.tsx"
click node_lesson_controller "https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/LessonController.php"
click node_lesson_ui "https://github.com/iyadeh/securelab/blob/main/resources/js/pages/lesson.tsx"
click node_curriculum "https://github.com/iyadeh/securelab/blob/main/app/Models/LearningPath.php"
click node_progress_service "https://github.com/iyadeh/securelab/blob/main/app/Services/LearningProgressService.php"
click node_lesson_progress_controller "https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/LessonProgressController.php"
click node_progress_controller "https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/ProgressController.php"
click node_progress_ui "https://github.com/iyadeh/securelab/blob/main/resources/js/pages/progress.tsx"
click node_achievement_controller "https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/AchievementController.php"
click node_achievement_service "https://github.com/iyadeh/securelab/blob/main/app/Services/AchievementService.php"
click node_achievement_ui "https://github.com/iyadeh/securelab/blob/main/resources/js/pages/achievements.tsx"
click node_lab_controller "https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/LabController.php"
click node_lab_sim_controller "https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/LabSimulationController.php"
click node_lab_runtime "https://github.com/iyadeh/securelab/blob/main/app/Services/Labs/SimulationLabRuntime.php"
click node_simulators "https://github.com/iyadeh/securelab/blob/main/app/Services/Labs/Simulators/SqlInjectionAuthenticationBypassSimulator.php"
click node_lab_ui "https://github.com/iyadeh/securelab/blob/main/resources/js/pages/labs.tsx"
click node_workspace_ui "https://github.com/iyadeh/securelab/blob/main/resources/js/pages/lab-workspace.tsx"
click node_account_controller "https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/Settings/ProfileController.php"
click node_security_controller "https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/Settings/SecurityController.php"
click node_auth_provider "https://github.com/iyadeh/securelab/blob/main/app/Providers/FortifyServiceProvider.php"
click node_user_model "https://github.com/iyadeh/securelab/blob/main/app/Models/User.php"
click node_database "https://github.com/iyadeh/securelab/blob/main/config/database.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_routes,node_client,node_blade,node_dashboard,node_dashboard_ui toneBlue
class node_paths_controller,node_paths_ui,node_path_detail_ui,node_lesson_controller,node_lesson_ui,node_curriculum,node_database toneAmber
class node_lab_controller,node_lab_sim_controller,node_lab_runtime,node_simulators,node_lab_ui,node_workspace_ui toneMint
class node_progress_service,node_lesson_progress_controller,node_progress_controller,node_progress_ui,node_achievement_controller,node_achievement_service,node_achievement_ui toneRose
class node_account_controller,node_security_controller,node_auth_provider,node_user_model,node_learner toneIndigo
```

## Components

### Web interface

- [Web routes](https://github.com/iyadeh/securelab/blob/main/routes/web.php): `routes/web.php`
- [Inertia client](https://github.com/iyadeh/securelab/blob/main/resources/js/app.tsx): `resources/js/app.tsx`
- [HTML shell](https://github.com/iyadeh/securelab/blob/main/resources/views/app.blade.php): `resources/views/app.blade.php`
- [Dashboard](https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- [Dashboard view](https://github.com/iyadeh/securelab/blob/main/resources/js/pages/dashboard.tsx): `resources/js/pages/dashboard.tsx`

### Learning journey

- [Learning paths](https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/LearningPathController.php): `app/Http/Controllers/LearningPathController.php`
- [Path views](https://github.com/iyadeh/securelab/blob/main/resources/js/pages/learning-paths.tsx): `resources/js/pages/learning-paths.tsx`
- [Path detail](https://github.com/iyadeh/securelab/blob/main/resources/js/pages/learning-path-detail.tsx): `resources/js/pages/learning-path-detail.tsx`
- [Lesson delivery](https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/LessonController.php): `app/Http/Controllers/LessonController.php`
- [Lesson view](https://github.com/iyadeh/securelab/blob/main/resources/js/pages/lesson.tsx): `resources/js/pages/lesson.tsx`
- [Curriculum models](https://github.com/iyadeh/securelab/blob/main/app/Models/LearningPath.php): `app/Models/LearningPath.php`

### Security labs

- [Lab catalog](https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/LabController.php): `app/Http/Controllers/LabController.php`
- [Lab simulation](https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/LabSimulationController.php): `app/Http/Controllers/LabSimulationController.php`
- [Simulation runtime](https://github.com/iyadeh/securelab/blob/main/app/Services/Labs/SimulationLabRuntime.php): `app/Services/Labs/SimulationLabRuntime.php`
- [Vulnerability simulators](https://github.com/iyadeh/securelab/blob/main/app/Services/Labs/Simulators/SqlInjectionAuthenticationBypassSimulator.php): `app/Services/Labs/Simulators/SqlInjectionAuthenticationBypassSimulator.php`
- [Lab pages](https://github.com/iyadeh/securelab/blob/main/resources/js/pages/labs.tsx): `resources/js/pages/labs.tsx`
- [Lab workspace](https://github.com/iyadeh/securelab/blob/main/resources/js/pages/lab-workspace.tsx): `resources/js/pages/lab-workspace.tsx`

### Progress and awards

- [Progress calculations](https://github.com/iyadeh/securelab/blob/main/app/Services/LearningProgressService.php): `app/Services/LearningProgressService.php`
- [Lesson progress](https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/LessonProgressController.php): `app/Http/Controllers/LessonProgressController.php`
- [Progress summary](https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/ProgressController.php): `app/Http/Controllers/ProgressController.php`
- [Progress view](https://github.com/iyadeh/securelab/blob/main/resources/js/pages/progress.tsx): `resources/js/pages/progress.tsx`
- [Achievements](https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/AchievementController.php): `app/Http/Controllers/AchievementController.php`
- [Award logic](https://github.com/iyadeh/securelab/blob/main/app/Services/AchievementService.php): `app/Services/AchievementService.php`
- [Achievement view](https://github.com/iyadeh/securelab/blob/main/resources/js/pages/achievements.tsx): `resources/js/pages/achievements.tsx`

### Accounts

- [Profile settings](https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/Settings/ProfileController.php): `app/Http/Controllers/Settings/ProfileController.php`
- [Security settings](https://github.com/iyadeh/securelab/blob/main/app/Http/Controllers/Settings/SecurityController.php): `app/Http/Controllers/Settings/SecurityController.php`
- [Authentication setup](https://github.com/iyadeh/securelab/blob/main/app/Providers/FortifyServiceProvider.php): `app/Providers/FortifyServiceProvider.php`
- [User account](https://github.com/iyadeh/securelab/blob/main/app/Models/User.php): `app/Models/User.php`

### Other components

- **Learner**
- [Application database](https://github.com/iyadeh/securelab/blob/main/config/database.php): `config/database.php`

## Connections

- Learner → Web routes: sends requests
- Web routes → Dashboard: dispatches
- Web routes → Learning paths: dispatches
- Web routes → Lesson delivery: dispatches
- Web routes → Lesson progress: dispatches
- Web routes → Lab catalog: dispatches
- Web routes → Lab simulation: dispatches
- Web routes → Progress summary: dispatches
- Web routes → Achievements: dispatches
- Web routes → Profile settings: dispatches
- Web routes → Security settings: dispatches
- Inertia client → HTML shell: mounts through
- Dashboard → Progress calculations: calculates overview
- Dashboard → Dashboard view: renders props
- Learning paths → Progress calculations: calculates path state
- Learning paths → Path views: renders props
- Learning paths → Path detail: renders props
- Learning paths → Curriculum models: loads curriculum
- Lesson delivery → Lesson view: renders lesson
- Lesson progress → Progress calculations: updates progress
- Progress summary → Progress calculations: calculates summary
- Progress summary → Progress view: renders props
- Achievements → Award logic: checks awards
- Achievements → Achievement view: renders props
- Lab catalog → Lab pages: renders catalog
- Lab simulation → Simulation runtime: runs simulation
- Simulation runtime → Vulnerability simulators: dispatches simulation
- Lab simulation → Lab workspace: returns results
- Profile settings → User account: updates account
- Security settings → User account: updates credentials
- Authentication setup → User account: configures authentication
- Dashboard → Application database: reads records
- Learning paths → Application database: reads curriculum
- Progress calculations → Application database: reads progress
- Lesson progress → Application database: persists progress
- Lab simulation → Application database: persists lab state
- Award logic → Application database: stores awards
- User account → Application database: persists account
