# ayoubbellaoui/clinique-medicale-app architecture

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

- Interactive diagram: https://gitdiagram.com/ayoubbellaoui/clinique-medicale-app
- Repository: https://github.com/ayoubbellaoui/clinique-medicale-app

## Overview

ClinicPro is a Laravel clinic-management application. Staff use routed web screens to manage patient records, schedule appointments, check patients into the waiting queue, record consultations, issue prescriptions and bill visits; paying a linked invoice closes its queue entry. The graph preserves the documented cross-module workflow and the major dashboard, staff, account, search and notification capabilities. Some controller behavior is represented from the README and source-index references because those files were not excerpted; unsupported implementation details are omitted.

Main entry points: [`routes/web.php`](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/ConsultationController.php`](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/ConsultationController.php) (Consultations), [`app/Http/Controllers/RendezVousController.php`](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/RendezVousController.php) (Appointments), [`app/Http/Controllers/FileAttenteController.php`](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/FileAttenteController.php) (Waiting queue)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry and access"]
  node_routes["Web routes<br/>[web.php]"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_access["Role access<br/>[EnsureRole.php]"]
end

subgraph group_operations["Clinic workflow"]
  node_patients["Patient records"]
  node_appointments["Appointments"]
  node_queue["Waiting queue"]
  node_consultations["Consultations"]
  node_prescriptions["Prescriptions"]
  node_billing["Billing"]
end

subgraph group_records["Clinical and financial records"]
  node_patient_model["Patient model<br/>[Patient.php]"]
  node_appointment_model["Appointment model<br/>[RendezVous.php]"]
  node_queue_model["Queue model<br/>[FileAttente.php]"]
  node_consultation_model["Consultation model<br/>[Consultation.php]"]
  node_prescription_model["Prescription model<br/>[Ordonnance.php]"]
  node_invoice_model["Invoice model<br/>[Facture.php]"]
  node_database[("Application database")]
end

subgraph group_admin["Staff and oversight"]
  node_staff_admin["Staff and users"]
  node_dashboard["Dashboard"]
  node_search["Global search"]
  node_notifications["Notifications"]
end

node_staff_user(("Clinic staff"))

node_staff_user -->|"uses screens"| node_routes
node_routes -->|"routes login"| node_auth
node_routes -->|"routes requests"| node_patients
node_routes -->|"routes requests"| node_appointments
node_routes -->|"routes requests"| node_queue
node_routes -->|"routes requests"| node_consultations
node_routes -->|"routes requests"| node_prescriptions
node_routes -->|"routes requests"| node_billing
node_routes -->|"routes requests"| node_staff_admin
node_routes -->|"routes requests"| node_dashboard
node_routes -->|"routes requests"| node_search
node_access -->|"guards routes"| node_routes
node_patients -->|"reads and writes"| node_patient_model
node_appointments -->|"reads and writes"| node_appointment_model
node_queue -->|"reads and writes"| node_queue_model
node_consultations -->|"reads and writes"| node_consultation_model
node_prescriptions -->|"reads and writes"| node_prescription_model
node_billing -->|"reads and writes"| node_invoice_model
node_billing -->|"closes visit queue"| node_queue_model
node_appointments -->|"check-in confirms"| node_queue
node_queue -->|"leads to"| node_consultations
node_consultations -->|"produces"| node_prescriptions
node_consultations -->|"creates follow-up"| node_appointments
node_consultations -->|"billed in"| node_billing
node_patients -->|"maintains records"| node_patient_model
node_staff_admin -.->|"manages staff accounts"| node_database
node_dashboard -.->|"aggregates clinic activity"| node_database
node_search -.->|"searches records"| node_database
node_staff_admin -.->|"notifies on changes"| node_notifications
node_notifications -->|"delivers alerts"| node_staff_user
node_patient_model -.->|"persists records"| node_database
node_appointment_model -.->|"persists bookings"| node_database
node_queue_model -.->|"persists tickets"| node_database
node_consultation_model -.->|"persists visits"| node_database
node_prescription_model -.->|"persists prescriptions"| node_database
node_invoice_model -.->|"persists invoices"| node_database

click node_routes "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/routes/web.php"
click node_auth "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/AuthController.php"
click node_access "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Middleware/EnsureRole.php"
click node_patients "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/PatientController.php"
click node_appointments "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/RendezVousController.php"
click node_queue "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/FileAttenteController.php"
click node_consultations "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/ConsultationController.php"
click node_prescriptions "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/OrdonnancesController.php"
click node_billing "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/FacturesController.php"
click node_patient_model "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Models/Patient.php"
click node_appointment_model "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Models/RendezVous.php"
click node_queue_model "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Models/FileAttente.php"
click node_consultation_model "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Models/Consultation.php"
click node_prescription_model "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Models/Ordonnance.php"
click node_invoice_model "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Models/Facture.php"
click node_staff_admin "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/StaffMedicalController.php"
click node_dashboard "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/DashboardController.php"
click node_search "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/SearchController.php"
click node_notifications "https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Notifications/ClinicNotification.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_auth,node_access toneBlue
class node_patients,node_appointments,node_queue,node_consultations,node_prescriptions,node_billing toneAmber
class node_patient_model,node_appointment_model,node_queue_model,node_consultation_model,node_prescription_model,node_invoice_model,node_database toneMint
class node_staff_admin,node_dashboard,node_search,node_notifications toneRose
class node_staff_user toneIndigo
```

## Components

### Web entry and access

- [Web routes](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/routes/web.php): `routes/web.php`
- [Authentication](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Role access](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Middleware/EnsureRole.php): `app/Http/Middleware/EnsureRole.php`

### Clinic workflow

- [Patient records](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/PatientController.php): `app/Http/Controllers/PatientController.php`
- [Appointments](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/RendezVousController.php): `app/Http/Controllers/RendezVousController.php`
- [Waiting queue](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/FileAttenteController.php): `app/Http/Controllers/FileAttenteController.php`
- [Consultations](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/ConsultationController.php): `app/Http/Controllers/ConsultationController.php`
- [Prescriptions](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/OrdonnancesController.php): `app/Http/Controllers/OrdonnancesController.php`
- [Billing](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/FacturesController.php): `app/Http/Controllers/FacturesController.php`

### Clinical and financial records

- [Patient model](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Models/Patient.php): `app/Models/Patient.php`
- [Appointment model](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Models/RendezVous.php): `app/Models/RendezVous.php`
- [Queue model](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Models/FileAttente.php): `app/Models/FileAttente.php`
- [Consultation model](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Models/Consultation.php): `app/Models/Consultation.php`
- [Prescription model](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Models/Ordonnance.php): `app/Models/Ordonnance.php`
- [Invoice model](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Models/Facture.php): `app/Models/Facture.php`
- **Application database**

### Staff and oversight

- [Staff and users](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/StaffMedicalController.php): `app/Http/Controllers/StaffMedicalController.php`
- [Dashboard](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- [Global search](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Http/Controllers/SearchController.php): `app/Http/Controllers/SearchController.php`
- [Notifications](https://github.com/ayoubbellaoui/clinique-medicale-app/blob/main/app/Notifications/ClinicNotification.php): `app/Notifications/ClinicNotification.php`

### Other components

- **Clinic staff**

## Connections

- Clinic staff → Web routes: uses screens
- Web routes → Authentication: routes login (evidence: `routes/web.php`)
- Web routes → Patient records: routes requests (evidence: `routes/web.php`)
- Web routes → Appointments: routes requests (evidence: `routes/web.php`)
- Web routes → Waiting queue: routes requests (evidence: `routes/web.php`)
- Web routes → Consultations: routes requests (evidence: `routes/web.php`)
- Web routes → Prescriptions: routes requests (evidence: `routes/web.php`)
- Web routes → Billing: routes requests (evidence: `routes/web.php`)
- Web routes → Staff and users: routes requests (evidence: `routes/web.php`)
- Web routes → Dashboard: routes requests (evidence: `routes/web.php`)
- Web routes → Global search: routes requests (evidence: `routes/web.php`)
- Role access → Web routes: guards routes
- Patient records → Patient model: reads and writes (evidence: `app/Http/Controllers/PatientController.php`)
- Appointments → Appointment model: reads and writes (evidence: `app/Http/Controllers/RendezVousController.php`)
- Waiting queue → Queue model: reads and writes (evidence: `app/Http/Controllers/FileAttenteController.php`)
- Consultations → Consultation model: reads and writes (evidence: `app/Http/Controllers/ConsultationController.php`)
- Prescriptions → Prescription model: reads and writes (evidence: `app/Http/Controllers/OrdonnancesController.php`)
- Billing → Invoice model: reads and writes (evidence: `app/Http/Controllers/FacturesController.php`)
- Billing → Queue model: closes visit queue (evidence: `app/Http/Controllers/FacturesController.php`)
- Appointments → Waiting queue: check-in confirms
- Waiting queue → Consultations: leads to
- Consultations → Prescriptions: produces
- Consultations → Appointments: creates follow-up
- Consultations → Billing: billed in
- Patient records → Patient model: maintains records (evidence: `app/Http/Controllers/PatientController.php`)
- Staff and users → Application database: manages staff accounts
- Dashboard → Application database: aggregates clinic activity
- Global search → Application database: searches records
- Staff and users → Notifications: notifies on changes (evidence: `app/Http/Controllers/StaffMedicalController.php`)
- Notifications → Clinic staff: delivers alerts (evidence: `app/Notifications/ClinicNotification.php`)
- Patient model → Application database: persists records
- Appointment model → Application database: persists bookings
- Queue model → Application database: persists tickets
- Consultation model → Application database: persists visits
- Prescription model → Application database: persists prescriptions
- Invoice model → Application database: persists invoices
