# iborra0306/gestion-obras-laravel architecture

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

- Interactive diagram: https://gitdiagram.com/iborra0306/gestion-obras-laravel
- Repository: https://github.com/iborra0306/gestion-obras-laravel

## Overview

This is a Laravel learning project intended to migrate a deployed Odoo ERP into Laravel. The visible workflow includes authenticated CRUD for business records; the model and seeder inventory indicates broader construction-management domains, including works, budgets, workforce, subcontractors, and work reports. Authentication and client CRUD are directly evidenced in the excerpts; several other domain components are identified by the source index and tree, but their runtime wiring was not sampled, so those links are omitted.

Main entry points: [`app/Models/Concerns/TieneCodigo.php`](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Concerns/TieneCodigo.php) (Code generation), [`app/Models/Cliente.php`](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Cliente.php) (Clients), [`app/Http/Controllers/ClientesController.php`](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/ClientesController.php) (Client CRUD), [`routes/auth.php`](https://github.com/iborra0306/gestion-obras-laravel/blob/main/routes/auth.php) (Auth routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry and access"]
  node_client_routes["Client routes<br/>[clientes.php]"]
  node_client_controller["Client CRUD"]
  node_client_validation["Client validation<br/>[ClienteRequest.php]"]
  node_auth_routes["Auth routes<br/>[auth.php]"]
  node_sessions["Login sessions"]
  node_registration["Registration"]
  node_login_request["Login validation<br/>[LoginRequest.php]"]
end

subgraph group_records["Business records"]
  node_client["Clients<br/>[Cliente.php]"]
  node_specialist_controller["Specialist CRUD"]
  node_specialist_request["Specialist validation"]
  node_specialist["Specialists<br/>[Especialista.php]"]
  node_provider_controller["Provider CRUD"]
  node_provider_request["Provider validation"]
  node_provider["Providers<br/>[Proveedor.php]"]
  node_worker_controller["Worker CRUD"]
  node_worker["Workers<br/>[Trabajador.php]"]
end

subgraph group_execution["Work execution"]
  node_works_controller["Works handling"]
  node_works_request["Work validation<br/>[ObraRequest.php]"]
  node_work["Works<br/>[Obra.php]"]
  node_budget["Budgets<br/>[Presupuesto.php]"]
  node_budget_line["Budget lines"]
  node_work_reports["Work reports<br/>[ParteTrabajo.php]"]
  node_report_lines["Report lines"]
  node_specialist_report["Specialist reports"]
  node_provider_report["Provider reports<br/>[ParteProveedor.php]"]
  node_absences["Absences<br/>[Falta.php]"]
  node_income["Income<br/>[Ingreso.php]"]
  node_expenses["Expenses<br/>[Gasto.php]"]
  node_incidents["Incidents<br/>[Incidencia.php]"]
  node_observations["Observations<br/>[Observacion.php]"]
  node_files["Attachments<br/>[Archivo.php]"]
end

subgraph group_foundation["Domain foundation"]
  node_code_trait["Code generation<br/>[TieneCodigo.php]"]
  node_sequence["Sequences<br/>[Secuencia.php]"]
end

node_user(("ERP user"))

node_user -->|"requests CRUD"| node_client_routes
node_client_routes -->|"routes to"| node_client_controller
node_client_controller -->|"validates with"| node_client_validation
node_client_controller -->|"uses model"| node_client
node_user -->|"requests access"| node_auth_routes
node_auth_routes -->|"routes login"| node_sessions
node_sessions -->|"authenticates with"| node_login_request
node_auth_routes -->|"routes signup"| node_registration
node_registration -.-> node_client
node_registration -.-> node_sequence
node_specialist_controller -->|"validates with"| node_specialist_request
node_specialist_controller -->|"uses model"| node_specialist
node_provider_controller -->|"validates with"| node_provider_request
node_provider_controller -->|"uses model"| node_provider
node_works_controller -->|"validates with"| node_works_request
node_works_controller -->|"looks up client"| node_client
node_client -->|"uses trait"| node_code_trait
node_specialist -->|"uses trait"| node_code_trait
node_provider -->|"uses trait"| node_code_trait
node_work -->|"uses trait"| node_code_trait
node_code_trait -->|"requests next code"| node_sequence

click node_client_routes "https://github.com/iborra0306/gestion-obras-laravel/blob/main/routes/clientes.php"
click node_client_controller "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/ClientesController.php"
click node_client_validation "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Requests/ClienteRequest.php"
click node_auth_routes "https://github.com/iborra0306/gestion-obras-laravel/blob/main/routes/auth.php"
click node_sessions "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_registration "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_login_request "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Requests/Auth/LoginRequest.php"
click node_client "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Cliente.php"
click node_specialist_controller "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/EspecialistasController.php"
click node_specialist_request "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Requests/EspecialistaRequest.php"
click node_specialist "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Especialista.php"
click node_provider_controller "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/ProveedoresController.php"
click node_provider_request "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Requests/ProveedorRequest.php"
click node_provider "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Proveedor.php"
click node_worker_controller "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/TrabajadoresController.php"
click node_worker "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Trabajador.php"
click node_works_controller "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/ObrasController.php"
click node_works_request "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Requests/ObraRequest.php"
click node_work "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Obra.php"
click node_budget "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Presupuesto.php"
click node_budget_line "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/LineaPresupuesto.php"
click node_work_reports "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/ParteTrabajo.php"
click node_report_lines "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/LineaParteTrabajo.php"
click node_specialist_report "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/ParteEspecialista.php"
click node_provider_report "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/ParteProveedor.php"
click node_absences "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Falta.php"
click node_income "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Ingreso.php"
click node_expenses "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Gasto.php"
click node_incidents "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Incidencia.php"
click node_observations "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Observacion.php"
click node_files "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Archivo.php"
click node_code_trait "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Concerns/TieneCodigo.php"
click node_sequence "https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Secuencia.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_client_routes,node_client_controller,node_client_validation,node_auth_routes,node_sessions,node_registration,node_login_request,node_user toneBlue
class node_client,node_specialist_controller,node_specialist_request,node_specialist,node_provider_controller,node_provider_request,node_provider,node_worker_controller,node_worker toneAmber
class node_works_controller,node_works_request,node_work,node_budget,node_budget_line,node_work_reports,node_report_lines,node_specialist_report,node_provider_report,node_absences,node_income,node_expenses,node_incidents,node_observations,node_files toneMint
class node_code_trait,node_sequence toneRose
```

## Components

### Web entry and access

- [Client routes](https://github.com/iborra0306/gestion-obras-laravel/blob/main/routes/clientes.php): `routes/clientes.php`
- [Client CRUD](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/ClientesController.php): `app/Http/Controllers/ClientesController.php`
- [Client validation](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Requests/ClienteRequest.php): `app/Http/Requests/ClienteRequest.php`
- [Auth routes](https://github.com/iborra0306/gestion-obras-laravel/blob/main/routes/auth.php): `routes/auth.php`
- [Login sessions](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Registration](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [Login validation](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Requests/Auth/LoginRequest.php): `app/Http/Requests/Auth/LoginRequest.php`

### Business records

- [Clients](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Cliente.php): `app/Models/Cliente.php`
- [Specialist CRUD](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/EspecialistasController.php): `app/Http/Controllers/EspecialistasController.php`
- [Specialist validation](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Requests/EspecialistaRequest.php): `app/Http/Requests/EspecialistaRequest.php`
- [Specialists](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Especialista.php): `app/Models/Especialista.php`
- [Provider CRUD](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/ProveedoresController.php): `app/Http/Controllers/ProveedoresController.php`
- [Provider validation](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Requests/ProveedorRequest.php): `app/Http/Requests/ProveedorRequest.php`
- [Providers](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Proveedor.php): `app/Models/Proveedor.php`
- [Worker CRUD](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/TrabajadoresController.php): `app/Http/Controllers/TrabajadoresController.php`
- [Workers](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Trabajador.php): `app/Models/Trabajador.php`

### Work execution

- [Works handling](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Controllers/ObrasController.php): `app/Http/Controllers/ObrasController.php`
- [Work validation](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Http/Requests/ObraRequest.php): `app/Http/Requests/ObraRequest.php`
- [Works](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Obra.php): `app/Models/Obra.php`
- [Budgets](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Presupuesto.php): `app/Models/Presupuesto.php`
- [Budget lines](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/LineaPresupuesto.php): `app/Models/LineaPresupuesto.php`
- [Work reports](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/ParteTrabajo.php): `app/Models/ParteTrabajo.php`
- [Report lines](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/LineaParteTrabajo.php): `app/Models/LineaParteTrabajo.php`
- [Specialist reports](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/ParteEspecialista.php): `app/Models/ParteEspecialista.php`
- [Provider reports](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/ParteProveedor.php): `app/Models/ParteProveedor.php`
- [Absences](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Falta.php): `app/Models/Falta.php`
- [Income](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Ingreso.php): `app/Models/Ingreso.php`
- [Expenses](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Gasto.php): `app/Models/Gasto.php`
- [Incidents](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Incidencia.php): `app/Models/Incidencia.php`
- [Observations](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Observacion.php): `app/Models/Observacion.php`
- [Attachments](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Archivo.php): `app/Models/Archivo.php`

### Domain foundation

- [Code generation](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Concerns/TieneCodigo.php): `app/Models/Concerns/TieneCodigo.php`
- [Sequences](https://github.com/iborra0306/gestion-obras-laravel/blob/main/app/Models/Secuencia.php): `app/Models/Secuencia.php`

### Other components

- **ERP user**

## Connections

- ERP user → Client routes: requests CRUD (evidence: `routes/clientes.php`)
- Client routes → Client CRUD: routes to (evidence: `routes/clientes.php`)
- Client CRUD → Client validation: validates with (evidence: `app/Http/Controllers/ClientesController.php`)
- Client CRUD → Clients: uses model (evidence: `app/Http/Controllers/ClientesController.php`)
- ERP user → Auth routes: requests access (evidence: `routes/auth.php`)
- Auth routes → Login sessions: routes login (evidence: `routes/auth.php`)
- Login sessions → Login validation: authenticates with (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Auth routes → Registration: routes signup (evidence: `routes/auth.php`)
- Registration → Clients
- Registration → Sequences
- Specialist CRUD → Specialist validation: validates with (evidence: `app/Http/Controllers/EspecialistasController.php`)
- Specialist CRUD → Specialists: uses model (evidence: `app/Http/Controllers/EspecialistasController.php`)
- Provider CRUD → Provider validation: validates with (evidence: `app/Http/Controllers/ProveedoresController.php`)
- Provider CRUD → Providers: uses model (evidence: `app/Http/Controllers/ProveedoresController.php`)
- Works handling → Work validation: validates with (evidence: `app/Http/Controllers/ObrasController.php`)
- Works handling → Clients: looks up client (evidence: `app/Http/Controllers/ObrasController.php`)
- Clients → Code generation: uses trait (evidence: `app/Models/Cliente.php`)
- Specialists → Code generation: uses trait (evidence: `app/Models/Especialista.php`)
- Providers → Code generation: uses trait (evidence: `app/Models/Proveedor.php`)
- Works → Code generation: uses trait (evidence: `app/Models/Obra.php`)
- Code generation → Sequences: requests next code (evidence: `app/Models/Concerns/TieneCodigo.php`)
