# shawnabaco/psa-appointment-system architecture

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

- Interactive diagram: https://gitdiagram.com/shawnabaco/psa-appointment-system
- Repository: https://github.com/shawnabaco/psa-appointment-system

## Overview

This Laravel application manages National ID appointments, from public service discovery and availability checks through booking, confirmation, and staff processing. Administrators configure slot capacity and working days, manage users, and review reports; staff and operators handle appointments, clients, and reporting. The sampled booking controller reads availability rules and creates appointments, while MailService sends confirmation messages. The README is the generic Laravel template, so product capabilities are inferred from the source tree and indexed controller references; unsampled controller internals and runtime wiring are not verified.

Main entry points: [`routes/web.php`](https://github.com/shawnabaco/psa-appointment-system/blob/main/routes/web.php) (Web routes), [`app/Models/Appointment.php`](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Models/Appointment.php) (Appointments), [`app/Http/Controllers/Client/AppointmentController.php`](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Client/AppointmentController.php) (Public booking), [`app/Models/TimeSlot.php`](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Models/TimeSlot.php) (Schedule rules and slots)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Public Entry"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_public_pages["Public pages<br/>[PageController.php]"]
  node_authentication["Authentication"]
  node_admin_access["Admin access<br/>[UserController.php]"]
end

subgraph group_booking["Booking and Scheduling"]
  node_public_booking["Public booking"]
  node_admin_slots["Slot configuration<br/>[SlotController.php]"]
  node_admin_calendar["Calendar management"]
  node_admin_settings["Booking settings"]
  node_mail_service["Mail and confirmations<br/>[MailService.php]"]
end

subgraph group_operations["Appointment Operations"]
  node_staff_appointments["Staff appointments"]
  node_operator_appointments["Operator appointments"]
  node_client_records["Client records"]
  node_staff_reports["Staff reports"]
  node_operator_reports["Operator reports"]
  node_admin_reports["Admin reports"]
end

subgraph group_domain["Shared Domain Data"]
  node_appointments[("Appointments<br/>[Appointment.php]")]
  node_applicants[("Appointment clients")]
  node_schedule_data[("Schedule rules and slots<br/>[TimeSlot.php]")]
  node_services_requirements[("Services and requirements<br/>[Service.php]")]
  node_users[("Users and roles<br/>[User.php]")]
end

node_visitor(("Public visitor"))
node_staff_user(("Staff user"))

node_visitor -->|"requests pages"| node_web_routes
node_staff_user -->|"requests tools"| node_web_routes
node_web_routes -->|"routes to"| node_public_pages
node_web_routes -->|"routes to"| node_authentication
node_web_routes -->|"routes to"| node_public_booking
node_web_routes -->|"routes to"| node_admin_slots
node_web_routes -->|"routes to"| node_admin_calendar
node_web_routes -->|"routes to"| node_admin_settings
node_web_routes -->|"routes to"| node_admin_access
node_web_routes -->|"routes to"| node_staff_appointments
node_web_routes -->|"routes to"| node_operator_appointments
node_web_routes -->|"routes to"| node_client_records
node_web_routes -->|"routes to"| node_staff_reports
node_web_routes -->|"routes to"| node_operator_reports
node_web_routes -->|"routes to"| node_admin_reports
node_public_booking -->|"creates and queries"| node_appointments
node_public_booking -->|"checks availability"| node_schedule_data
node_public_booking -->|"loads requirements"| node_services_requirements
node_public_booking -.->|"sends confirmation"| node_mail_service
node_admin_slots -->|"configures capacity"| node_schedule_data
node_admin_calendar -->|"reads calendar data"| node_appointments
node_admin_calendar -->|"reads slot rules"| node_schedule_data
node_admin_settings -->|"updates schedule"| node_schedule_data
node_admin_settings -->|"configures mail"| node_mail_service
node_admin_access -->|"manages accounts"| node_users
node_staff_appointments -->|"manages appointments"| node_appointments
node_operator_appointments -->|"manages appointments"| node_appointments
node_client_records -->|"manages clients"| node_applicants
node_staff_reports -->|"queries activity"| node_appointments
node_operator_reports -->|"queries activity"| node_appointments
node_admin_reports -->|"queries activity"| node_appointments
node_appointments -->|"has clients"| node_applicants
node_appointments -->|"uses time slot"| node_schedule_data

click node_web_routes "https://github.com/shawnabaco/psa-appointment-system/blob/main/routes/web.php"
click node_public_pages "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Web/PageController.php"
click node_authentication "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Auth/LoginController.php"
click node_admin_access "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Admin/UserController.php"
click node_public_booking "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Client/AppointmentController.php"
click node_admin_slots "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Admin/SlotController.php"
click node_admin_calendar "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Admin/CalendarController.php"
click node_admin_settings "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Admin/SettingsController.php"
click node_mail_service "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Services/MailService.php"
click node_staff_appointments "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Staff/AppointmentController.php"
click node_operator_appointments "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Operator/OAppointmentController.php"
click node_client_records "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Staff/ClientController.php"
click node_staff_reports "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Staff/ReportsController.php"
click node_operator_reports "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Operator/OReportsController.php"
click node_admin_reports "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Admin/ReportController.php"
click node_appointments "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Models/Appointment.php"
click node_applicants "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Models/AppointmentClient.php"
click node_schedule_data "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Models/TimeSlot.php"
click node_services_requirements "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Models/Service.php"
click node_users "https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Models/User.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_public_pages,node_authentication,node_admin_access,node_staff_user toneBlue
class node_public_booking,node_admin_slots,node_admin_calendar,node_admin_settings,node_mail_service toneAmber
class node_staff_appointments,node_operator_appointments,node_client_records,node_staff_reports,node_operator_reports,node_admin_reports toneMint
class node_appointments,node_applicants,node_schedule_data,node_services_requirements,node_users toneRose
class node_visitor toneIndigo
```

## Components

### Access and Public Entry

- [Web routes](https://github.com/shawnabaco/psa-appointment-system/blob/main/routes/web.php): `routes/web.php`
- [Public pages](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Web/PageController.php): `app/Http/Controllers/Web/PageController.php`
- [Authentication](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Auth/LoginController.php): `app/Http/Controllers/Auth/LoginController.php`
- [Admin access](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Admin/UserController.php): `app/Http/Controllers/Admin/UserController.php`

### Booking and Scheduling

- [Public booking](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Client/AppointmentController.php): `app/Http/Controllers/Client/AppointmentController.php`
- [Slot configuration](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Admin/SlotController.php): `app/Http/Controllers/Admin/SlotController.php`
- [Calendar management](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Admin/CalendarController.php): `app/Http/Controllers/Admin/CalendarController.php`
- [Booking settings](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Admin/SettingsController.php): `app/Http/Controllers/Admin/SettingsController.php`
- [Mail and confirmations](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Services/MailService.php): `app/Services/MailService.php`

### Appointment Operations

- [Staff appointments](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Staff/AppointmentController.php): `app/Http/Controllers/Staff/AppointmentController.php`
- [Operator appointments](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Operator/OAppointmentController.php): `app/Http/Controllers/Operator/OAppointmentController.php`
- [Client records](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Staff/ClientController.php): `app/Http/Controllers/Staff/ClientController.php`
- [Staff reports](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Staff/ReportsController.php): `app/Http/Controllers/Staff/ReportsController.php`
- [Operator reports](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Operator/OReportsController.php): `app/Http/Controllers/Operator/OReportsController.php`
- [Admin reports](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Http/Controllers/Admin/ReportController.php): `app/Http/Controllers/Admin/ReportController.php`

### Shared Domain Data

- [Appointments](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Models/Appointment.php): `app/Models/Appointment.php`
- [Appointment clients](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Models/AppointmentClient.php): `app/Models/AppointmentClient.php`
- [Schedule rules and slots](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Models/TimeSlot.php): `app/Models/TimeSlot.php`
- [Services and requirements](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Models/Service.php): `app/Models/Service.php`
- [Users and roles](https://github.com/shawnabaco/psa-appointment-system/blob/main/app/Models/User.php): `app/Models/User.php`

### Other components

- **Public visitor**
- **Staff user**

## Connections

- Public visitor → Web routes: requests pages (evidence: `routes/web.php`)
- Staff user → Web routes: requests tools (evidence: `routes/web.php`)
- Web routes → Public pages: routes to (evidence: `routes/web.php`)
- Web routes → Authentication: routes to (evidence: `routes/web.php`)
- Web routes → Public booking: routes to (evidence: `routes/web.php`)
- Web routes → Slot configuration: routes to (evidence: `routes/web.php`)
- Web routes → Calendar management: routes to (evidence: `routes/web.php`)
- Web routes → Booking settings: routes to (evidence: `routes/web.php`)
- Web routes → Admin access: routes to (evidence: `routes/web.php`)
- Web routes → Staff appointments: routes to (evidence: `routes/web.php`)
- Web routes → Operator appointments: routes to (evidence: `routes/web.php`)
- Web routes → Client records: routes to (evidence: `routes/web.php`)
- Web routes → Staff reports: routes to (evidence: `routes/web.php`)
- Web routes → Operator reports: routes to (evidence: `routes/web.php`)
- Web routes → Admin reports: routes to (evidence: `routes/web.php`)
- Public booking → Appointments: creates and queries (evidence: `app/Http/Controllers/Client/AppointmentController.php`)
- Public booking → Schedule rules and slots: checks availability (evidence: `app/Http/Controllers/Client/AppointmentController.php`)
- Public booking → Services and requirements: loads requirements (evidence: `app/Http/Controllers/Client/AppointmentController.php`)
- Public booking → Mail and confirmations: sends confirmation (evidence: `app/Http/Controllers/Client/AppointmentController.php`)
- Slot configuration → Schedule rules and slots: configures capacity (evidence: `app/Http/Controllers/Admin/SlotController.php`)
- Calendar management → Appointments: reads calendar data (evidence: `app/Http/Controllers/Admin/CalendarController.php`)
- Calendar management → Schedule rules and slots: reads slot rules (evidence: `app/Http/Controllers/Admin/CalendarController.php`)
- Booking settings → Schedule rules and slots: updates schedule (evidence: `app/Http/Controllers/Admin/SettingsController.php`)
- Booking settings → Mail and confirmations: configures mail (evidence: `app/Http/Controllers/Admin/SettingsController.php`)
- Admin access → Users and roles: manages accounts (evidence: `app/Http/Controllers/Admin/UserController.php`)
- Staff appointments → Appointments: manages appointments (evidence: `app/Http/Controllers/Staff/AppointmentController.php`)
- Operator appointments → Appointments: manages appointments (evidence: `app/Http/Controllers/Operator/OAppointmentController.php`)
- Client records → Appointment clients: manages clients
- Staff reports → Appointments: queries activity (evidence: `app/Http/Controllers/Staff/ReportsController.php`)
- Operator reports → Appointments: queries activity (evidence: `app/Http/Controllers/Operator/OReportsController.php`)
- Admin reports → Appointments: queries activity (evidence: `app/Http/Controllers/Admin/ReportController.php`)
- Appointments → Appointment clients: has clients (evidence: `app/Models/Appointment.php`)
- Appointments → Schedule rules and slots: uses time slot (evidence: `app/Models/Appointment.php`)
