# n3ut4/pablo architecture

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

- Interactive diagram: https://gitdiagram.com/n3ut4/pablo
- Repository: https://github.com/n3ut4/pablo

## Overview

ITZA TATTOO STUDIO is a PHP MVC web application for a tattoo studio. Customers register or sign in, browse studio information, book appointments, submit informed consent, and manage deposits; staff and administrators manage schedules, gallery content, promotions, users, payments, and reports. Requests enter through `index.php` and `core/Enrutador.php`, then reach controllers, models, and rendered views. The README documents MySQL-backed accounts and the studio’s main domain records. Some controller/model links are based on module references rather than sampled call sites, so those edges are marked unverified.

Main entry points: [`core/Enrutador.php`](https://github.com/n3ut4/pablo/blob/main/core/Enrutador.php) (Action router), [`app/controllers/ControladorDashboard.php`](https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorDashboard.php) (Customer and admin dashboard), [`app/controllers/ControladorCitas.php`](https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorCitas.php) (Appointment handling), [`index.php`](https://github.com/n3ut4/pablo/blob/main/index.php) (PHP entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Request handling"]
  node_entrypoint["PHP entry point<br/>[index.php]"]
  node_router["Action router<br/>[Enrutador.php]"]
  node_auth["Authentication"]
  node_authhelper["Access checks<br/>[AuthHelper.php]"]
end

subgraph group_booking["Customer bookings"]
  node_bookingctl["Appointment handling"]
  node_consentctl["Consent handling"]
  node_paymentsctl["Payment handling"]
  node_bookingservice["Booking logic<br/>[BookingService.php]"]
  node_bookingrequest["Booking validation"]
end

subgraph group_operations["Studio operations"]
  node_dashboardctl["Customer and admin dashboard"]
  node_dashboardservice["Dashboard metrics"]
  node_artistctl["Artist workspace"]
  node_galleryctl["Gallery management"]
  node_promotionctl["Promotions"]
  node_reportsctl["Reports"]
  node_pagesctl["Public pages and contact"]
end

subgraph group_data["Domain data"]
  node_appointments[("Appointment records<br/>[ModeloCitas.php]")]
  node_users[("User records<br/>[ModeloUsuarios.php]")]
  node_services[("Service records")]
  node_artists[("Artist records<br/>[ModeloArtistas.php]")]
  node_payments[("Payment records<br/>[ModeloPagos.php]")]
  node_consents[("Consent records")]
end

subgraph group_presentation["Web presentation"]
  node_mvcbase["Controller rendering"]
  node_pages["MVC page views"]
end

node_visitor(("Customer or staff"))
node_mysql[("MySQL database")]

node_visitor -->|"requests"| node_entrypoint
node_entrypoint -->|"dispatches"| node_router
node_router -->|"routes to"| node_auth
node_router -->|"routes to"| node_bookingctl
node_router -->|"routes to"| node_consentctl
node_router -->|"routes to"| node_paymentsctl
node_router -->|"routes to"| node_dashboardctl
node_router -->|"routes to"| node_artistctl
node_router -->|"routes to"| node_galleryctl
node_router -->|"routes to"| node_promotionctl
node_router -->|"routes to"| node_reportsctl
node_router -->|"routes to"| node_pagesctl
node_dashboardctl -->|"uses metrics"| node_dashboardservice
node_dashboardctl -->|"checks access"| node_authhelper
node_artistctl -->|"checks access"| node_authhelper
node_dashboardservice -->|"queries metrics"| node_appointments
node_dashboardctl -->|"loads appointments"| node_appointments
node_dashboardctl -.->|"manages users"| node_users
node_dashboardctl -.->|"manages services"| node_services
node_bookingctl -.->|"manages bookings"| node_appointments
node_bookingctl -.->|"handles deposits"| node_payments
node_bookingctl -.->|"selects artists"| node_artists
node_bookingctl -.->|"selects services"| node_services
node_consentctl -.->|"stores consent"| node_consents
node_paymentsctl -.->|"manages deposits"| node_payments
node_artistctl -.->|"manages schedule"| node_appointments
node_galleryctl -.->|"uses artists"| node_artists
node_reportsctl -.->|"reports on"| node_appointments
node_bookingrequest -.->|"validates input"| node_bookingctl
node_entrypoint -->|"initializes schema"| node_mysql
node_entrypoint -->|"handles exceptions"| node_pagesctl
node_dashboardctl -->|"renders through"| node_mvcbase
node_pagesctl -.->|"renders through"| node_mvcbase
node_mvcbase -->|"renders views"| node_pages
node_entrypoint -->|"loads configuration"| node_mysql

click node_entrypoint "https://github.com/n3ut4/pablo/blob/main/index.php"
click node_router "https://github.com/n3ut4/pablo/blob/main/core/Enrutador.php"
click node_auth "https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorAutenticacion.php"
click node_authhelper "https://github.com/n3ut4/pablo/blob/main/app/helpers/AuthHelper.php"
click node_bookingctl "https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorCitas.php"
click node_consentctl "https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorConsentimiento.php"
click node_paymentsctl "https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorPagos.php"
click node_bookingservice "https://github.com/n3ut4/pablo/blob/main/app/services/BookingService.php"
click node_bookingrequest "https://github.com/n3ut4/pablo/blob/main/app/Requests/StoreCitaRequest.php"
click node_dashboardctl "https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorDashboard.php"
click node_dashboardservice "https://github.com/n3ut4/pablo/blob/main/app/services/DashboardService.php"
click node_artistctl "https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorTatuador.php"
click node_galleryctl "https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorGaleria.php"
click node_promotionctl "https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorPromociones.php"
click node_reportsctl "https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorReportes.php"
click node_pagesctl "https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorPaginas.php"
click node_appointments "https://github.com/n3ut4/pablo/blob/main/app/models/ModeloCitas.php"
click node_users "https://github.com/n3ut4/pablo/blob/main/app/models/ModeloUsuarios.php"
click node_services "https://github.com/n3ut4/pablo/blob/main/app/models/ModeloServicios.php"
click node_artists "https://github.com/n3ut4/pablo/blob/main/app/models/ModeloArtistas.php"
click node_payments "https://github.com/n3ut4/pablo/blob/main/app/models/ModeloPagos.php"
click node_consents "https://github.com/n3ut4/pablo/blob/main/app/models/ModeloConsentimiento.php"
click node_mvcbase "https://github.com/n3ut4/pablo/blob/main/core/ControladorBase.php"
click node_pages "https://github.com/n3ut4/pablo/tree/main/app/views/pages"

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_entrypoint,node_router,node_auth,node_authhelper toneBlue
class node_bookingctl,node_consentctl,node_paymentsctl,node_bookingservice,node_bookingrequest,node_mysql toneAmber
class node_dashboardctl,node_dashboardservice,node_artistctl,node_galleryctl,node_promotionctl,node_reportsctl,node_pagesctl toneMint
class node_appointments,node_users,node_services,node_artists,node_payments,node_consents toneRose
class node_mvcbase,node_pages,node_visitor toneIndigo
```

## Components

### Request handling

- [PHP entry point](https://github.com/n3ut4/pablo/blob/main/index.php): `index.php`
- [Action router](https://github.com/n3ut4/pablo/blob/main/core/Enrutador.php): `core/Enrutador.php`
- [Authentication](https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorAutenticacion.php): `app/controllers/ControladorAutenticacion.php`
- [Access checks](https://github.com/n3ut4/pablo/blob/main/app/helpers/AuthHelper.php): `app/helpers/AuthHelper.php`

### Customer bookings

- [Appointment handling](https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorCitas.php): `app/controllers/ControladorCitas.php`
- [Consent handling](https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorConsentimiento.php): `app/controllers/ControladorConsentimiento.php`
- [Payment handling](https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorPagos.php): `app/controllers/ControladorPagos.php`
- [Booking logic](https://github.com/n3ut4/pablo/blob/main/app/services/BookingService.php): `app/services/BookingService.php`
- [Booking validation](https://github.com/n3ut4/pablo/blob/main/app/Requests/StoreCitaRequest.php): `app/Requests/StoreCitaRequest.php`

### Studio operations

- [Customer and admin dashboard](https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorDashboard.php): `app/controllers/ControladorDashboard.php`
- [Dashboard metrics](https://github.com/n3ut4/pablo/blob/main/app/services/DashboardService.php): `app/services/DashboardService.php`
- [Artist workspace](https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorTatuador.php): `app/controllers/ControladorTatuador.php`
- [Gallery management](https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorGaleria.php): `app/controllers/ControladorGaleria.php`
- [Promotions](https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorPromociones.php): `app/controllers/ControladorPromociones.php`
- [Reports](https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorReportes.php): `app/controllers/ControladorReportes.php`
- [Public pages and contact](https://github.com/n3ut4/pablo/blob/main/app/controllers/ControladorPaginas.php): `app/controllers/ControladorPaginas.php`

### Domain data

- [Appointment records](https://github.com/n3ut4/pablo/blob/main/app/models/ModeloCitas.php): `app/models/ModeloCitas.php`
- [User records](https://github.com/n3ut4/pablo/blob/main/app/models/ModeloUsuarios.php): `app/models/ModeloUsuarios.php`
- [Service records](https://github.com/n3ut4/pablo/blob/main/app/models/ModeloServicios.php): `app/models/ModeloServicios.php`
- [Artist records](https://github.com/n3ut4/pablo/blob/main/app/models/ModeloArtistas.php): `app/models/ModeloArtistas.php`
- [Payment records](https://github.com/n3ut4/pablo/blob/main/app/models/ModeloPagos.php): `app/models/ModeloPagos.php`
- [Consent records](https://github.com/n3ut4/pablo/blob/main/app/models/ModeloConsentimiento.php): `app/models/ModeloConsentimiento.php`

### Web presentation

- [Controller rendering](https://github.com/n3ut4/pablo/blob/main/core/ControladorBase.php): `core/ControladorBase.php`
- [MVC page views](https://github.com/n3ut4/pablo/tree/main/app/views/pages): `app/views/pages`

### Other components

- **Customer or staff**
- **MySQL database**

## Connections

- Customer or staff → PHP entry point: requests (evidence: `README.md`)
- PHP entry point → Action router: dispatches (evidence: `index.php`)
- Action router → Authentication: routes to (evidence: `core/Enrutador.php`)
- Action router → Appointment handling: routes to (evidence: `core/Enrutador.php`)
- Action router → Consent handling: routes to (evidence: `core/Enrutador.php`)
- Action router → Payment handling: routes to (evidence: `core/Enrutador.php`)
- Action router → Customer and admin dashboard: routes to (evidence: `core/Enrutador.php`)
- Action router → Artist workspace: routes to (evidence: `core/Enrutador.php`)
- Action router → Gallery management: routes to (evidence: `core/Enrutador.php`)
- Action router → Promotions: routes to (evidence: `core/Enrutador.php`)
- Action router → Reports: routes to (evidence: `core/Enrutador.php`)
- Action router → Public pages and contact: routes to (evidence: `core/Enrutador.php`)
- Customer and admin dashboard → Dashboard metrics: uses metrics (evidence: `app/controllers/ControladorDashboard.php`)
- Customer and admin dashboard → Access checks: checks access (evidence: `app/controllers/ControladorDashboard.php`)
- Artist workspace → Access checks: checks access (evidence: `app/helpers/AuthHelper.php`)
- Dashboard metrics → Appointment records: queries metrics (evidence: `app/services/DashboardService.php`)
- Customer and admin dashboard → Appointment records: loads appointments (evidence: `app/controllers/ControladorDashboard.php`)
- Customer and admin dashboard → User records: manages users (evidence: `app/controllers/ControladorDashboard.php`)
- Customer and admin dashboard → Service records: manages services (evidence: `app/controllers/ControladorDashboard.php`)
- Appointment handling → Appointment records: manages bookings (evidence: `app/controllers/ControladorCitas.php`)
- Appointment handling → Payment records: handles deposits (evidence: `app/controllers/ControladorCitas.php`)
- Appointment handling → Artist records: selects artists (evidence: `app/controllers/ControladorCitas.php`)
- Appointment handling → Service records: selects services (evidence: `app/controllers/ControladorCitas.php`)
- Consent handling → Consent records: stores consent (evidence: `app/controllers/ControladorConsentimiento.php`)
- Payment handling → Payment records: manages deposits (evidence: `app/controllers/ControladorPagos.php`)
- Artist workspace → Appointment records: manages schedule (evidence: `app/controllers/ControladorTatuador.php`)
- Gallery management → Artist records: uses artists (evidence: `app/controllers/ControladorGaleria.php`)
- Reports → Appointment records: reports on (evidence: `app/controllers/ControladorReportes.php`)
- Booking validation → Appointment handling: validates input
- PHP entry point → MySQL database: initializes schema (evidence: `index.php`)
- PHP entry point → Public pages and contact: handles exceptions (evidence: `index.php`)
- Customer and admin dashboard → Controller rendering: renders through (evidence: `core/ControladorBase.php`)
- Public pages and contact → Controller rendering: renders through (evidence: `app/controllers/ControladorPaginas.php`)
- Controller rendering → MVC page views: renders views (evidence: `core/ControladorBase.php`)
- PHP entry point → MySQL database: loads configuration (evidence: `index.php`)
