# pedokylee/dentalclinicsystemmanagement architecture

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

- Interactive diagram: https://gitdiagram.com/pedokylee/dentalclinicsystemmanagement
- Repository: https://github.com/pedokylee/dentalclinicsystemmanagement

## Overview

This is a Laravel dental-clinic management application. Patients book appointments and view their care history; staff manage appointments, check-ins, patient records, and inquiries; dentists manage appointments and treatment records; administrators oversee users, reports, audit logs, and configuration. The graph highlights the appointment and inquiry workflows plus their shared domain models. Some controllers and routing are unsampled, so connections to those areas are omitted rather than inferred.

Main entry points: [`app/Models/Appointment.php`](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/Appointment.php) (Appointment), [`app/Http/Controllers/Staff/PatientInquiryController.php`](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Http/Controllers/Staff/PatientInquiryController.php) (Inquiry conversion), [`app/Models/Patient.php`](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/Patient.php) (Patient record), [`app/Http/Controllers/Patient/AppointmentController.php`](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Http/Controllers/Patient/AppointmentController.php) (Patient booking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_booking["Appointments"]
  node_patient_booking["Patient booking"]
  node_staff_appointments["Staff appointments"]
  node_availability["Slot availability"]
  node_appointment[("Appointment<br/>[Appointment.php]")]
end

subgraph group_care["Patient care"]
  node_dentist_model[("Dentist profile<br/>[Dentist.php]")]
  node_patient_model[("Patient record<br/>[Patient.php]")]
  node_treatment[("Treatment records")]
  node_treatment_controller["Treatment management"]
end

subgraph group_operations["Clinic operations"]
  node_landing_inquiry["Public inquiries"]
  node_inquiry_management["Inquiry conversion"]
  node_inquiry_feature["Inquiry availability"]
  node_inquiry[("Patient inquiry<br/>[PatientInquiry.php]")]
  node_notification[("Notifications<br/>[Notification.php]")]
end

subgraph group_shared["Shared domain"]
  node_user[("User accounts<br/>[User.php]")]
  node_audit[("Audit log<br/>[AuditLog.php]")]
  node_observer["Appointment observer"]
  node_reminders["Appointment reminders"]
  node_mail_booking["Booking email"]
  node_reports["Report data<br/>[ReportData.php]"]
  node_report_export["Report export<br/>[ReportsExport.php]"]
end

node_patient(("Patient"))
node_staff(("Staff"))
node_dentist(("Dentist"))

node_patient -.->|"books appointments"| node_patient_booking
node_staff -.->|"manages appointments"| node_staff_appointments
node_patient_booking -->|"checks slots"| node_availability
node_patient_booking -->|"creates and reads"| node_appointment
node_patient_booking -->|"finds or creates"| node_patient_model
node_patient_booking -->|"loads dentists"| node_dentist_model
node_staff_appointments -->|"checks slots"| node_availability
node_staff_appointments -->|"manages"| node_appointment
node_availability -->|"checks bookings"| node_appointment
node_availability -->|"checks schedule"| node_dentist_model
node_appointment -->|"belongs to"| node_patient_model
node_appointment -->|"belongs to"| node_dentist_model
node_dentist -.->|"records care"| node_treatment_controller
node_treatment_controller -->|"manages records"| node_treatment
node_treatment -->|"belongs to"| node_patient_model
node_treatment -->|"belongs to"| node_dentist_model
node_landing_inquiry -->|"creates inquiries"| node_inquiry
node_landing_inquiry -->|"checks feature"| node_inquiry_feature
node_staff -.->|"reviews inquiries"| node_inquiry_management
node_inquiry_management -->|"checks feature"| node_inquiry_feature
node_inquiry_management -->|"converts or rejects"| node_inquiry
node_inquiry_management -->|"creates patient"| node_patient_model
node_inquiry_management -->|"resolves account"| node_user
node_inquiry_management -->|"updates notices"| node_notification
node_user -->|"has profile"| node_patient_model
node_user -->|"has profile"| node_dentist_model
node_user -->|"has notifications"| node_notification
node_observer -->|"observes changes"| node_appointment
node_observer -->|"dispatches jobs"| node_reminders
node_reminders -->|"loads appointment"| node_appointment
node_reminders -->|"creates notice"| node_notification
node_staff_appointments -->|"sends booking mail"| node_mail_booking
node_reports -->|"queries data"| node_appointment
node_reports -->|"queries data"| node_patient_model

click node_patient_booking "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Http/Controllers/Patient/AppointmentController.php"
click node_staff_appointments "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Http/Controllers/Staff/AppointmentController.php"
click node_availability "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Support/AppointmentAvailability.php"
click node_appointment "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/Appointment.php"
click node_dentist_model "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/Dentist.php"
click node_patient_model "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/Patient.php"
click node_treatment "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/TreatmentRecord.php"
click node_treatment_controller "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Http/Controllers/Dentist/TreatmentController.php"
click node_landing_inquiry "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Http/Controllers/LandingInquiryController.php"
click node_inquiry_management "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Http/Controllers/Staff/PatientInquiryController.php"
click node_inquiry_feature "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Support/PatientInquiryFeature.php"
click node_inquiry "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/PatientInquiry.php"
click node_notification "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/Notification.php"
click node_user "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/User.php"
click node_audit "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/AuditLog.php"
click node_observer "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Observers/AppointmentObserver.php"
click node_reminders "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Jobs/SendAppointmentReminderJob.php"
click node_mail_booking "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Mail/AppointmentBooked.php"
click node_reports "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Support/ReportData.php"
click node_report_export "https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Exports/ReportsExport.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_patient_booking,node_staff_appointments,node_availability,node_appointment toneBlue
class node_dentist_model,node_patient_model,node_treatment,node_treatment_controller toneAmber
class node_landing_inquiry,node_inquiry_management,node_inquiry_feature,node_inquiry,node_notification toneMint
class node_user,node_audit,node_observer,node_reminders,node_mail_booking,node_reports,node_report_export toneRose
class node_patient,node_staff,node_dentist toneIndigo
```

## Components

### Appointments

- [Patient booking](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Http/Controllers/Patient/AppointmentController.php): `app/Http/Controllers/Patient/AppointmentController.php`
- [Staff appointments](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Http/Controllers/Staff/AppointmentController.php): `app/Http/Controllers/Staff/AppointmentController.php`
- [Slot availability](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Support/AppointmentAvailability.php): `app/Support/AppointmentAvailability.php`
- [Appointment](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/Appointment.php): `app/Models/Appointment.php`

### Patient care

- [Dentist profile](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/Dentist.php): `app/Models/Dentist.php`
- [Patient record](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/Patient.php): `app/Models/Patient.php`
- [Treatment records](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/TreatmentRecord.php): `app/Models/TreatmentRecord.php`
- [Treatment management](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Http/Controllers/Dentist/TreatmentController.php): `app/Http/Controllers/Dentist/TreatmentController.php`

### Clinic operations

- [Public inquiries](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Http/Controllers/LandingInquiryController.php): `app/Http/Controllers/LandingInquiryController.php`
- [Inquiry conversion](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Http/Controllers/Staff/PatientInquiryController.php): `app/Http/Controllers/Staff/PatientInquiryController.php`
- [Inquiry availability](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Support/PatientInquiryFeature.php): `app/Support/PatientInquiryFeature.php`
- [Patient inquiry](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/PatientInquiry.php): `app/Models/PatientInquiry.php`
- [Notifications](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/Notification.php): `app/Models/Notification.php`

### Shared domain

- [User accounts](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/User.php): `app/Models/User.php`
- [Audit log](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Models/AuditLog.php): `app/Models/AuditLog.php`
- [Appointment observer](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Observers/AppointmentObserver.php): `app/Observers/AppointmentObserver.php`
- [Appointment reminders](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Jobs/SendAppointmentReminderJob.php): `app/Jobs/SendAppointmentReminderJob.php`
- [Booking email](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Mail/AppointmentBooked.php): `app/Mail/AppointmentBooked.php`
- [Report data](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Support/ReportData.php): `app/Support/ReportData.php`
- [Report export](https://github.com/pedokylee/dentalclinicsystemmanagement/blob/main/app/Exports/ReportsExport.php): `app/Exports/ReportsExport.php`

### Other components

- **Patient**
- **Staff**
- **Dentist**

## Connections

- Patient → Patient booking: books appointments
- Staff → Staff appointments: manages appointments
- Patient booking → Slot availability: checks slots (evidence: `app/Http/Controllers/Patient/AppointmentController.php`)
- Patient booking → Appointment: creates and reads (evidence: `app/Http/Controllers/Patient/AppointmentController.php`)
- Patient booking → Patient record: finds or creates (evidence: `app/Http/Controllers/Patient/AppointmentController.php`)
- Patient booking → Dentist profile: loads dentists (evidence: `app/Http/Controllers/Patient/AppointmentController.php`)
- Staff appointments → Slot availability: checks slots (evidence: `app/Http/Controllers/Staff/AppointmentController.php`)
- Staff appointments → Appointment: manages (evidence: `app/Http/Controllers/Staff/AppointmentController.php`)
- Slot availability → Appointment: checks bookings (evidence: `app/Support/AppointmentAvailability.php`)
- Slot availability → Dentist profile: checks schedule (evidence: `app/Support/AppointmentAvailability.php`)
- Appointment → Patient record: belongs to (evidence: `app/Models/Appointment.php`)
- Appointment → Dentist profile: belongs to (evidence: `app/Models/Appointment.php`)
- Dentist → Treatment management: records care
- Treatment management → Treatment records: manages records (evidence: `app/Http/Controllers/Dentist/TreatmentController.php`)
- Treatment records → Patient record: belongs to (evidence: `app/Models/TreatmentRecord.php`)
- Treatment records → Dentist profile: belongs to (evidence: `app/Models/TreatmentRecord.php`)
- Public inquiries → Patient inquiry: creates inquiries (evidence: `app/Http/Controllers/LandingInquiryController.php`)
- Public inquiries → Inquiry availability: checks feature (evidence: `app/Http/Controllers/LandingInquiryController.php`)
- Staff → Inquiry conversion: reviews inquiries
- Inquiry conversion → Inquiry availability: checks feature (evidence: `app/Http/Controllers/Staff/PatientInquiryController.php`)
- Inquiry conversion → Patient inquiry: converts or rejects (evidence: `app/Http/Controllers/Staff/PatientInquiryController.php`)
- Inquiry conversion → Patient record: creates patient (evidence: `app/Http/Controllers/Staff/PatientInquiryController.php`)
- Inquiry conversion → User accounts: resolves account (evidence: `app/Http/Controllers/Staff/PatientInquiryController.php`)
- Inquiry conversion → Notifications: updates notices (evidence: `app/Http/Controllers/Staff/PatientInquiryController.php`)
- User accounts → Patient record: has profile (evidence: `app/Models/User.php`)
- User accounts → Dentist profile: has profile (evidence: `app/Models/User.php`)
- User accounts → Notifications: has notifications (evidence: `app/Models/User.php`)
- Appointment observer → Appointment: observes changes (evidence: `app/Providers/AppServiceProvider.php`)
- Appointment observer → Appointment reminders: dispatches jobs (evidence: `app/Observers/AppointmentObserver.php`)
- Appointment reminders → Appointment: loads appointment (evidence: `app/Jobs/SendAppointmentReminderJob.php`)
- Appointment reminders → Notifications: creates notice (evidence: `app/Jobs/SendAppointmentReminderJob.php`)
- Staff appointments → Booking email: sends booking mail (evidence: `app/Http/Controllers/Staff/AppointmentController.php`)
- Report data → Appointment: queries data (evidence: `app/Support/ReportData.php`)
- Report data → Patient record: queries data (evidence: `app/Support/ReportData.php`)
