# gilbertojunior874/tcc-estetica architecture

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

## Overview

DetailMap is a server-rendered Laravel marketplace that helps visitors discover approved automotive-detailing businesses, compare services and prices, and initiate contact through WhatsApp. Owners register a business and maintain its listing, hours, and services; administrators review applications and control publication. The application stores business, service, schedule, and account data in PostgreSQL. The graph follows documented routes and sampled controller/model calls; some branches, including hours and authentication, are based on the source index and README rather than inspected controller excerpts.

Main entry points: [`app/Http/Controllers/AutomotiveDetailingController.php`](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/AutomotiveDetailingController.php) (Catalog and contact), [`app/Models/AutomotiveDetailing.php`](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Models/AutomotiveDetailing.php) (Business and status), [`config/database.php`](https://github.com/gilbertojunior874/tcc-estetica/blob/main/config/database.php) (PostgreSQL), [`app/Http/Controllers/Owner/DetailingController.php`](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/Owner/DetailingController.php) (Business listing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public discovery"]
  node_catalog["Catalog and contact"]
  node_catalog_filters["Catalog filters"]
  node_public_pages["Catalog pages<br/>[index.blade.php]"]
  node_browser_features["Location and estimate<br/>[app.js]"]
end

subgraph group_owner["Owner workspace"]
  node_registration["Account registration"]
  node_owner_listing["Business listing"]
  node_owner_services["Service management"]
  node_owner_hours["Hours management"]
end

subgraph group_admin["Admin review"]
  node_admin_review["Application review"]
end

subgraph group_domain["Domain and persistence"]
  node_business_model["Business and status"]
  node_service_model["Service and pricing<br/>[Service.php]"]
  node_hours_model["Business hours<br/>[BusinessHour.php]"]
  node_account_model["User accounts<br/>[User.php]"]
  node_business_validation["Business validation"]
  node_cnpj_rule["CNPJ validation<br/>[Cnpj.php]"]
  node_service_validation["Service validation<br/>[ServiceRequest.php]"]
  node_database[("PostgreSQL<br/>[database.php]")]
end

node_visitor(("Visitor"))
node_owner_actor(("Business owner"))
node_admin_actor(("Administrator"))
node_whatsapp["WhatsApp"]

node_visitor -->|"browses and contacts"| node_catalog
node_catalog -->|"validates filters"| node_catalog_filters
node_catalog -->|"queries listings"| node_business_model
node_catalog -->|"renders pages"| node_public_pages
node_catalog -->|"redirects contact"| node_whatsapp
node_business_model -->|"loads services"| node_service_model
node_business_model -->|"loads hours"| node_hours_model
node_visitor -->|"shares location"| node_browser_features
node_browser_features -->|"submits location"| node_catalog
node_owner_actor -->|"creates account"| node_registration
node_registration -->|"creates user"| node_account_model
node_owner_actor -->|"registers listing"| node_owner_listing
node_owner_listing -->|"validates listing"| node_business_validation
node_business_validation -->|"checks CNPJ"| node_cnpj_rule
node_owner_listing -->|"creates or updates"| node_business_model
node_owner_actor -->|"maintains services"| node_owner_services
node_owner_services -->|"validates input"| node_service_validation
node_owner_services -->|"writes services"| node_service_model
node_owner_actor -->|"maintains hours"| node_owner_hours
node_owner_hours -->|"writes hours"| node_hours_model
node_admin_actor -->|"reviews applications"| node_admin_review
node_admin_review -->|"transitions status"| node_business_model
node_business_model -.->|"persists business data"| node_database
node_service_model -.->|"persists service data"| node_database
node_hours_model -.->|"persists schedules"| node_database
node_account_model -.->|"persists accounts"| node_database

click node_catalog "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/AutomotiveDetailingController.php"
click node_catalog_filters "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Requests/CatalogFilterRequest.php"
click node_public_pages "https://github.com/gilbertojunior874/tcc-estetica/blob/main/resources/views/detailings/index.blade.php"
click node_browser_features "https://github.com/gilbertojunior874/tcc-estetica/blob/main/resources/js/app.js"
click node_registration "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_owner_listing "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/Owner/DetailingController.php"
click node_owner_services "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/Owner/ServiceController.php"
click node_owner_hours "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/Owner/BusinessHoursController.php"
click node_admin_review "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/Admin/DetailingController.php"
click node_business_model "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Models/AutomotiveDetailing.php"
click node_service_model "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Models/Service.php"
click node_hours_model "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Models/BusinessHour.php"
click node_account_model "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Models/User.php"
click node_business_validation "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Requests/DetailingRequest.php"
click node_cnpj_rule "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Rules/Cnpj.php"
click node_service_validation "https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Requests/ServiceRequest.php"
click node_database "https://github.com/gilbertojunior874/tcc-estetica/blob/main/config/database.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_catalog,node_catalog_filters,node_public_pages,node_browser_features toneBlue
class node_registration,node_owner_listing,node_owner_services,node_owner_hours toneAmber
class node_admin_review toneMint
class node_business_model,node_service_model,node_hours_model,node_account_model,node_business_validation,node_cnpj_rule,node_service_validation,node_database toneRose
class node_visitor,node_owner_actor,node_admin_actor,node_whatsapp toneIndigo
```

## Components

### Public discovery

- [Catalog and contact](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/AutomotiveDetailingController.php): `app/Http/Controllers/AutomotiveDetailingController.php`
- [Catalog filters](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Requests/CatalogFilterRequest.php): `app/Http/Requests/CatalogFilterRequest.php`
- [Catalog pages](https://github.com/gilbertojunior874/tcc-estetica/blob/main/resources/views/detailings/index.blade.php): `resources/views/detailings/index.blade.php`
- [Location and estimate](https://github.com/gilbertojunior874/tcc-estetica/blob/main/resources/js/app.js): `resources/js/app.js`

### Owner workspace

- [Account registration](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [Business listing](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/Owner/DetailingController.php): `app/Http/Controllers/Owner/DetailingController.php`
- [Service management](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/Owner/ServiceController.php): `app/Http/Controllers/Owner/ServiceController.php`
- [Hours management](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/Owner/BusinessHoursController.php): `app/Http/Controllers/Owner/BusinessHoursController.php`

### Admin review

- [Application review](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Controllers/Admin/DetailingController.php): `app/Http/Controllers/Admin/DetailingController.php`

### Domain and persistence

- [Business and status](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Models/AutomotiveDetailing.php): `app/Models/AutomotiveDetailing.php`
- [Service and pricing](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Models/Service.php): `app/Models/Service.php`
- [Business hours](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Models/BusinessHour.php): `app/Models/BusinessHour.php`
- [User accounts](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Models/User.php): `app/Models/User.php`
- [Business validation](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Requests/DetailingRequest.php): `app/Http/Requests/DetailingRequest.php`
- [CNPJ validation](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Rules/Cnpj.php): `app/Rules/Cnpj.php`
- [Service validation](https://github.com/gilbertojunior874/tcc-estetica/blob/main/app/Http/Requests/ServiceRequest.php): `app/Http/Requests/ServiceRequest.php`
- [PostgreSQL](https://github.com/gilbertojunior874/tcc-estetica/blob/main/config/database.php): `config/database.php`

### Other components

- **Visitor**
- **Business owner**
- **Administrator**
- **WhatsApp**

## Connections

- Visitor → Catalog and contact: browses and contacts
- Catalog and contact → Catalog filters: validates filters (evidence: `app/Http/Controllers/AutomotiveDetailingController.php`)
- Catalog and contact → Business and status: queries listings (evidence: `app/Http/Controllers/AutomotiveDetailingController.php`)
- Catalog and contact → Catalog pages: renders pages (evidence: `app/Http/Controllers/AutomotiveDetailingController.php`)
- Catalog and contact → WhatsApp: redirects contact (evidence: `app/Http/Controllers/AutomotiveDetailingController.php`)
- Business and status → Service and pricing: loads services (evidence: `app/Models/AutomotiveDetailing.php`)
- Business and status → Business hours: loads hours (evidence: `app/Models/AutomotiveDetailing.php`)
- Visitor → Location and estimate: shares location
- Location and estimate → Catalog and contact: submits location
- Business owner → Account registration: creates account
- Account registration → User accounts: creates user (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Business owner → Business listing: registers listing
- Business listing → Business validation: validates listing (evidence: `app/Http/Controllers/Owner/DetailingController.php`)
- Business validation → CNPJ validation: checks CNPJ (evidence: `app/Http/Requests/DetailingRequest.php`)
- Business listing → Business and status: creates or updates (evidence: `app/Http/Controllers/Owner/DetailingController.php`)
- Business owner → Service management: maintains services
- Service management → Service validation: validates input (evidence: `app/Http/Controllers/Owner/ServiceController.php`)
- Service management → Service and pricing: writes services (evidence: `app/Http/Controllers/Owner/ServiceController.php`)
- Business owner → Hours management: maintains hours
- Hours management → Business hours: writes hours (evidence: `app/Http/Controllers/Owner/BusinessHoursController.php`)
- Administrator → Application review: reviews applications
- Application review → Business and status: transitions status (evidence: `app/Http/Controllers/Admin/DetailingController.php`)
- Business and status → PostgreSQL: persists business data
- Service and pricing → PostgreSQL: persists service data
- Business hours → PostgreSQL: persists schedules
- User accounts → PostgreSQL: persists accounts
