# charlesevangeliojr/consultation-app architecture

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

- Interactive diagram: https://gitdiagram.com/charlesevangeliojr/consultation-app
- Repository: https://github.com/charlesevangeliojr/consultation-app

## Overview

This is a school consultation web app. Students register or sign in, browse approved teachers and available times, and book a slot or propose a time; teachers manage availability and respond to requests. Administrators manage accounts, permissions, school catalogs, settings, and consultation oversight. The graph reflects the documented capabilities and sampled controller/model relationships; several route targets, middleware behaviors, and background request-expiry details are identified by the README or source index but were not inspected in full.

Main entry points: [`routes/web.php`](https://github.com/charlesevangeliojr/consultation-app/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/ConsultationController.php`](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/ConsultationController.php) (Consultation actions), [`app/Models/ConsultationAppointment.php`](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/ConsultationAppointment.php) (Appointments), [`app/Models/User.php`](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/User.php) (User and access model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry and identity"]
  node_routes["Web routes<br/>[web.php]"]
  node_registration["Registration"]
  node_adminlogin["Admin login"]
  node_profiles["User profiles"]
  node_teacherprofile["Teacher profile"]
end

subgraph group_consult["Consultation workflow"]
  node_consultcontroller["Consultation actions"]
  node_studentdashboard["Student dashboard"]
  node_expiry["Request expiry"]
  node_requestrules["Proposed request rules"]
  node_availability["Teacher availability"]
  node_browse["Student booking<br/>[browse.blade.php]"]
  node_calendar["Consultation calendars<br/>[calendar.blade.php]"]
  node_teacherrequests["Teacher requests<br/>[requests.blade.php]"]
end

subgraph group_admin["Administration"]
  node_accountadmin["Account management"]
  node_schooladmin["School catalogs and approval"]
  node_roleadmin["Roles and permissions"]
  node_settingsadmin["Site settings"]
  node_monitoring["Consultation oversight"]
end

subgraph group_domain["Domain and persistence"]
  node_users[("User and access model<br/>[User.php]")]
  node_student[("Student profile model<br/>[Student.php]")]
  node_teacher[("Teacher profile model<br/>[Teacher.php]")]
  node_appointments[("Appointments")]
  node_availabilitymodel[("Availability records")]
  node_schoolmodels[("School catalogs<br/>[GradeLevel.php]")]
  node_roles[("Roles and permissions<br/>[Role.php]")]
  node_settings[("Queue settings<br/>[SiteSetting.php]")]
end

node_visitors(("Students, teachers, admins"))
node_externaldb[("Application database")]

node_visitors -->|"request pages"| node_routes
node_routes -->|"routes to"| node_registration
node_routes -->|"routes to"| node_adminlogin
node_routes -->|"routes to"| node_consultcontroller
node_routes -->|"routes to"| node_accountadmin
node_routes -->|"routes to"| node_schooladmin
node_routes -->|"routes to"| node_roleadmin
node_routes -->|"routes to"| node_settingsadmin
node_routes -->|"routes to"| node_profiles
node_routes -->|"routes to"| node_teacherprofile
node_routes -->|"routes to"| node_studentdashboard
node_registration -->|"creates account"| node_users
node_registration -->|"creates profile"| node_student
node_registration -->|"creates profile"| node_teacher
node_registration -->|"assigns role"| node_roles
node_consultcontroller -->|"reads slots"| node_availabilitymodel
node_consultcontroller -->|"reads and books"| node_appointments
node_consultcontroller -->|"loads teachers"| node_users
node_consultcontroller -->|"reads visibility"| node_settings
node_consultcontroller -->|"rejects overlaps"| node_requestrules
node_consultcontroller -->|"renders booking"| node_browse
node_consultcontroller -->|"renders calendar"| node_calendar
node_consultcontroller -->|"renders requests"| node_teacherrequests
node_studentdashboard -->|"reads bookings"| node_appointments
node_expiry -.->|"expires requests"| node_appointments
node_requestrules -->|"updates proposals"| node_appointments
node_accountadmin -->|"manages accounts"| node_users
node_accountadmin -->|"checks roles"| node_roles
node_schooladmin -->|"manages catalogs"| node_schoolmodels
node_schooladmin -->|"reads oversight"| node_appointments
node_schooladmin -->|"reads oversight"| node_availabilitymodel
node_roleadmin -.->|"manages roles"| node_roles
node_settingsadmin -->|"updates settings"| node_settings
node_users -->|"has role"| node_roles
node_users -->|"has profile"| node_student
node_users -->|"has profile"| node_teacher
node_appointments -->|"belongs to"| node_availabilitymodel
node_availabilitymodel -->|"has appointments"| node_appointments
node_schoolmodels -.->|"persists catalog"| node_externaldb
node_appointments -.->|"persists bookings"| node_externaldb

click node_routes "https://github.com/charlesevangeliojr/consultation-app/blob/main/routes/web.php"
click node_registration "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/Auth/RegistrationController.php"
click node_adminlogin "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/Auth/AdminLoginController.php"
click node_profiles "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/StudentProfileController.php"
click node_teacherprofile "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/TeacherProfileController.php"
click node_consultcontroller "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/ConsultationController.php"
click node_studentdashboard "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/StudentDashboardController.php"
click node_expiry "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Console/Commands/RejectStaleConsultationRequests.php"
click node_requestrules "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Support/ProposedConsultationRequests.php"
click node_availability "https://github.com/charlesevangeliojr/consultation-app/blob/main/resources/views/teacher/availability.blade.php"
click node_browse "https://github.com/charlesevangeliojr/consultation-app/blob/main/resources/views/student/browse.blade.php"
click node_calendar "https://github.com/charlesevangeliojr/consultation-app/blob/main/resources/views/teacher/calendar.blade.php"
click node_teacherrequests "https://github.com/charlesevangeliojr/consultation-app/blob/main/resources/views/teacher/requests.blade.php"
click node_accountadmin "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/Admin/AdminAccountsController.php"
click node_schooladmin "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/Admin/SchoolController.php"
click node_roleadmin "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/Admin/AdminRolesController.php"
click node_settingsadmin "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/Admin/SiteSettingsController.php"
click node_monitoring "https://github.com/charlesevangeliojr/consultation-app/blob/main/resources/views/admin/consultations.blade.php"
click node_users "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/User.php"
click node_student "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/Student.php"
click node_teacher "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/Teacher.php"
click node_appointments "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/ConsultationAppointment.php"
click node_availabilitymodel "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/ConsultationAvailability.php"
click node_schoolmodels "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/GradeLevel.php"
click node_roles "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/Role.php"
click node_settings "https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/SiteSetting.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_registration,node_adminlogin,node_profiles,node_teacherprofile toneBlue
class node_consultcontroller,node_studentdashboard,node_expiry,node_requestrules,node_availability,node_browse,node_calendar,node_teacherrequests,node_externaldb toneAmber
class node_accountadmin,node_schooladmin,node_roleadmin,node_settingsadmin,node_monitoring toneMint
class node_users,node_student,node_teacher,node_appointments,node_availabilitymodel,node_schoolmodels,node_roles,node_settings toneRose
class node_visitors toneIndigo
```

## Components

### Web entry and identity

- [Web routes](https://github.com/charlesevangeliojr/consultation-app/blob/main/routes/web.php): `routes/web.php`
- [Registration](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/Auth/RegistrationController.php): `app/Http/Controllers/Auth/RegistrationController.php`
- [Admin login](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/Auth/AdminLoginController.php): `app/Http/Controllers/Auth/AdminLoginController.php`
- [User profiles](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/StudentProfileController.php): `app/Http/Controllers/StudentProfileController.php`
- [Teacher profile](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/TeacherProfileController.php): `app/Http/Controllers/TeacherProfileController.php`

### Consultation workflow

- [Consultation actions](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/ConsultationController.php): `app/Http/Controllers/ConsultationController.php`
- [Student dashboard](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/StudentDashboardController.php): `app/Http/Controllers/StudentDashboardController.php`
- [Request expiry](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Console/Commands/RejectStaleConsultationRequests.php): `app/Console/Commands/RejectStaleConsultationRequests.php`
- [Proposed request rules](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Support/ProposedConsultationRequests.php): `app/Support/ProposedConsultationRequests.php`
- [Teacher availability](https://github.com/charlesevangeliojr/consultation-app/blob/main/resources/views/teacher/availability.blade.php): `resources/views/teacher/availability.blade.php`
- [Student booking](https://github.com/charlesevangeliojr/consultation-app/blob/main/resources/views/student/browse.blade.php): `resources/views/student/browse.blade.php`
- [Consultation calendars](https://github.com/charlesevangeliojr/consultation-app/blob/main/resources/views/teacher/calendar.blade.php): `resources/views/teacher/calendar.blade.php`
- [Teacher requests](https://github.com/charlesevangeliojr/consultation-app/blob/main/resources/views/teacher/requests.blade.php): `resources/views/teacher/requests.blade.php`

### Administration

- [Account management](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/Admin/AdminAccountsController.php): `app/Http/Controllers/Admin/AdminAccountsController.php`
- [School catalogs and approval](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/Admin/SchoolController.php): `app/Http/Controllers/Admin/SchoolController.php`
- [Roles and permissions](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/Admin/AdminRolesController.php): `app/Http/Controllers/Admin/AdminRolesController.php`
- [Site settings](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Http/Controllers/Admin/SiteSettingsController.php): `app/Http/Controllers/Admin/SiteSettingsController.php`
- [Consultation oversight](https://github.com/charlesevangeliojr/consultation-app/blob/main/resources/views/admin/consultations.blade.php): `resources/views/admin/consultations.blade.php`

### Domain and persistence

- [User and access model](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/User.php): `app/Models/User.php`
- [Student profile model](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/Student.php): `app/Models/Student.php`
- [Teacher profile model](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/Teacher.php): `app/Models/Teacher.php`
- [Appointments](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/ConsultationAppointment.php): `app/Models/ConsultationAppointment.php`
- [Availability records](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/ConsultationAvailability.php): `app/Models/ConsultationAvailability.php`
- [School catalogs](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/GradeLevel.php): `app/Models/GradeLevel.php`
- [Roles and permissions](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/Role.php): `app/Models/Role.php`
- [Queue settings](https://github.com/charlesevangeliojr/consultation-app/blob/main/app/Models/SiteSetting.php): `app/Models/SiteSetting.php`

### Other components

- **Students, teachers, admins**
- **Application database**

## Connections

- Students, teachers, admins → Web routes: request pages (evidence: `routes/web.php`)
- Web routes → Registration: routes to (evidence: `routes/web.php`)
- Web routes → Admin login: routes to (evidence: `routes/web.php`)
- Web routes → Consultation actions: routes to (evidence: `routes/web.php`)
- Web routes → Account management: routes to (evidence: `routes/web.php`)
- Web routes → School catalogs and approval: routes to (evidence: `routes/web.php`)
- Web routes → Roles and permissions: routes to (evidence: `routes/web.php`)
- Web routes → Site settings: routes to (evidence: `routes/web.php`)
- Web routes → User profiles: routes to (evidence: `routes/web.php`)
- Web routes → Teacher profile: routes to (evidence: `routes/web.php`)
- Web routes → Student dashboard: routes to (evidence: `routes/web.php`)
- Registration → User and access model: creates account (evidence: `app/Http/Controllers/Auth/RegistrationController.php`)
- Registration → Student profile model: creates profile (evidence: `app/Http/Controllers/Auth/RegistrationController.php`)
- Registration → Teacher profile model: creates profile (evidence: `app/Http/Controllers/Auth/RegistrationController.php`)
- Registration → Roles and permissions: assigns role (evidence: `app/Http/Controllers/Auth/RegistrationController.php`)
- Consultation actions → Availability records: reads slots (evidence: `app/Http/Controllers/ConsultationController.php`)
- Consultation actions → Appointments: reads and books (evidence: `app/Http/Controllers/ConsultationController.php`)
- Consultation actions → User and access model: loads teachers (evidence: `app/Http/Controllers/ConsultationController.php`)
- Consultation actions → Queue settings: reads visibility (evidence: `app/Http/Controllers/ConsultationController.php`)
- Consultation actions → Proposed request rules: rejects overlaps (evidence: `app/Http/Controllers/ConsultationController.php`)
- Consultation actions → Student booking: renders booking (evidence: `app/Http/Controllers/ConsultationController.php`)
- Consultation actions → Consultation calendars: renders calendar (evidence: `app/Http/Controllers/ConsultationController.php`)
- Consultation actions → Teacher requests: renders requests (evidence: `app/Http/Controllers/ConsultationController.php`)
- Student dashboard → Appointments: reads bookings (evidence: `app/Http/Controllers/StudentDashboardController.php`)
- Request expiry → Appointments: expires requests
- Proposed request rules → Appointments: updates proposals (evidence: `app/Support/ProposedConsultationRequests.php`)
- Account management → User and access model: manages accounts (evidence: `app/Http/Controllers/Admin/AdminAccountsController.php`)
- Account management → Roles and permissions: checks roles (evidence: `app/Http/Controllers/Admin/AdminAccountsController.php`)
- School catalogs and approval → School catalogs: manages catalogs (evidence: `app/Http/Controllers/Admin/SchoolController.php`)
- School catalogs and approval → Appointments: reads oversight (evidence: `app/Http/Controllers/Admin/SchoolController.php`)
- School catalogs and approval → Availability records: reads oversight (evidence: `app/Http/Controllers/Admin/SchoolController.php`)
- Roles and permissions → Roles and permissions: manages roles (evidence: `app/Http/Controllers/Admin/AdminRolesController.php`)
- Site settings → Queue settings: updates settings (evidence: `app/Http/Controllers/Admin/SiteSettingsController.php`)
- User and access model → Roles and permissions: has role (evidence: `app/Models/User.php`)
- User and access model → Student profile model: has profile (evidence: `app/Models/User.php`)
- User and access model → Teacher profile model: has profile (evidence: `app/Models/User.php`)
- Appointments → Availability records: belongs to (evidence: `app/Models/ConsultationAppointment.php`)
- Availability records → Appointments: has appointments (evidence: `app/Models/ConsultationAvailability.php`)
- School catalogs → Application database: persists catalog
- Appointments → Application database: persists bookings
