# yohsupremo/vetsystem architecture

> Architecture diagram of the GitHub repository yohsupremo/vetsystem, 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/yohsupremo/vetsystem
- Repository: https://github.com/yohsupremo/vetsystem

## Overview

This is a Laravel veterinary-clinic application, with customer, administrative, and veterinary workflows for appointments, pet care, billing, inventory, and notifications. The visible workflow includes appointment-queue handling, veterinarian-facing care, and customer invoice payment; the tree also shows broader clinic capabilities such as surgery, laboratory, pharmacy, grooming, boarding, and QR pet scanning. Evidence is limited to the supplied excerpts and SOURCE INDEX references, so unsampled route wiring and subsystem interactions are omitted rather than assumed.

Main entry points: [`app/Http/Controllers/Veterinarian/VeterinarianController.php`](https://github.com/yohsupremo/vetsystem/blob/master/app/Http/Controllers/Veterinarian/VeterinarianController.php) (Veterinarian workspace), [`app/Models/Appointment.php`](https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Appointment.php) (Appointments), [`app/Models/Pet.php`](https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Pet.php) (Pet profiles), [`app/Http/Controllers/Api/AppointmentQueueController.php`](https://github.com/yohsupremo/vetsystem/blob/master/app/Http/Controllers/Api/AppointmentQueueController.php) (Appointment queue API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clinic["Clinic operations"]
  node_queue_api["Appointment queue API"]
  node_queue_service["Appointment queue service"]
  node_appointments[("Appointments<br/>[Appointment.php]")]
  node_owners[("Pet owners<br/>[PetOwner.php]")]
  node_users[("Users and staff<br/>[User.php]")]
end

subgraph group_care["Veterinary care"]
  node_pets[("Pet profiles<br/>[Pet.php]")]
  node_veterinary["Veterinarian workspace"]
  node_records[("Medical records<br/>[MedicalRecord.php]")]
  node_surgery[("Surgery records<br/>[Surgery.php]")]
  node_vaccinations[("Vaccinations<br/>[Vaccination.php]")]
end

subgraph group_commerce["Billing and stock"]
  node_customer_billing["Customer billing"]
  node_invoices[("Invoices<br/>[Invoice.php]")]
  node_payments[("Payments<br/>[Payment.php]")]
  node_inventory[("Inventory stock<br/>[InventoryStock.php]")]
  node_admin_reports["Admin reports"]
end

subgraph group_messaging["Notifications"]
  node_notification_service["Notification service"]
  node_notifications[("Notifications<br/>[Notification.php]")]
  node_notification_event["Notification event"]
  node_event_wiring["Event registration"]
  node_notification_listener["Notification listener"]
end

node_customer(("Pet owner"))
node_staff(("Clinic staff"))

node_customer -.->|"requests queue"| node_queue_api
node_queue_api -->|"delegates"| node_queue_service
node_queue_api -->|"reads appointments"| node_appointments
node_queue_service -->|"uses appointments"| node_appointments
node_appointments -->|"belongs to"| node_pets
node_appointments -->|"assigns veterinarian"| node_users
node_staff -.->|"uses workspace"| node_veterinary
node_veterinary -->|"uses appointments"| node_appointments
node_veterinary -->|"uses pet profiles"| node_pets
node_veterinary -->|"uses records"| node_records
node_veterinary -->|"uses vaccinations"| node_vaccinations
node_pets -->|"has records"| node_records
node_pets -->|"has surgeries"| node_surgery
node_customer -.->|"views and pays"| node_customer_billing
node_customer_billing -->|"reads and updates"| node_invoices
node_customer_billing -->|"creates and deletes"| node_payments
node_invoices -->|"has payments"| node_payments
node_admin_reports -->|"queries invoices"| node_invoices
node_admin_reports -->|"queries stock"| node_inventory
node_veterinary -->|"sends notifications"| node_notification_service
node_notification_service -->|"creates notifications"| node_notifications
node_notification_service -->|"dispatches event"| node_notification_event
node_event_wiring -->|"registers event"| node_notification_event
node_event_wiring -->|"registers listener"| node_notification_listener

click node_queue_api "https://github.com/yohsupremo/vetsystem/blob/master/app/Http/Controllers/Api/AppointmentQueueController.php"
click node_queue_service "https://github.com/yohsupremo/vetsystem/blob/master/app/Services/AppointmentQueueService.php"
click node_appointments "https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Appointment.php"
click node_pets "https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Pet.php"
click node_owners "https://github.com/yohsupremo/vetsystem/blob/master/app/Models/PetOwner.php"
click node_users "https://github.com/yohsupremo/vetsystem/blob/master/app/Models/User.php"
click node_veterinary "https://github.com/yohsupremo/vetsystem/blob/master/app/Http/Controllers/Veterinarian/VeterinarianController.php"
click node_records "https://github.com/yohsupremo/vetsystem/blob/master/app/Models/MedicalRecord.php"
click node_surgery "https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Surgery.php"
click node_vaccinations "https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Vaccination.php"
click node_customer_billing "https://github.com/yohsupremo/vetsystem/blob/master/app/Http/Controllers/Customer/BillingController.php"
click node_invoices "https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Invoice.php"
click node_payments "https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Payment.php"
click node_inventory "https://github.com/yohsupremo/vetsystem/blob/master/app/Models/InventoryStock.php"
click node_admin_reports "https://github.com/yohsupremo/vetsystem/blob/master/app/Http/Controllers/Admin/ReportController.php"
click node_notification_service "https://github.com/yohsupremo/vetsystem/blob/master/app/Services/NotificationService.php"
click node_notifications "https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Notification.php"
click node_notification_event "https://github.com/yohsupremo/vetsystem/blob/master/app/Events/NotificationCreated.php"
click node_event_wiring "https://github.com/yohsupremo/vetsystem/blob/master/app/Providers/EventServiceProvider.php"
click node_notification_listener "https://github.com/yohsupremo/vetsystem/blob/master/app/Listeners/SendNotificationListener.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_queue_api,node_queue_service,node_appointments,node_owners,node_users toneBlue
class node_pets,node_veterinary,node_records,node_surgery,node_vaccinations toneAmber
class node_customer_billing,node_invoices,node_payments,node_inventory,node_admin_reports toneMint
class node_notification_service,node_notifications,node_notification_event,node_event_wiring,node_notification_listener toneRose
class node_customer,node_staff toneIndigo
```

## Components

### Clinic operations

- [Appointment queue API](https://github.com/yohsupremo/vetsystem/blob/master/app/Http/Controllers/Api/AppointmentQueueController.php): `app/Http/Controllers/Api/AppointmentQueueController.php`
- [Appointment queue service](https://github.com/yohsupremo/vetsystem/blob/master/app/Services/AppointmentQueueService.php): `app/Services/AppointmentQueueService.php`
- [Appointments](https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Appointment.php): `app/Models/Appointment.php`
- [Pet owners](https://github.com/yohsupremo/vetsystem/blob/master/app/Models/PetOwner.php): `app/Models/PetOwner.php`
- [Users and staff](https://github.com/yohsupremo/vetsystem/blob/master/app/Models/User.php): `app/Models/User.php`

### Veterinary care

- [Pet profiles](https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Pet.php): `app/Models/Pet.php`
- [Veterinarian workspace](https://github.com/yohsupremo/vetsystem/blob/master/app/Http/Controllers/Veterinarian/VeterinarianController.php): `app/Http/Controllers/Veterinarian/VeterinarianController.php`
- [Medical records](https://github.com/yohsupremo/vetsystem/blob/master/app/Models/MedicalRecord.php): `app/Models/MedicalRecord.php`
- [Surgery records](https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Surgery.php): `app/Models/Surgery.php`
- [Vaccinations](https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Vaccination.php): `app/Models/Vaccination.php`

### Billing and stock

- [Customer billing](https://github.com/yohsupremo/vetsystem/blob/master/app/Http/Controllers/Customer/BillingController.php): `app/Http/Controllers/Customer/BillingController.php`
- [Invoices](https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Invoice.php): `app/Models/Invoice.php`
- [Payments](https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Payment.php): `app/Models/Payment.php`
- [Inventory stock](https://github.com/yohsupremo/vetsystem/blob/master/app/Models/InventoryStock.php): `app/Models/InventoryStock.php`
- [Admin reports](https://github.com/yohsupremo/vetsystem/blob/master/app/Http/Controllers/Admin/ReportController.php): `app/Http/Controllers/Admin/ReportController.php`

### Notifications

- [Notification service](https://github.com/yohsupremo/vetsystem/blob/master/app/Services/NotificationService.php): `app/Services/NotificationService.php`
- [Notifications](https://github.com/yohsupremo/vetsystem/blob/master/app/Models/Notification.php): `app/Models/Notification.php`
- [Notification event](https://github.com/yohsupremo/vetsystem/blob/master/app/Events/NotificationCreated.php): `app/Events/NotificationCreated.php`
- [Event registration](https://github.com/yohsupremo/vetsystem/blob/master/app/Providers/EventServiceProvider.php): `app/Providers/EventServiceProvider.php`
- [Notification listener](https://github.com/yohsupremo/vetsystem/blob/master/app/Listeners/SendNotificationListener.php): `app/Listeners/SendNotificationListener.php`

### Other components

- **Pet owner**
- **Clinic staff**

## Connections

- Pet owner → Appointment queue API: requests queue
- Appointment queue API → Appointment queue service: delegates (evidence: `app/Http/Controllers/Api/AppointmentQueueController.php`)
- Appointment queue API → Appointments: reads appointments (evidence: `app/Http/Controllers/Api/AppointmentQueueController.php`)
- Appointment queue service → Appointments: uses appointments (evidence: `app/Services/AppointmentQueueService.php`)
- Appointments → Pet profiles: belongs to (evidence: `app/Models/Appointment.php`)
- Appointments → Users and staff: assigns veterinarian (evidence: `app/Models/Appointment.php`)
- Clinic staff → Veterinarian workspace: uses workspace
- Veterinarian workspace → Appointments: uses appointments (evidence: `app/Http/Controllers/Veterinarian/VeterinarianController.php`)
- Veterinarian workspace → Pet profiles: uses pet profiles (evidence: `app/Http/Controllers/Veterinarian/VeterinarianController.php`)
- Veterinarian workspace → Medical records: uses records (evidence: `app/Http/Controllers/Veterinarian/VeterinarianController.php`)
- Veterinarian workspace → Vaccinations: uses vaccinations (evidence: `app/Http/Controllers/Veterinarian/VeterinarianController.php`)
- Pet profiles → Medical records: has records (evidence: `app/Models/Pet.php`)
- Pet profiles → Surgery records: has surgeries (evidence: `app/Models/Pet.php`)
- Pet owner → Customer billing: views and pays
- Customer billing → Invoices: reads and updates (evidence: `app/Http/Controllers/Customer/BillingController.php`)
- Customer billing → Payments: creates and deletes (evidence: `app/Http/Controllers/Customer/BillingController.php`)
- Invoices → Payments: has payments (evidence: `app/Models/Invoice.php`)
- Admin reports → Invoices: queries invoices (evidence: `app/Http/Controllers/Admin/ReportController.php`)
- Admin reports → Inventory stock: queries stock (evidence: `app/Http/Controllers/Admin/ReportController.php`)
- Veterinarian workspace → Notification service: sends notifications (evidence: `app/Http/Controllers/Veterinarian/VeterinarianController.php`)
- Notification service → Notifications: creates notifications (evidence: `app/Services/NotificationService.php`)
- Notification service → Notification event: dispatches event (evidence: `app/Services/NotificationService.php`)
- Event registration → Notification event: registers event (evidence: `app/Providers/EventServiceProvider.php`)
- Event registration → Notification listener: registers listener (evidence: `app/Providers/EventServiceProvider.php`)
