# x-jeff-12/proyecto_final_tpi_iec_sic architecture

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

- Interactive diagram: https://gitdiagram.com/x-jeff-12/proyecto_final_tpi_iec_sic
- Repository: https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic

## Overview

Car Wash Hernández is a Laravel accounting-backed investment decision-support application. Users sign in, maintain operating and investment records, enter accounting evidence and journal entries, then inspect costs, financial statements and investment evaluations; they can also compare alternatives, test sensitivity or replacement, record manual checks and export reports. The graph preserves those documented stages and the accounting, finance and evidence layers behind them. Some controller and view implementations were not sampled, so those capability links rely on the README; unsampled internals are not inferred.

Main entry points: [`routes/web.php`](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/InversionController.php`](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/InversionController.php) (Investment workflows), [`app/Services/ContabilidadService.php`](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Services/ContabilidadService.php) (Accounting and costing), [`app/Http/Controllers/CatalogoController.php`](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/CatalogoController.php) (Operational catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web access"]
  node_routes["Web routes<br/>[web.php]"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_roles["Role authorization<br/>[CheckRole.php]"]
  node_dashboard["Dashboard"]
end

subgraph group_operations["Business records"]
  node_catalog["Operational catalog"]
  node_operations_controller["Service operations"]
  node_company["Company settings"]
  node_operating_models[("Services and sales<br/>[Servicio.php]")]
  node_asset_models[("Assets and maintenance<br/>[Activo.php]")]
end

subgraph group_accounting["Accounting"]
  node_journal["Journal and ledgers"]
  node_accounting_engine["Accounting and costing"]
  node_accounting_models[("Accounts and entries<br/>[Asiento.php]")]
end

subgraph group_investment["Investment analysis"]
  node_investment_controller["Investment workflows"]
  node_finance_engine["Financial calculations"]
  node_alternative_models[("Investment alternatives<br/>[Alternativa.php]")]
  node_verification[("Manual verification")]
end

subgraph group_reporting["Reports and evidence"]
  node_sources["Evidence sources"]
  node_trace_model[("Evidence trace links<br/>[Traza.php]")]
  node_reports["Report export"]
end

node_user(("User"))
node_postgres[("PostgreSQL")]

node_user -->|"uses"| node_routes
node_routes -->|"routes to"| node_auth
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_catalog
node_routes -->|"routes to"| node_operations_controller
node_routes -->|"routes to"| node_company
node_routes -->|"routes to"| node_journal
node_routes -->|"routes to"| node_investment_controller
node_routes -->|"routes to"| node_sources
node_routes -->|"routes to"| node_reports
node_routes -->|"protects writes"| node_roles
node_catalog -->|"reads and writes"| node_operating_models
node_catalog -->|"reads and writes"| node_asset_models
node_catalog -->|"recalculates costs"| node_accounting_engine
node_operations_controller -->|"recalculates costs"| node_accounting_engine
node_company -->|"uses settings"| node_accounting_engine
node_journal -->|"posts entries"| node_accounting_engine
node_journal -->|"reads entries"| node_accounting_models
node_accounting_engine -->|"reads and writes"| node_postgres
node_investment_controller -->|"gets costs and settings"| node_accounting_engine
node_investment_controller -->|"evaluates alternatives"| node_finance_engine
node_investment_controller -->|"loads alternatives"| node_alternative_models
node_investment_controller -->|"loads services"| node_operating_models
node_investment_controller -->|"loads assets"| node_asset_models
node_investment_controller -->|"stores manual checks"| node_verification
node_finance_engine -->|"evaluates data"| node_alternative_models
node_finance_engine -->|"uses maintenance data"| node_asset_models
node_sources -->|"manages links"| node_trace_model
node_sources -->|"logs changes"| node_accounting_engine
node_catalog -->|"maintains evidence links"| node_trace_model
node_reports -->|"uses accounting data"| node_accounting_engine
node_reports -.->|"exports reports"| node_postgres

click node_routes "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/routes/web.php"
click node_auth "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/AuthController.php"
click node_roles "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Middleware/CheckRole.php"
click node_dashboard "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/DashboardController.php"
click node_catalog "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/CatalogoController.php"
click node_operations_controller "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/OperacionController.php"
click node_company "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/EmpresaController.php"
click node_operating_models "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Models/Servicio.php"
click node_asset_models "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Models/Activo.php"
click node_journal "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/ContabilidadController.php"
click node_accounting_engine "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Services/ContabilidadService.php"
click node_accounting_models "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Models/Asiento.php"
click node_investment_controller "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/InversionController.php"
click node_finance_engine "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Services/FinanzasService.php"
click node_alternative_models "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Models/Alternativa.php"
click node_verification "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Models/VerificacionManual.php"
click node_sources "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/FuenteController.php"
click node_trace_model "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Models/Traza.php"
click node_reports "https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/ReporteController.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_routes,node_auth,node_roles,node_dashboard,node_user toneBlue
class node_catalog,node_operations_controller,node_company,node_operating_models,node_asset_models,node_postgres toneAmber
class node_journal,node_accounting_engine,node_accounting_models toneMint
class node_investment_controller,node_finance_engine,node_alternative_models,node_verification toneRose
class node_sources,node_trace_model,node_reports toneIndigo
```

## Components

### Web access

- [Web routes](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/routes/web.php): `routes/web.php`
- [Authentication](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Role authorization](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Middleware/CheckRole.php): `app/Http/Middleware/CheckRole.php`
- [Dashboard](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`

### Business records

- [Operational catalog](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/CatalogoController.php): `app/Http/Controllers/CatalogoController.php`
- [Service operations](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/OperacionController.php): `app/Http/Controllers/OperacionController.php`
- [Company settings](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/EmpresaController.php): `app/Http/Controllers/EmpresaController.php`
- [Services and sales](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Models/Servicio.php): `app/Models/Servicio.php`
- [Assets and maintenance](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Models/Activo.php): `app/Models/Activo.php`

### Accounting

- [Journal and ledgers](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/ContabilidadController.php): `app/Http/Controllers/ContabilidadController.php`
- [Accounting and costing](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Services/ContabilidadService.php): `app/Services/ContabilidadService.php`
- [Accounts and entries](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Models/Asiento.php): `app/Models/Asiento.php`

### Investment analysis

- [Investment workflows](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/InversionController.php): `app/Http/Controllers/InversionController.php`
- [Financial calculations](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Services/FinanzasService.php): `app/Services/FinanzasService.php`
- [Investment alternatives](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Models/Alternativa.php): `app/Models/Alternativa.php`
- [Manual verification](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Models/VerificacionManual.php): `app/Models/VerificacionManual.php`

### Reports and evidence

- [Evidence sources](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/FuenteController.php): `app/Http/Controllers/FuenteController.php`
- [Evidence trace links](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Models/Traza.php): `app/Models/Traza.php`
- [Report export](https://github.com/x-jeff-12/proyecto_final_tpi_iec_sic/blob/main/app/Http/Controllers/ReporteController.php): `app/Http/Controllers/ReporteController.php`

### Other components

- **User**
- **PostgreSQL**

## Connections

- User → Web routes: uses (evidence: `README.md`)
- Web routes → Authentication: routes to (evidence: `routes/web.php`)
- Web routes → Dashboard: routes to (evidence: `routes/web.php`)
- Web routes → Operational catalog: routes to (evidence: `routes/web.php`)
- Web routes → Service operations: routes to (evidence: `routes/web.php`)
- Web routes → Company settings: routes to (evidence: `routes/web.php`)
- Web routes → Journal and ledgers: routes to (evidence: `routes/web.php`)
- Web routes → Investment workflows: routes to (evidence: `routes/web.php`)
- Web routes → Evidence sources: routes to (evidence: `routes/web.php`)
- Web routes → Report export: routes to (evidence: `routes/web.php`)
- Web routes → Role authorization: protects writes (evidence: `README.md`)
- Operational catalog → Services and sales: reads and writes (evidence: `app/Http/Controllers/CatalogoController.php`)
- Operational catalog → Assets and maintenance: reads and writes (evidence: `app/Http/Controllers/CatalogoController.php`)
- Operational catalog → Accounting and costing: recalculates costs (evidence: `app/Http/Controllers/CatalogoController.php`)
- Service operations → Accounting and costing: recalculates costs (evidence: `app/Http/Controllers/OperacionController.php`)
- Company settings → Accounting and costing: uses settings (evidence: `app/Http/Controllers/EmpresaController.php`)
- Journal and ledgers → Accounting and costing: posts entries (evidence: `app/Http/Controllers/ContabilidadController.php`)
- Journal and ledgers → Accounts and entries: reads entries (evidence: `app/Http/Controllers/ContabilidadController.php`)
- Accounting and costing → PostgreSQL: reads and writes (evidence: `app/Services/ContabilidadService.php`)
- Investment workflows → Accounting and costing: gets costs and settings (evidence: `app/Http/Controllers/InversionController.php`)
- Investment workflows → Financial calculations: evaluates alternatives (evidence: `app/Http/Controllers/InversionController.php`)
- Investment workflows → Investment alternatives: loads alternatives (evidence: `app/Http/Controllers/InversionController.php`)
- Investment workflows → Services and sales: loads services (evidence: `app/Http/Controllers/InversionController.php`)
- Investment workflows → Assets and maintenance: loads assets (evidence: `app/Http/Controllers/InversionController.php`)
- Investment workflows → Manual verification: stores manual checks (evidence: `app/Http/Controllers/InversionController.php`)
- Financial calculations → Investment alternatives: evaluates data (evidence: `app/Services/FinanzasService.php`)
- Financial calculations → Assets and maintenance: uses maintenance data (evidence: `app/Services/FinanzasService.php`)
- Evidence sources → Evidence trace links: manages links (evidence: `app/Http/Controllers/FuenteController.php`)
- Evidence sources → Accounting and costing: logs changes (evidence: `app/Http/Controllers/FuenteController.php`)
- Operational catalog → Evidence trace links: maintains evidence links (evidence: `app/Http/Controllers/CatalogoController.php`)
- Report export → Accounting and costing: uses accounting data (evidence: `app/Http/Controllers/ReporteController.php`)
- Report export → PostgreSQL: exports reports (evidence: `README.md`)
