# hrazaine/oop-final-proj.-group-2-school-grading architecture

> Architecture diagram of the GitHub repository hrazaine/oop-final-proj.-group-2-school-grading, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hrazaine/oop-final-proj.-group-2-school-grading
- Repository: https://github.com/hrazaine/oop-final-proj.-group-2-school-grading

## Overview

This is a Laravel school-grading application: users register or sign in, teachers manage assessments and enter scores, and users can view grade summaries and reports. Admin-facing user management and the student portal are separate product areas. The graph follows documented routes and sampled controller/service calls; student-portal behavior is unsampled, so its internal connections are omitted. The README provides little product detail beyond school grading, so other capabilities are included only where the tree or source index supports them.

Main entry points: [`routes/web.php`](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/routes/web.php) (Web routes), [`app/Services/GradeService.php`](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Services/GradeService.php) (Grade operations), [`app/Http/Controllers/AssessmentController.php`](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/AssessmentController.php) (Assessment management), [`app/Models/User.php`](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Models/User.php) (User records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web and access"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_auth_routes["Authentication routes<br/>[auth.php]"]
  node_role_middleware["Role middleware"]
end

subgraph group_people["Accounts and roles"]
  node_registration["Registration"]
  node_session["Login session"]
  node_login_request["Login validation<br/>[LoginRequest.php]"]
  node_user_admin["User management"]
  node_user_model[("User records<br/>[User.php]")]
end

subgraph group_grading["Assessment and grading"]
  node_assessments["Assessment management"]
  node_assessment_model[("Assessment records<br/>[Assessment.php]")]
  node_grade_controller["Grade actions"]
  node_grade_service["Grade operations<br/>[GradeService.php]"]
  node_grade_calculator["Grade calculations"]
  node_grade_model[("Grade records<br/>[Grade.php]")]
  node_dashboard["Dashboard data"]
  node_student_portal["Student portal"]
end

subgraph group_presentation["User views"]
  node_assessment_view["Assessment screens<br/>[index.blade.php]"]
  node_grade_views["Grade and report screens<br/>[index.blade.php]"]
  node_dashboard_view["Dashboard screen"]
  node_student_views["Student screens<br/>[grades.blade.php]"]
  node_user_views["User screens<br/>[index.blade.php]"]
end

node_user_actor(("User"))

node_user_actor -->|"requests pages"| node_web_routes
node_user_actor -->|"uses auth"| node_auth_routes
node_auth_routes -->|"routes registration"| node_registration
node_auth_routes -->|"routes login"| node_session
node_session -->|"authenticates with"| node_login_request
node_registration -->|"creates user"| node_user_model
node_web_routes -->|"routes assessment actions"| node_assessments
node_web_routes -->|"routes grade actions"| node_grade_controller
node_web_routes -->|"routes user actions"| node_user_admin
node_web_routes -->|"routes dashboard"| node_dashboard
node_web_routes -->|"routes student pages"| node_student_portal
node_assessments -->|"creates and reads"| node_assessment_model
node_assessments -->|"queries students"| node_user_model
node_grade_controller -->|"delegates grading"| node_grade_service
node_grade_service -->|"calculates summaries"| node_grade_calculator
node_grade_service -->|"reads and writes"| node_grade_model
node_grade_service -->|"checks assessments"| node_assessment_model
node_grade_service -->|"loads students"| node_user_model
node_dashboard -->|"calculates summaries"| node_grade_calculator
node_user_admin -->|"manages users"| node_user_model
node_web_routes -.->|"configures role access"| node_role_middleware
node_assessments -->|"renders"| node_assessment_view
node_grade_controller -->|"renders"| node_grade_views
node_dashboard -.->|"renders"| node_dashboard_view
node_user_admin -->|"renders"| node_user_views
node_student_portal -.->|"renders"| node_student_views

click node_web_routes "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/routes/web.php"
click node_auth_routes "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/routes/auth.php"
click node_role_middleware "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Middleware/EnsureUserHasRole.php"
click node_registration "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_session "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_login_request "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Requests/Auth/LoginRequest.php"
click node_user_admin "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/UserManagementController.php"
click node_user_model "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Models/User.php"
click node_assessments "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/AssessmentController.php"
click node_assessment_model "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Models/Assessment.php"
click node_grade_controller "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/GradeController.php"
click node_grade_service "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Services/GradeService.php"
click node_grade_calculator "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Services/GradeCalculator.php"
click node_grade_model "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Models/Grade.php"
click node_dashboard "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/DashboardController.php"
click node_student_portal "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/StudentPortalController.php"
click node_assessment_view "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/resources/views/assessments/index.blade.php"
click node_grade_views "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/resources/views/Grades/index.blade.php"
click node_dashboard_view "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/resources/views/dashboard.blade.php"
click node_student_views "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/resources/views/student/grades.blade.php"
click node_user_views "https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/resources/views/users/index.blade.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_role_middleware,node_user_actor toneBlue
class node_registration,node_session,node_login_request,node_user_admin,node_user_model toneAmber
class node_assessments,node_assessment_model,node_grade_controller,node_grade_service,node_grade_calculator,node_grade_model,node_dashboard,node_student_portal toneMint
class node_assessment_view,node_grade_views,node_dashboard_view,node_student_views,node_user_views toneRose
```

## Components

### Web and access

- [Web routes](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/routes/web.php): `routes/web.php`
- [Authentication routes](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/routes/auth.php): `routes/auth.php`
- [Role middleware](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Middleware/EnsureUserHasRole.php): `app/Http/Middleware/EnsureUserHasRole.php`

### Accounts and roles

- [Registration](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [Login session](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Login validation](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Requests/Auth/LoginRequest.php): `app/Http/Requests/Auth/LoginRequest.php`
- [User management](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/UserManagementController.php): `app/Http/Controllers/UserManagementController.php`
- [User records](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Models/User.php): `app/Models/User.php`

### Assessment and grading

- [Assessment management](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/AssessmentController.php): `app/Http/Controllers/AssessmentController.php`
- [Assessment records](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Models/Assessment.php): `app/Models/Assessment.php`
- [Grade actions](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/GradeController.php): `app/Http/Controllers/GradeController.php`
- [Grade operations](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Services/GradeService.php): `app/Services/GradeService.php`
- [Grade calculations](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Services/GradeCalculator.php): `app/Services/GradeCalculator.php`
- [Grade records](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Models/Grade.php): `app/Models/Grade.php`
- [Dashboard data](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- [Student portal](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/app/Http/Controllers/StudentPortalController.php): `app/Http/Controllers/StudentPortalController.php`

### User views

- [Assessment screens](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/resources/views/assessments/index.blade.php): `resources/views/assessments/index.blade.php`
- [Grade and report screens](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/resources/views/Grades/index.blade.php): `resources/views/Grades/index.blade.php`
- [Dashboard screen](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/resources/views/dashboard.blade.php): `resources/views/dashboard.blade.php`
- [Student screens](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/resources/views/student/grades.blade.php): `resources/views/student/grades.blade.php`
- [User screens](https://github.com/hrazaine/oop-final-proj.-group-2-school-grading/blob/main/resources/views/users/index.blade.php): `resources/views/users/index.blade.php`

### Other components

- **User**

## Connections

- User → Web routes: requests pages (evidence: `routes/web.php`)
- User → Authentication routes: uses auth (evidence: `routes/auth.php`)
- Authentication routes → Registration: routes registration (evidence: `routes/auth.php`)
- Authentication routes → Login session: routes login (evidence: `routes/auth.php`)
- Login session → Login validation: authenticates with (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Registration → User records: creates user (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Web routes → Assessment management: routes assessment actions (evidence: `routes/web.php`)
- Web routes → Grade actions: routes grade actions (evidence: `routes/web.php`)
- Web routes → User management: routes user actions (evidence: `routes/web.php`)
- Web routes → Dashboard data: routes dashboard (evidence: `routes/web.php`)
- Web routes → Student portal: routes student pages (evidence: `routes/web.php`)
- Assessment management → Assessment records: creates and reads (evidence: `app/Http/Controllers/AssessmentController.php`)
- Assessment management → User records: queries students (evidence: `app/Http/Controllers/AssessmentController.php`)
- Grade actions → Grade operations: delegates grading (evidence: `app/Http/Controllers/GradeController.php`)
- Grade operations → Grade calculations: calculates summaries (evidence: `app/Services/GradeService.php`)
- Grade operations → Grade records: reads and writes (evidence: `app/Services/GradeService.php`)
- Grade operations → Assessment records: checks assessments (evidence: `app/Services/GradeService.php`)
- Grade operations → User records: loads students (evidence: `app/Services/GradeService.php`)
- Dashboard data → Grade calculations: calculates summaries (evidence: `app/Http/Controllers/DashboardController.php`)
- User management → User records: manages users (evidence: `app/Http/Controllers/UserManagementController.php`)
- Web routes → Role middleware: configures role access
- Assessment management → Assessment screens: renders (evidence: `app/Http/Controllers/AssessmentController.php`)
- Grade actions → Grade and report screens: renders (evidence: `app/Http/Controllers/GradeController.php`)
- Dashboard data → Dashboard screen: renders (evidence: `app/Http/Controllers/DashboardController.php`)
- User management → User screens: renders (evidence: `app/Http/Controllers/UserManagementController.php`)
- Student portal → Student screens: renders
