How abdallahsaadelbasuoiny/clinic_managment_system works
This is a Laravel clinic-management application, with API workflows for authentication, staff and patient records, appointments, and invoicing. API routes dispatch to controllers, which validate requests, operate on Eloquent models, and serialize responses through resources. The tree also includes a substantial clinic Blade view, but its behavior was not sampled; its relationship to the API is therefore not asserted. Connections below are limited to the source index, excerpts, and bootstrap wiring provided.
Main entry points: api.php API routes · User.php User accounts · InvoiceController.php Invoice and payment · AdminUserController.php Staff administration
Components 20
API entry and access
- API routes
routes/api.php - Role middleware
app/Http/Middleware/EnsureUserHasRole.php - Application bootstrap
bootstrap/app.php
Clinic people
- Authentication
app/Http/Controllers/Api/AuthController.php - User registration
app/Actions/RegisterUserAction.php - Staff administration
app/Http/Controllers/Api/AdminUserController.php - Patient records
app/Http/Controllers/Api/PatientController.php - User accounts
app/Models/User.php - Patient model
app/Models/Patient.php - Clinic model
app/Models/Clinic.php
Care scheduling
- Appointment management
app/Http/Controllers/Api/AppointmentController.php - Appointment model
app/Models/Appointment.php - Appointment response
app/Http/Resources/AppointmentResource.php
Billing records
- Invoice and payment
app/Http/Controllers/Api/InvoiceController.php - Invoice model
app/Models/Invoice.php - Invoice items
app/Models/InvoiceItem.php - Payment records
app/Models/Payment.php - Invoice response
app/Http/Resources/InvoiceResource.php
Other components
- Clinic user
- Clinic dashboard view
resources/views/clinic.blade.php
Connections 27
- Clinic user → API routes: sends API request
routes/api.php - API routes → Authentication: routes auth
routes/api.php - API routes → Staff administration: routes staff
routes/api.php - API routes → Patient records: routes patients
routes/api.php - API routes → Appointment management: routes appointments
routes/api.php - API routes → Invoice and payment: routes invoices
routes/api.php - Clinic user → User registration: submits registration
- User registration → User accounts: creates account
app/Actions/RegisterUserAction.php - Authentication → User accounts: authenticates
app/Http/Controllers/Api/AuthController.php - Authentication → User accounts: serializes user
app/Http/Controllers/Api/AuthController.php - Staff administration → User accounts: creates and lists
app/Http/Controllers/Api/AdminUserController.php - Staff administration → User accounts: serializes users
app/Http/Controllers/Api/AdminUserController.php - Patient records → Patient model: reads and writes
app/Http/Controllers/Api/PatientController.php - Appointment management → Appointment model: reads and writes
app/Http/Controllers/Api/AppointmentController.php - Appointment management → Appointment response: serializes appointments
app/Http/Controllers/Api/AppointmentController.php - Invoice and payment → Invoice model: reads and writes
app/Http/Controllers/Api/InvoiceController.php - Invoice and payment → Invoice items: creates invoice items
app/Http/Controllers/Api/InvoiceController.php - Invoice and payment → Payment records: records payments
app/Http/Controllers/Api/InvoiceController.php - Invoice and payment → Invoice response: serializes invoices
app/Http/Controllers/Api/InvoiceController.php - Appointment model → Patient model: references patient
app/Models/Appointment.php - Appointment model → User accounts: references doctor
app/Models/Appointment.php - Invoice model → Patient model: references patient
app/Models/Invoice.php - Invoice model → Invoice items: has many items
app/Models/Invoice.php - Invoice model → Payment records: has many payments
app/Models/Invoice.php - Staff administration → Role middleware: role-gated routes
- Patient records → Role middleware: role-gated routes
- Application bootstrap → Role middleware: registers alias
bootstrap/app.php