# pedrorodriguesufp/barbeariamodel architecture

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

## Overview

This is a Laravel barbershop booking and management application: customers and staff use web workflows for services, appointments, calendars, payments, and reviews, while administrators manage barbers and users. The graph separates those domain areas from shared identity and the Eloquent model layer. Several controllers and routes are unsampled, so their links are dashed where the tree suggests a feature but no shown source establishes the call path; the supplied README describes Laravel, not this application’s capabilities.

Main entry points: [`app/Models/Appointment.php`](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Models/Appointment.php) (Appointments), [`app/Models/User.php`](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Models/User.php) (Users and barbers), [`app/Models/Service.php`](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Models/Service.php) (Services), [`app/Http/Controllers/AppointmentController.php`](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/AppointmentController.php) (Appointment workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_booking["Booking and services"]
  node_booking_ui["Appointment UI<br/>[index.blade.php]"]
  node_appointment_controller["Appointment workflow"]
  node_calendar_controller["Calendar"]
  node_barber_controller["Barber availability"]
  node_service_controller["Service catalog"]
end

subgraph group_people["Identity and operations"]
  node_auth_controller["Authentication"]
  node_registration["Registration"]
  node_google_login["Google login"]
  node_admin_barbers["Barber administration"]
  node_admin_dashboard["Admin dashboard"]
end

subgraph group_commerce["Payments and reviews"]
  node_payment_controller["Payment workflow"]
  node_stripe_gateway["Stripe gateway<br/>[StripeGateway.php]"]
  node_payment_recorder["Payment recorder"]
  node_webhook["Stripe webhook"]
  node_review_controller["Review workflow"]
end

subgraph group_domain["Domain records"]
  node_service[("Services<br/>[Service.php]")]
  node_appointment[("Appointments<br/>[Appointment.php]")]
  node_user[("Users and barbers<br/>[User.php]")]
  node_payment[("Payments<br/>[Payment.php]")]
  node_review[("Reviews<br/>[Review.php]")]
end

node_customer(("Customer"))
node_stripe(("Stripe"))

node_customer -.->|"uses"| node_booking_ui
node_booking_ui -.->|"submits to"| node_appointment_controller
node_appointment_controller -.->|"manages"| node_appointment
node_appointment_controller -.->|"selects"| node_service
node_appointment_controller -.->|"assigns barber"| node_user
node_calendar_controller -.->|"schedules"| node_appointment
node_barber_controller -.->|"checks availability"| node_user
node_service_controller -.->|"manages"| node_service
node_auth_controller -.->|"authenticates"| node_customer
node_registration -->|"creates"| node_user
node_google_login -->|"finds or creates"| node_user
node_admin_barbers -->|"manages"| node_user
node_admin_barbers -->|"assigns services"| node_service
node_admin_dashboard -->|"summarizes"| node_appointment
node_admin_dashboard -->|"summarizes"| node_payment
node_admin_dashboard -->|"summarizes"| node_service
node_payment_controller -->|"creates checkout"| node_stripe_gateway
node_payment_controller -->|"records checkout"| node_payment_recorder
node_stripe_gateway -.->|"requests checkout"| node_stripe
node_webhook -->|"verifies events"| node_stripe_gateway
node_webhook -->|"records events"| node_payment_recorder
node_payment_recorder -->|"persists payment"| node_payment
node_review_controller -->|"loads completed"| node_appointment
node_review_controller -->|"creates reviews"| node_review
node_appointment -->|"references"| node_service
node_appointment -->|"has payments"| node_payment
node_appointment -->|"has reviews"| node_review
node_service -->|"receives reviews"| node_review
node_user -->|"has bookings"| node_appointment
node_user -->|"offers"| node_service
node_payment -->|"belongs to"| node_appointment
node_review -->|"belongs to"| node_appointment

click node_booking_ui "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/resources/views/appointments/index.blade.php"
click node_appointment_controller "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/AppointmentController.php"
click node_calendar_controller "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/CalendarController.php"
click node_barber_controller "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/BarberController.php"
click node_service_controller "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/ServiceController.php"
click node_service "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Models/Service.php"
click node_appointment "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Models/Appointment.php"
click node_user "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Models/User.php"
click node_auth_controller "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_registration "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_google_login "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/Auth/GoogleLoginController.php"
click node_admin_barbers "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/Admin/BarberController.php"
click node_admin_dashboard "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/Admin/DashboardController.php"
click node_payment_controller "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/PaymentController.php"
click node_stripe_gateway "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Services/StripeGateway.php"
click node_payment_recorder "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Services/StripePaymentRecorder.php"
click node_webhook "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/Api/StripeWebhookController.php"
click node_payment "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Models/Payment.php"
click node_review_controller "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/ReviewController.php"
click node_review "https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Models/Review.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_booking_ui,node_appointment_controller,node_calendar_controller,node_barber_controller,node_service_controller toneBlue
class node_auth_controller,node_registration,node_google_login,node_admin_barbers,node_admin_dashboard toneAmber
class node_payment_controller,node_stripe_gateway,node_payment_recorder,node_webhook,node_review_controller toneMint
class node_service,node_appointment,node_user,node_payment,node_review toneRose
class node_customer,node_stripe toneIndigo
```

## Components

### Booking and services

- [Appointment UI](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/resources/views/appointments/index.blade.php): `resources/views/appointments/index.blade.php`
- [Appointment workflow](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/AppointmentController.php): `app/Http/Controllers/AppointmentController.php`
- [Calendar](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/CalendarController.php): `app/Http/Controllers/CalendarController.php`
- [Barber availability](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/BarberController.php): `app/Http/Controllers/BarberController.php`
- [Service catalog](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/ServiceController.php): `app/Http/Controllers/ServiceController.php`

### Identity and operations

- [Authentication](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Registration](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [Google login](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/Auth/GoogleLoginController.php): `app/Http/Controllers/Auth/GoogleLoginController.php`
- [Barber administration](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/Admin/BarberController.php): `app/Http/Controllers/Admin/BarberController.php`
- [Admin dashboard](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/Admin/DashboardController.php): `app/Http/Controllers/Admin/DashboardController.php`

### Payments and reviews

- [Payment workflow](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/PaymentController.php): `app/Http/Controllers/PaymentController.php`
- [Stripe gateway](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Services/StripeGateway.php): `app/Services/StripeGateway.php`
- [Payment recorder](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Services/StripePaymentRecorder.php): `app/Services/StripePaymentRecorder.php`
- [Stripe webhook](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/Api/StripeWebhookController.php): `app/Http/Controllers/Api/StripeWebhookController.php`
- [Review workflow](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Http/Controllers/ReviewController.php): `app/Http/Controllers/ReviewController.php`

### Domain records

- [Services](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Models/Service.php): `app/Models/Service.php`
- [Appointments](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Models/Appointment.php): `app/Models/Appointment.php`
- [Users and barbers](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Models/User.php): `app/Models/User.php`
- [Payments](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Models/Payment.php): `app/Models/Payment.php`
- [Reviews](https://github.com/pedrorodriguesufp/barbeariamodel/blob/main/app/Models/Review.php): `app/Models/Review.php`

### Other components

- **Customer**
- **Stripe**

## Connections

- Customer → Appointment UI: uses
- Appointment UI → Appointment workflow: submits to
- Appointment workflow → Appointments: manages
- Appointment workflow → Services: selects
- Appointment workflow → Users and barbers: assigns barber
- Calendar → Appointments: schedules
- Barber availability → Users and barbers: checks availability
- Service catalog → Services: manages
- Authentication → Customer: authenticates
- Registration → Users and barbers: creates (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Google login → Users and barbers: finds or creates (evidence: `app/Http/Controllers/Auth/GoogleLoginController.php`)
- Barber administration → Users and barbers: manages (evidence: `app/Http/Controllers/Admin/BarberController.php`)
- Barber administration → Services: assigns services (evidence: `app/Http/Controllers/Admin/BarberController.php`)
- Admin dashboard → Appointments: summarizes (evidence: `app/Http/Controllers/Admin/DashboardController.php`)
- Admin dashboard → Payments: summarizes (evidence: `app/Http/Controllers/Admin/DashboardController.php`)
- Admin dashboard → Services: summarizes (evidence: `app/Http/Controllers/Admin/DashboardController.php`)
- Payment workflow → Stripe gateway: creates checkout (evidence: `app/Http/Controllers/PaymentController.php`)
- Payment workflow → Payment recorder: records checkout (evidence: `app/Http/Controllers/PaymentController.php`)
- Stripe gateway → Stripe: requests checkout
- Stripe webhook → Stripe gateway: verifies events (evidence: `app/Http/Controllers/Api/StripeWebhookController.php`)
- Stripe webhook → Payment recorder: records events (evidence: `app/Http/Controllers/Api/StripeWebhookController.php`)
- Payment recorder → Payments: persists payment (evidence: `app/Services/StripePaymentRecorder.php`)
- Review workflow → Appointments: loads completed (evidence: `app/Http/Controllers/ReviewController.php`)
- Review workflow → Reviews: creates reviews (evidence: `app/Http/Controllers/ReviewController.php`)
- Appointments → Services: references (evidence: `app/Models/Appointment.php`)
- Appointments → Payments: has payments (evidence: `app/Models/Appointment.php`)
- Appointments → Reviews: has reviews (evidence: `app/Models/Appointment.php`)
- Services → Reviews: receives reviews (evidence: `app/Models/Service.php`)
- Users and barbers → Appointments: has bookings (evidence: `app/Models/User.php`)
- Users and barbers → Services: offers (evidence: `app/Models/User.php`)
- Payments → Appointments: belongs to (evidence: `app/Models/Payment.php`)
- Reviews → Appointments: belongs to (evidence: `app/Models/Review.php`)
