# abdjaliltoumi/cabinet-medical architecture

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

- Interactive diagram: https://gitdiagram.com/abdjaliltoumi/cabinet-medical
- Repository: https://github.com/abdjaliltoumi/cabinet-medical

## Overview

This is a Laravel medical-cabinet application for patients, doctors, secretaries, and administrators. The main patient workflow is to choose a speciality, doctor, and available date, then submit an appointment request; doctors can record consultations, and patients can view medical files and prescriptions. The graph also covers role-based access, cabinet and doctor scheduling, administration, and contact messaging. Relationships are limited to those shown in excerpts, the source index, or the README; several controller details and the contact workflow were not sampled.

Main entry points: [`routes/web.php`](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/routes/web.php) (Web routes), [`app/Http/Controllers/AppointmentController.php`](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/AppointmentController.php) (Appointment booking), [`app/Http/Controllers/DoctorController.php`](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/DoctorController.php) (Doctor workflows), [`app/Models/Patient.php`](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/Patient.php) (Patient profiles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_web["Web routes<br/>[web.php]"]
  node_auth["Authentication"]
  node_role["Role access<br/>[CheckRole.php]"]
  node_user_data["User accounts<br/>[User.php]"]
end

subgraph group_booking["Appointments and schedules"]
  node_appointment["Appointment booking"]
  node_availability["Doctor availability<br/>[Availability.php]"]
  node_schedule["Cabinet schedule"]
  node_appointment_data["Appointment records<br/>[Appointment.php]"]
end

subgraph group_care["Clinical records"]
  node_doctor["Doctor workflows"]
  node_doctor_data["Doctor profiles<br/>[Doctor.php]"]
  node_consultation["Consultations<br/>[Consultation.php]"]
  node_prescription["Prescriptions<br/>[Prescription.php]"]
  node_patient_work["Patient records"]
  node_patient_data["Patient profiles<br/>[Patient.php]"]
  node_medical_file["Medical files<br/>[MedicalFile.php]"]
end

subgraph group_operations["Cabinet operations"]
  node_admin["Admin dashboard"]
  node_cabinet_admin["Schedule management"]
  node_audit["Activity logs<br/>[LogAction.php]"]
  node_contact["Contact messages"]
end

node_patient(("Patient"))

node_patient -->|"requests pages"| node_web
node_web -->|"routes to"| node_auth
node_web -->|"routes to"| node_appointment
node_web -->|"routes to"| node_doctor
node_web -->|"routes to"| node_patient_work
node_web -->|"routes to"| node_admin
node_web -->|"routes to"| node_cabinet_admin
node_web -->|"routes to"| node_contact
node_web -->|"applies role checks"| node_role
node_appointment -->|"reads and writes"| node_appointment_data
node_appointment -->|"checks capacity"| node_availability
node_appointment -->|"checks booking window"| node_schedule
node_appointment -->|"looks up doctors"| node_doctor_data
node_appointment -->|"loads patients"| node_patient_data
node_doctor -->|"loads appointments"| node_appointment_data
node_doctor -->|"creates consultation"| node_consultation
node_doctor -->|"manages availability"| node_availability
node_doctor -->|"reads schedule"| node_schedule
node_patient_work -->|"loads patient records"| node_patient_data
node_patient_work -->|"loads medical file"| node_medical_file
node_patient_work -->|"loads appointments"| node_appointment_data
node_consultation -->|"has prescription"| node_prescription
node_appointment_data -->|"has consultation"| node_consultation
node_patient_data -->|"has medical file"| node_medical_file
node_patient_data -->|"has appointments"| node_appointment_data
node_doctor_data -->|"has availabilities"| node_availability
node_availability -->|"belongs to schedule"| node_schedule
node_cabinet_admin -->|"updates schedule"| node_schedule
node_admin -->|"summarizes appointments"| node_appointment_data
node_admin -->|"summarizes doctors"| node_doctor_data
node_admin -->|"summarizes patients"| node_patient_data
node_admin -->|"reads activity"| node_audit
node_user_data -->|"has patient profile"| node_patient_data
node_user_data -->|"has doctor profile"| node_doctor_data
node_doctor -->|"records actions"| node_audit
node_appointment -->|"records changes"| node_audit

click node_web "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/routes/web.php"
click node_auth "https://github.com/abdjaliltoumi/cabinet-medical/tree/master/app/Http/Controllers/Auth"
click node_role "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Middleware/CheckRole.php"
click node_appointment "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/AppointmentController.php"
click node_availability "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/Availability.php"
click node_schedule "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/CabinetSchedule.php"
click node_appointment_data "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/Appointment.php"
click node_doctor "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/DoctorController.php"
click node_doctor_data "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/Doctor.php"
click node_consultation "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/Consultation.php"
click node_prescription "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/Prescription.php"
click node_patient_work "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/PatientController.php"
click node_patient_data "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/Patient.php"
click node_medical_file "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/MedicalFile.php"
click node_user_data "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/User.php"
click node_admin "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/AdminDashboardController.php"
click node_cabinet_admin "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/CabinetScheduleController.php"
click node_audit "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/LogAction.php"
click node_contact "https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/ContactController.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,node_auth,node_role,node_user_data toneBlue
class node_appointment,node_availability,node_schedule,node_appointment_data toneAmber
class node_doctor,node_doctor_data,node_consultation,node_prescription,node_patient_work,node_patient_data,node_medical_file toneMint
class node_admin,node_cabinet_admin,node_audit,node_contact toneRose
class node_patient toneIndigo
```

## Components

### Access and navigation

- [Web routes](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/routes/web.php): `routes/web.php`
- [Authentication](https://github.com/abdjaliltoumi/cabinet-medical/tree/master/app/Http/Controllers/Auth): `app/Http/Controllers/Auth`
- [Role access](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Middleware/CheckRole.php): `app/Http/Middleware/CheckRole.php`
- [User accounts](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/User.php): `app/Models/User.php`

### Appointments and schedules

- [Appointment booking](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/AppointmentController.php): `app/Http/Controllers/AppointmentController.php`
- [Doctor availability](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/Availability.php): `app/Models/Availability.php`
- [Cabinet schedule](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/CabinetSchedule.php): `app/Models/CabinetSchedule.php`
- [Appointment records](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/Appointment.php): `app/Models/Appointment.php`

### Clinical records

- [Doctor workflows](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/DoctorController.php): `app/Http/Controllers/DoctorController.php`
- [Doctor profiles](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/Doctor.php): `app/Models/Doctor.php`
- [Consultations](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/Consultation.php): `app/Models/Consultation.php`
- [Prescriptions](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/Prescription.php): `app/Models/Prescription.php`
- [Patient records](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/PatientController.php): `app/Http/Controllers/PatientController.php`
- [Patient profiles](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/Patient.php): `app/Models/Patient.php`
- [Medical files](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/MedicalFile.php): `app/Models/MedicalFile.php`

### Cabinet operations

- [Admin dashboard](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/AdminDashboardController.php): `app/Http/Controllers/AdminDashboardController.php`
- [Schedule management](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/CabinetScheduleController.php): `app/Http/Controllers/CabinetScheduleController.php`
- [Activity logs](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Models/LogAction.php): `app/Models/LogAction.php`
- [Contact messages](https://github.com/abdjaliltoumi/cabinet-medical/blob/master/app/Http/Controllers/ContactController.php): `app/Http/Controllers/ContactController.php`

### Other components

- **Patient**

## Connections

- Patient → Web routes: requests pages (evidence: `routes/web.php`)
- Web routes → Authentication: routes to (evidence: `routes/web.php`)
- Web routes → Appointment booking: routes to (evidence: `routes/web.php`)
- Web routes → Doctor workflows: routes to (evidence: `routes/web.php`)
- Web routes → Patient records: routes to (evidence: `routes/web.php`)
- Web routes → Admin dashboard: routes to (evidence: `routes/web.php`)
- Web routes → Schedule management: routes to (evidence: `routes/web.php`)
- Web routes → Contact messages: routes to (evidence: `routes/web.php`)
- Web routes → Role access: applies role checks
- Appointment booking → Appointment records: reads and writes (evidence: `app/Http/Controllers/AppointmentController.php`)
- Appointment booking → Doctor availability: checks capacity (evidence: `app/Http/Controllers/AppointmentController.php`)
- Appointment booking → Cabinet schedule: checks booking window (evidence: `app/Http/Controllers/AppointmentController.php`)
- Appointment booking → Doctor profiles: looks up doctors (evidence: `app/Http/Controllers/AppointmentController.php`)
- Appointment booking → Patient profiles: loads patients (evidence: `app/Http/Controllers/AppointmentController.php`)
- Doctor workflows → Appointment records: loads appointments (evidence: `app/Http/Controllers/DoctorController.php`)
- Doctor workflows → Consultations: creates consultation (evidence: `app/Http/Controllers/DoctorController.php`)
- Doctor workflows → Doctor availability: manages availability (evidence: `app/Http/Controllers/DoctorController.php`)
- Doctor workflows → Cabinet schedule: reads schedule (evidence: `app/Http/Controllers/DoctorController.php`)
- Patient records → Patient profiles: loads patient records (evidence: `app/Http/Controllers/PatientController.php`)
- Patient records → Medical files: loads medical file (evidence: `app/Http/Controllers/PatientController.php`)
- Patient records → Appointment records: loads appointments (evidence: `app/Http/Controllers/PatientController.php`)
- Consultations → Prescriptions: has prescription (evidence: `app/Models/Consultation.php`)
- Appointment records → Consultations: has consultation (evidence: `app/Models/Appointment.php`)
- Patient profiles → Medical files: has medical file (evidence: `app/Models/Patient.php`)
- Patient profiles → Appointment records: has appointments (evidence: `app/Models/Patient.php`)
- Doctor profiles → Doctor availability: has availabilities (evidence: `app/Models/Doctor.php`)
- Doctor availability → Cabinet schedule: belongs to schedule (evidence: `app/Models/Availability.php`)
- Schedule management → Cabinet schedule: updates schedule (evidence: `app/Http/Controllers/CabinetScheduleController.php`)
- Admin dashboard → Appointment records: summarizes appointments (evidence: `app/Http/Controllers/AdminDashboardController.php`)
- Admin dashboard → Doctor profiles: summarizes doctors (evidence: `app/Http/Controllers/AdminDashboardController.php`)
- Admin dashboard → Patient profiles: summarizes patients (evidence: `app/Http/Controllers/AdminDashboardController.php`)
- Admin dashboard → Activity logs: reads activity (evidence: `app/Http/Controllers/AdminDashboardController.php`)
- User accounts → Patient profiles: has patient profile (evidence: `app/Models/User.php`)
- User accounts → Doctor profiles: has doctor profile (evidence: `app/Models/User.php`)
- Doctor workflows → Activity logs: records actions (evidence: `app/Http/Controllers/DoctorController.php`)
- Appointment booking → Activity logs: records changes (evidence: `app/Http/Controllers/AppointmentController.php`)
