# jorgemr1302/prestamos architecture

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

- Interactive diagram: https://gitdiagram.com/jorgemr1302/prestamos
- Repository: https://github.com/jorgemr1302/prestamos

## Overview

This Laravel application supports a small customer and loan-management workflow: web requests reach customer/loan handlers, which query or update records and render customer, loan, and payment-detail screens. The same handler also manages staff profiles. Laravel authentication controllers and their views are present, alongside the standard request bootstrap and middleware. Source evidence shows the customer/loan database operations and route wiring, but not the full authentication routing or database schema; those connections are therefore not inferred.

Main entry points: [`app/Http/Controllers/UsuarioController.php`](https://github.com/jorgemr1302/prestamos/blob/main/app/Http/Controllers/UsuarioController.php) (Customer and loan handler), [`public/index.php`](https://github.com/jorgemr1302/prestamos/blob/main/public/index.php) (HTTP entry), [`routes/web.php`](https://github.com/jorgemr1302/prestamos/blob/main/routes/web.php) (Web routes), [`bootstrap/app.php`](https://github.com/jorgemr1302/prestamos/blob/main/bootstrap/app.php) (App bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_http["Web request handling"]
  node_entry["HTTP entry<br/>[index.php]"]
  node_bootstrap["App bootstrap<br/>[app.php]"]
  node_kernel["HTTP kernel<br/>[Kernel.php]"]
  node_router["Route setup"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_home["Home handler<br/>[HomeController.php]"]
end

subgraph group_lending["Customer and lending"]
  node_usuario["Customer and loan handler"]
  node_records[("Application records")]
end

subgraph group_identity["User identity"]
  node_user_model["User model<br/>[User.php]"]
  node_login["Login handler"]
  node_register["Registration handler"]
  node_verify["Email verification"]
end

subgraph group_client["Rendered interface"]
  node_auth_views["Authentication screens"]
  node_home_view["Home screen<br/>[home.blade.php]"]
  node_customers_view["Customer screen<br/>[clientes.blade.php]"]
  node_loans_view["Loan screen"]
  node_details_view["Payment details<br/>[detalles.blade.php]"]
  node_profile_view["Profile screen<br/>[perfil.blade.php]"]
end

node_visitor(("Web user"))

node_visitor -->|"sends request"| node_entry
node_entry -->|"loads app"| node_bootstrap
node_entry -->|"dispatches request"| node_kernel
node_bootstrap -->|"binds kernel"| node_kernel
node_router -->|"loads routes"| node_web_routes
node_web_routes -->|"routes to"| node_home
node_web_routes -->|"routes to"| node_usuario
node_home -->|"renders"| node_home_view
node_usuario -->|"reads and writes"| node_records
node_usuario -->|"renders"| node_customers_view
node_usuario -->|"renders"| node_loans_view
node_usuario -->|"renders"| node_details_view
node_usuario -->|"renders"| node_profile_view
node_register -->|"creates user"| node_user_model

click node_entry "https://github.com/jorgemr1302/prestamos/blob/main/public/index.php"
click node_bootstrap "https://github.com/jorgemr1302/prestamos/blob/main/bootstrap/app.php"
click node_kernel "https://github.com/jorgemr1302/prestamos/blob/main/app/Http/Kernel.php"
click node_router "https://github.com/jorgemr1302/prestamos/blob/main/app/Providers/RouteServiceProvider.php"
click node_web_routes "https://github.com/jorgemr1302/prestamos/blob/main/routes/web.php"
click node_home "https://github.com/jorgemr1302/prestamos/blob/main/app/Http/Controllers/HomeController.php"
click node_usuario "https://github.com/jorgemr1302/prestamos/blob/main/app/Http/Controllers/UsuarioController.php"
click node_user_model "https://github.com/jorgemr1302/prestamos/blob/main/app/Models/User.php"
click node_login "https://github.com/jorgemr1302/prestamos/blob/main/app/Http/Controllers/Auth/LoginController.php"
click node_register "https://github.com/jorgemr1302/prestamos/blob/main/app/Http/Controllers/Auth/RegisterController.php"
click node_verify "https://github.com/jorgemr1302/prestamos/blob/main/app/Http/Controllers/Auth/VerificationController.php"
click node_auth_views "https://github.com/jorgemr1302/prestamos/tree/main/resources/views/auth"
click node_home_view "https://github.com/jorgemr1302/prestamos/blob/main/resources/views/home.blade.php"
click node_customers_view "https://github.com/jorgemr1302/prestamos/blob/main/resources/views/clientes.blade.php"
click node_loans_view "https://github.com/jorgemr1302/prestamos/blob/main/resources/views/prestamos.blade.php"
click node_details_view "https://github.com/jorgemr1302/prestamos/blob/main/resources/views/detalles.blade.php"
click node_profile_view "https://github.com/jorgemr1302/prestamos/blob/main/resources/views/perfil.blade.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_entry,node_bootstrap,node_kernel,node_router,node_web_routes,node_home,node_visitor toneBlue
class node_usuario,node_records toneAmber
class node_user_model,node_login,node_register,node_verify toneMint
class node_auth_views,node_home_view,node_customers_view,node_loans_view,node_details_view,node_profile_view toneRose
```

## Components

### Web request handling

- [HTTP entry](https://github.com/jorgemr1302/prestamos/blob/main/public/index.php): `public/index.php`
- [App bootstrap](https://github.com/jorgemr1302/prestamos/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [HTTP kernel](https://github.com/jorgemr1302/prestamos/blob/main/app/Http/Kernel.php): `app/Http/Kernel.php`
- [Route setup](https://github.com/jorgemr1302/prestamos/blob/main/app/Providers/RouteServiceProvider.php): `app/Providers/RouteServiceProvider.php`
- [Web routes](https://github.com/jorgemr1302/prestamos/blob/main/routes/web.php): `routes/web.php`
- [Home handler](https://github.com/jorgemr1302/prestamos/blob/main/app/Http/Controllers/HomeController.php): `app/Http/Controllers/HomeController.php`

### Customer and lending

- [Customer and loan handler](https://github.com/jorgemr1302/prestamos/blob/main/app/Http/Controllers/UsuarioController.php): `app/Http/Controllers/UsuarioController.php`
- **Application records**

### User identity

- [User model](https://github.com/jorgemr1302/prestamos/blob/main/app/Models/User.php): `app/Models/User.php`
- [Login handler](https://github.com/jorgemr1302/prestamos/blob/main/app/Http/Controllers/Auth/LoginController.php): `app/Http/Controllers/Auth/LoginController.php`
- [Registration handler](https://github.com/jorgemr1302/prestamos/blob/main/app/Http/Controllers/Auth/RegisterController.php): `app/Http/Controllers/Auth/RegisterController.php`
- [Email verification](https://github.com/jorgemr1302/prestamos/blob/main/app/Http/Controllers/Auth/VerificationController.php): `app/Http/Controllers/Auth/VerificationController.php`

### Rendered interface

- [Authentication screens](https://github.com/jorgemr1302/prestamos/tree/main/resources/views/auth): `resources/views/auth`
- [Home screen](https://github.com/jorgemr1302/prestamos/blob/main/resources/views/home.blade.php): `resources/views/home.blade.php`
- [Customer screen](https://github.com/jorgemr1302/prestamos/blob/main/resources/views/clientes.blade.php): `resources/views/clientes.blade.php`
- [Loan screen](https://github.com/jorgemr1302/prestamos/blob/main/resources/views/prestamos.blade.php): `resources/views/prestamos.blade.php`
- [Payment details](https://github.com/jorgemr1302/prestamos/blob/main/resources/views/detalles.blade.php): `resources/views/detalles.blade.php`
- [Profile screen](https://github.com/jorgemr1302/prestamos/blob/main/resources/views/perfil.blade.php): `resources/views/perfil.blade.php`

### Other components

- **Web user**

## Connections

- Web user → HTTP entry: sends request (evidence: `public/index.php`)
- HTTP entry → App bootstrap: loads app (evidence: `public/index.php`)
- HTTP entry → HTTP kernel: dispatches request (evidence: `public/index.php`)
- App bootstrap → HTTP kernel: binds kernel (evidence: `bootstrap/app.php`)
- Route setup → Web routes: loads routes (evidence: `app/Providers/RouteServiceProvider.php`)
- Web routes → Home handler: routes to (evidence: `routes/web.php`)
- Web routes → Customer and loan handler: routes to (evidence: `routes/web.php`)
- Home handler → Home screen: renders (evidence: `app/Http/Controllers/HomeController.php`)
- Customer and loan handler → Application records: reads and writes (evidence: `app/Http/Controllers/UsuarioController.php`)
- Customer and loan handler → Customer screen: renders (evidence: `app/Http/Controllers/UsuarioController.php`)
- Customer and loan handler → Loan screen: renders (evidence: `app/Http/Controllers/UsuarioController.php`)
- Customer and loan handler → Payment details: renders (evidence: `app/Http/Controllers/UsuarioController.php`)
- Customer and loan handler → Profile screen: renders (evidence: `app/Http/Controllers/UsuarioController.php`)
- Registration handler → User model: creates user (evidence: `app/Http/Controllers/Auth/RegisterController.php`)
