# timeless-inc/quebec architecture

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

- Interactive diagram: https://gitdiagram.com/timeless-inc/quebec
- Repository: https://github.com/timeless-inc/quebec

## Overview

Quebec is the Sistema de Requerimento Estudantil: students submit and track academic requests, while CRADT and responsible staff review, forward, and process them. The graph also shows event-driven notifications, event administration, and reporting. Several controllers and UI areas are represented at their exact tree paths; their internal links are omitted where the supplied excerpts do not show the relationships.

Main entry points: [`app/Http/Controllers/ApplicationController.php`](https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/ApplicationController.php) (Request handling), [`app/Events/ApplicationStatusChanged.php`](https://github.com/timeless-inc/quebec/blob/main/app/Events/ApplicationStatusChanged.php) (Status event), [`app/Models/RequestForwarding.php`](https://github.com/timeless-inc/quebec/blob/main/app/Models/RequestForwarding.php) (Request forwarding), [`app/Http/Controllers/CradtReportController.php`](https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/CradtReportController.php) (Reports and PDFs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and users"]
  node_registration["Registration"]
  node_user[("User accounts<br/>[User.php]")]
end

subgraph group_requests["Request workflow"]
  node_requestui["Request interface<br/>[index.blade.php]"]
  node_applications["Request handling"]
  node_requestdata[("Application requests")]
  node_uploads["Upload validation"]
  node_image["Image processing<br/>[ImageProcessor.php]"]
  node_forwarding["Forwarding workflow"]
  node_forwardingdata[("Request forwarding")]
  node_cradt["CRADT processing"]
  node_director["Staff processing"]
end

subgraph group_operations["Events and reporting"]
  node_events["Event management"]
  node_eventdata[("Academic events<br/>[Event.php]")]
  node_reports["Reports and PDFs"]
end

subgraph group_messaging["Notifications"]
  node_status["Status event"]
  node_eventmap["Event dispatch mapping"]
  node_statuslistener["Status notifications"]
  node_mail["Status email"]
  node_notifications[("User notifications<br/>[Notification.php]")]
end

node_student(("Student"))
node_staff(("CRADT and staff"))

node_student -->|"registers"| node_registration
node_registration -->|"creates account"| node_user
node_student -->|"submits and tracks"| node_requestui
node_requestui -.->|"uses"| node_applications
node_applications -->|"creates and reads"| node_requestdata
node_applications -->|"validates files"| node_uploads
node_applications -->|"processes files"| node_image
node_applications -->|"dispatches status"| node_status
node_staff -->|"forwards requests"| node_forwarding
node_forwarding -.->|"manages forwarding"| node_forwardingdata
node_staff -->|"reviews requests"| node_cradt
node_staff -->|"processes referrals"| node_director
node_director -->|"reads and updates"| node_forwardingdata
node_staff -.->|"manages events"| node_events
node_events -.->|"manages event records"| node_eventdata
node_staff -->|"consults reports"| node_reports
node_reports -->|"queries requests"| node_requestdata
node_reports -->|"queries referrals"| node_forwardingdata
node_applications -.->|"dispatches request event"| node_eventmap
node_status -->|"registered with"| node_eventmap
node_eventmap -->|"dispatches to"| node_statuslistener
node_statuslistener -->|"sends email"| node_mail
node_status -->|"carries request"| node_requestdata
node_status -->|"looks up recipients"| node_user
node_status -->|"finds recipients"| node_forwardingdata

click node_registration "https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_user "https://github.com/timeless-inc/quebec/blob/main/app/Models/User.php"
click node_requestui "https://github.com/timeless-inc/quebec/blob/main/resources/views/application/index.blade.php"
click node_applications "https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/ApplicationController.php"
click node_requestdata "https://github.com/timeless-inc/quebec/blob/main/app/Models/ApplicationRequest.php"
click node_uploads "https://github.com/timeless-inc/quebec/blob/main/app/Rules/ValidateUploadFile.php"
click node_image "https://github.com/timeless-inc/quebec/blob/main/app/Services/ImageProcessor.php"
click node_forwarding "https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/ForwardingController.php"
click node_forwardingdata "https://github.com/timeless-inc/quebec/blob/main/app/Models/RequestForwarding.php"
click node_cradt "https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/CradtController.php"
click node_director "https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/DiretorGeralController.php"
click node_events "https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/EventController.php"
click node_eventdata "https://github.com/timeless-inc/quebec/blob/main/app/Models/Event.php"
click node_reports "https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/CradtReportController.php"
click node_status "https://github.com/timeless-inc/quebec/blob/main/app/Events/ApplicationStatusChanged.php"
click node_eventmap "https://github.com/timeless-inc/quebec/blob/main/app/Providers/EventServiceProvider.php"
click node_statuslistener "https://github.com/timeless-inc/quebec/blob/main/app/Listeners/SendStatusUpdateNotification.php"
click node_mail "https://github.com/timeless-inc/quebec/blob/main/app/Mail/ApplicationStatusChangedMail.php"
click node_notifications "https://github.com/timeless-inc/quebec/blob/main/app/Models/Notification.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_registration,node_user toneBlue
class node_requestui,node_applications,node_requestdata,node_uploads,node_image,node_forwarding,node_forwardingdata,node_cradt,node_director toneAmber
class node_events,node_eventdata,node_reports toneMint
class node_status,node_eventmap,node_statuslistener,node_mail,node_notifications toneRose
class node_student,node_staff toneIndigo
```

## Components

### Access and users

- [Registration](https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [User accounts](https://github.com/timeless-inc/quebec/blob/main/app/Models/User.php): `app/Models/User.php`

### Request workflow

- [Request interface](https://github.com/timeless-inc/quebec/blob/main/resources/views/application/index.blade.php): `resources/views/application/index.blade.php`
- [Request handling](https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/ApplicationController.php): `app/Http/Controllers/ApplicationController.php`
- [Application requests](https://github.com/timeless-inc/quebec/blob/main/app/Models/ApplicationRequest.php): `app/Models/ApplicationRequest.php`
- [Upload validation](https://github.com/timeless-inc/quebec/blob/main/app/Rules/ValidateUploadFile.php): `app/Rules/ValidateUploadFile.php`
- [Image processing](https://github.com/timeless-inc/quebec/blob/main/app/Services/ImageProcessor.php): `app/Services/ImageProcessor.php`
- [Forwarding workflow](https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/ForwardingController.php): `app/Http/Controllers/ForwardingController.php`
- [Request forwarding](https://github.com/timeless-inc/quebec/blob/main/app/Models/RequestForwarding.php): `app/Models/RequestForwarding.php`
- [CRADT processing](https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/CradtController.php): `app/Http/Controllers/CradtController.php`
- [Staff processing](https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/DiretorGeralController.php): `app/Http/Controllers/DiretorGeralController.php`

### Events and reporting

- [Event management](https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/EventController.php): `app/Http/Controllers/EventController.php`
- [Academic events](https://github.com/timeless-inc/quebec/blob/main/app/Models/Event.php): `app/Models/Event.php`
- [Reports and PDFs](https://github.com/timeless-inc/quebec/blob/main/app/Http/Controllers/CradtReportController.php): `app/Http/Controllers/CradtReportController.php`

### Notifications

- [Status event](https://github.com/timeless-inc/quebec/blob/main/app/Events/ApplicationStatusChanged.php): `app/Events/ApplicationStatusChanged.php`
- [Event dispatch mapping](https://github.com/timeless-inc/quebec/blob/main/app/Providers/EventServiceProvider.php): `app/Providers/EventServiceProvider.php`
- [Status notifications](https://github.com/timeless-inc/quebec/blob/main/app/Listeners/SendStatusUpdateNotification.php): `app/Listeners/SendStatusUpdateNotification.php`
- [Status email](https://github.com/timeless-inc/quebec/blob/main/app/Mail/ApplicationStatusChangedMail.php): `app/Mail/ApplicationStatusChangedMail.php`
- [User notifications](https://github.com/timeless-inc/quebec/blob/main/app/Models/Notification.php): `app/Models/Notification.php`

### Other components

- **Student**
- **CRADT and staff**

## Connections

- Student → Registration: registers (evidence: `README.md`)
- Registration → User accounts: creates account (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Student → Request interface: submits and tracks (evidence: `README.md`)
- Request interface → Request handling: uses
- Request handling → Application requests: creates and reads (evidence: `app/Http/Controllers/ApplicationController.php`)
- Request handling → Upload validation: validates files (evidence: `app/Http/Controllers/ApplicationController.php`)
- Request handling → Image processing: processes files (evidence: `app/Http/Controllers/ApplicationController.php`)
- Request handling → Status event: dispatches status (evidence: `app/Http/Controllers/ApplicationController.php`)
- CRADT and staff → Forwarding workflow: forwards requests (evidence: `README.md`)
- Forwarding workflow → Request forwarding: manages forwarding
- CRADT and staff → CRADT processing: reviews requests (evidence: `README.md`)
- CRADT and staff → Staff processing: processes referrals (evidence: `README.md`)
- Staff processing → Request forwarding: reads and updates (evidence: `app/Http/Controllers/DiretorGeralController.php`)
- CRADT and staff → Event management: manages events
- Event management → Academic events: manages event records
- CRADT and staff → Reports and PDFs: consults reports (evidence: `README.md`)
- Reports and PDFs → Application requests: queries requests (evidence: `app/Http/Controllers/CradtReportController.php`)
- Reports and PDFs → Request forwarding: queries referrals (evidence: `app/Http/Controllers/CradtReportController.php`)
- Request handling → Event dispatch mapping: dispatches request event
- Status event → Event dispatch mapping: registered with (evidence: `app/Providers/EventServiceProvider.php`)
- Event dispatch mapping → Status notifications: dispatches to (evidence: `app/Providers/EventServiceProvider.php`)
- Status notifications → Status email: sends email (evidence: `app/Listeners/SendStatusUpdateNotification.php`)
- Status event → Application requests: carries request (evidence: `app/Events/ApplicationStatusChanged.php`)
- Status event → User accounts: looks up recipients (evidence: `app/Events/ApplicationStatusChanged.php`)
- Status event → Request forwarding: finds recipients (evidence: `app/Events/ApplicationStatusChanged.php`)
