# rainyy-lynhsj/b-ready architecture

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

- Interactive diagram: https://gitdiagram.com/rainyy-lynhsj/b-ready
- Repository: https://github.com/rainyy-lynhsj/b-ready

## Overview

This is a Laravel web application with teacher/trainer roles and a training-domain data model; the README describes Laravel rather than the product’s feature set. The visible workflow is browser request → web/auth routing → authentication or profile handling → rendered page, with workshop, course/module, assessment, and classroom records represented by Eloquent models. Those domain branches are supported mainly by model references in the source index, not inspected feature controllers, so their runtime orchestration is not shown. The graph omits unverified domain flows and notes relationships only where the shown routes, source excerpts, or source-index references support them.

Main entry points: [`app/Models/User.php`](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/User.php) (User accounts), [`routes/auth.php`](https://github.com/rainyy-lynhsj/b-ready/blob/main/routes/auth.php) (Auth routes), [`app/Http/Controllers/Auth/AuthenticatedSessionController.php`](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php) (Login handling), [`app/Http/Controllers/Auth/RegisteredUserController.php`](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php) (Registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_auth_routes["Auth routes<br/>[auth.php]"]
  node_auth_pages["Auth pages"]
  node_profile_pages["Profile pages<br/>[edit.blade.php]"]
  node_dashboard_pages["Dashboards"]
end

subgraph group_identity["Identity and profile"]
  node_login["Login handling"]
  node_registration["Registration"]
  node_email_verification["Email verification"]
  node_profile["Profile handling"]
  node_login_request["Login validation<br/>[LoginRequest.php]"]
  node_role_gate["Role middleware<br/>[RoleMiddleware.php]"]
  node_users["User accounts<br/>[User.php]"]
end

subgraph group_training["Training content"]
  node_courses["Courses<br/>[Course.php]"]
  node_modules["Modules<br/>[Module.php]"]
  node_materials["Learning materials<br/>[Material.php]"]
  node_workshops["Workshops<br/>[Workshop.php]"]
  node_workshop_modules["Workshop modules<br/>[WorkshopModule.php]"]
end

subgraph group_delivery["Learning delivery"]
  node_assessments["Assessments<br/>[Assessment.php]"]
  node_attempts["Assessment attempts"]
  node_answers["Assessment answers"]
  node_progress["Module progress<br/>[ModuleProgress.php]"]
  node_classroom["Classroom delivery"]
  node_student_results["Student results<br/>[StudentResult.php]"]
end

node_browser(("Browser user"))

node_browser -->|"requests pages"| node_web_routes
node_web_routes -->|"loads routes"| node_auth_routes
node_auth_routes -->|"routes login"| node_login
node_auth_routes -->|"routes registration"| node_registration
node_auth_routes -->|"routes verification"| node_email_verification
node_auth_routes -->|"routes profile"| node_profile
node_login -->|"authenticates with"| node_login_request
node_login -->|"redirects to"| node_dashboard_pages
node_registration -->|"creates account"| node_users
node_registration -->|"redirects to"| node_dashboard_pages
node_login -->|"renders login"| node_auth_pages
node_registration -->|"renders registration"| node_auth_pages
node_profile -->|"renders profile"| node_profile_pages
node_profile -->|"updates account"| node_users
node_profile -->|"redirects after update"| node_dashboard_pages
node_users -->|"has courses"| node_courses
node_users -->|"joins workshops"| node_workshops
node_users -->|"has progress"| node_progress
node_users -->|"has attempts"| node_attempts
node_users -->|"has implementations"| node_classroom
node_courses -->|"has modules"| node_modules
node_modules -->|"has materials"| node_materials
node_modules -->|"assigned through"| node_workshop_modules
node_workshops -->|"has modules"| node_workshop_modules
node_workshops -->|"has assessment"| node_assessments
node_modules -->|"has progress records"| node_progress
node_assessments -->|"has attempts"| node_attempts
node_attempts -->|"has answers"| node_answers
node_classroom -->|"has results"| node_student_results

click node_web_routes "https://github.com/rainyy-lynhsj/b-ready/blob/main/routes/web.php"
click node_auth_routes "https://github.com/rainyy-lynhsj/b-ready/blob/main/routes/auth.php"
click node_auth_pages "https://github.com/rainyy-lynhsj/b-ready/tree/main/resources/views/auth"
click node_profile_pages "https://github.com/rainyy-lynhsj/b-ready/blob/main/resources/views/profile/edit.blade.php"
click node_dashboard_pages "https://github.com/rainyy-lynhsj/b-ready/blob/main/resources/views/dashboard.blade.php"
click node_login "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_registration "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_email_verification "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Controllers/Auth/VerifyEmailController.php"
click node_profile "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Controllers/ProfileController.php"
click node_login_request "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Requests/Auth/LoginRequest.php"
click node_role_gate "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Middleware/RoleMiddleware.php"
click node_users "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/User.php"
click node_courses "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/Course.php"
click node_modules "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/Module.php"
click node_materials "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/Material.php"
click node_workshops "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/Workshop.php"
click node_workshop_modules "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/WorkshopModule.php"
click node_assessments "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/Assessment.php"
click node_attempts "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/AssessmentAttempt.php"
click node_answers "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/AssessmentAnswer.php"
click node_progress "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/ModuleProgress.php"
click node_classroom "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/ClassroomImplementation.php"
click node_student_results "https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/StudentResult.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_auth_routes,node_auth_pages,node_profile_pages,node_dashboard_pages,node_browser toneBlue
class node_login,node_registration,node_email_verification,node_profile,node_login_request,node_role_gate,node_users toneAmber
class node_courses,node_modules,node_materials,node_workshops,node_workshop_modules toneMint
class node_assessments,node_attempts,node_answers,node_progress,node_classroom,node_student_results toneRose
```

## Components

### Web experience

- [Web routes](https://github.com/rainyy-lynhsj/b-ready/blob/main/routes/web.php): `routes/web.php`
- [Auth routes](https://github.com/rainyy-lynhsj/b-ready/blob/main/routes/auth.php): `routes/auth.php`
- [Auth pages](https://github.com/rainyy-lynhsj/b-ready/tree/main/resources/views/auth): `resources/views/auth`
- [Profile pages](https://github.com/rainyy-lynhsj/b-ready/blob/main/resources/views/profile/edit.blade.php): `resources/views/profile/edit.blade.php`
- [Dashboards](https://github.com/rainyy-lynhsj/b-ready/blob/main/resources/views/dashboard.blade.php): `resources/views/dashboard.blade.php`

### Identity and profile

- [Login handling](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Registration](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [Email verification](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Controllers/Auth/VerifyEmailController.php): `app/Http/Controllers/Auth/VerifyEmailController.php`
- [Profile handling](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Controllers/ProfileController.php): `app/Http/Controllers/ProfileController.php`
- [Login validation](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Requests/Auth/LoginRequest.php): `app/Http/Requests/Auth/LoginRequest.php`
- [Role middleware](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Http/Middleware/RoleMiddleware.php): `app/Http/Middleware/RoleMiddleware.php`
- [User accounts](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/User.php): `app/Models/User.php`

### Training content

- [Courses](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/Course.php): `app/Models/Course.php`
- [Modules](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/Module.php): `app/Models/Module.php`
- [Learning materials](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/Material.php): `app/Models/Material.php`
- [Workshops](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/Workshop.php): `app/Models/Workshop.php`
- [Workshop modules](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/WorkshopModule.php): `app/Models/WorkshopModule.php`

### Learning delivery

- [Assessments](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/Assessment.php): `app/Models/Assessment.php`
- [Assessment attempts](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/AssessmentAttempt.php): `app/Models/AssessmentAttempt.php`
- [Assessment answers](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/AssessmentAnswer.php): `app/Models/AssessmentAnswer.php`
- [Module progress](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/ModuleProgress.php): `app/Models/ModuleProgress.php`
- [Classroom delivery](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/ClassroomImplementation.php): `app/Models/ClassroomImplementation.php`
- [Student results](https://github.com/rainyy-lynhsj/b-ready/blob/main/app/Models/StudentResult.php): `app/Models/StudentResult.php`

### Other components

- **Browser user**

## Connections

- Browser user → Web routes: requests pages (evidence: `routes/web.php`)
- Web routes → Auth routes: loads routes (evidence: `routes/web.php`)
- Auth routes → Login handling: routes login (evidence: `routes/auth.php`)
- Auth routes → Registration: routes registration (evidence: `routes/auth.php`)
- Auth routes → Email verification: routes verification (evidence: `routes/auth.php`)
- Auth routes → Profile handling: routes profile (evidence: `routes/web.php`)
- Login handling → Login validation: authenticates with (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Login handling → Dashboards: redirects to (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Registration → User accounts: creates account (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Registration → Dashboards: redirects to (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Login handling → Auth pages: renders login (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Registration → Auth pages: renders registration (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Profile handling → Profile pages: renders profile (evidence: `app/Http/Controllers/ProfileController.php`)
- Profile handling → User accounts: updates account (evidence: `app/Http/Controllers/ProfileController.php`)
- Profile handling → Dashboards: redirects after update (evidence: `app/Http/Controllers/ProfileController.php`)
- User accounts → Courses: has courses (evidence: `app/Models/User.php`)
- User accounts → Workshops: joins workshops (evidence: `app/Models/User.php`)
- User accounts → Module progress: has progress (evidence: `app/Models/User.php`)
- User accounts → Assessment attempts: has attempts (evidence: `app/Models/User.php`)
- User accounts → Classroom delivery: has implementations (evidence: `app/Models/User.php`)
- Courses → Modules: has modules (evidence: `app/Models/Course.php`)
- Modules → Learning materials: has materials (evidence: `app/Models/Module.php`)
- Modules → Workshop modules: assigned through (evidence: `app/Models/Module.php`)
- Workshops → Workshop modules: has modules (evidence: `app/Models/Workshop.php`)
- Workshops → Assessments: has assessment (evidence: `app/Models/Workshop.php`)
- Modules → Module progress: has progress records (evidence: `app/Models/Module.php`)
- Assessments → Assessment attempts: has attempts (evidence: `app/Models/Assessment.php`)
- Assessment attempts → Assessment answers: has answers (evidence: `app/Models/AssessmentAttempt.php`)
- Classroom delivery → Student results: has results (evidence: `app/Models/ClassroomImplementation.php`)
