Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/alber1802/AvaluoVehicular/llms.txt

Use this file to discover all available pages before exploring further.

All routes in Avalúo Vehicular are web routes — there is no separate REST API. Every route returns an Inertia.js response that renders a React component on the client, sharing Laravel session state seamlessly. With the exception of the public appraisal viewer and the authentication routes, every route is protected by the auth and verified middleware, ensuring only authenticated and email-verified users can access the application. Routes are defined in routes/web.php and routes/auth.php.
Run php artisan route:list (or php artisan route:list --path=registro to scope by prefix) to see every registered route, its middleware stack, and its named alias at a glance.

Dashboard

The root entry point for authenticated users, rendered by DashboardController@index.
MethodPathControllerRoute NameDescription
GET/dashboardDashboardController@indexdashboardKPI summary, vehicle list with progress, admin/evaluator-scoped view

Registro (Appraisal Creation)

All routes under the /registro prefix handle the multi-step appraisal workflow: creating a vehicle record, choosing an evaluation method, filling in mechanical and visual-inspection data, uploading photos, and viewing the final result. Every route in this group requires auth and verified middleware.
MethodPathControllerRoute NameDescription
GET/registro/crearCreateRegistroController@indexregistro.indexShow the new vehicle form (loads all brands for select)
POST/registro/avaluoCreateRegistroController@storeregistro.storePersist a new vehicle and its general condition, redirect to method selector
GET/registro/seleccionar/{id}CreateRegistroController@seleccionarregistro.seleccionarMethod-selection screen (mechanical vs inspection) for a vehicle
POST/registro/evaluacion/mecanica/store/{id}MecanicaController@storeevaluacion.mecanica.storeBulk-insert mechanical system evaluation records
GET/registro/evaluacion/mecanica/{id}MecanicaController@indexevaluacion.mecanicaShow the mechanical evaluation form for a vehicle
GET/registro/evaluacion/mecanica/edit/{id}MecanicaController@editevaluacion.mecanica.editShow prefilled edit form for a completed mechanical evaluation
POST/registro/evaluacion/mecanica/update/{id}MecanicaController@updateevaluacion.mecanica.updateUpdate existing mechanical system records (updateOrCreate)
GET/registro/evaluacion/inspeccion/{id}InspeccionController@indexevaluacion.inspeccionShow the visual fault inspection form
POST/registro/evaluacion/inspeccion/store/{id}InspeccionController@storeevaluacion.inspeccion.storeBulk-insert visual inspection records
GET/registro/evaluacion/inspeccion/edit/{id}InspeccionController@editevaluacion.inspeccion.editShow prefilled edit form for a completed inspection
POST/registro/evaluacion/inspeccion/update/{id}InspeccionController@updateevaluacion.inspeccion.updateUpdate existing inspection records (updateOrCreate)
GET/registro/imagenes/vehiculo/{id}ImagenesController@indeximagenes.vehiculoShow the vehicle image upload form
POST/registro/imagenes/vehiculo/store/{id}ImagenesController@storeimagenes.vehiculo.storeUpload and persist vehicle images to storage/app/public/vehiculos
GET/registro/imagenes/vehiculo/edit/{id}ImagenesController@editimagenes.vehiculo.editShow image management screen (replace/delete individual photos)
POST/registro/imagenes/vehiculo/update/{id}ImagenesController@updateimagenes.vehiculo.updateSync image set: delete removed files, insert new uploads
GET/registro/resultado/avaluo/{id}AvaluoController@indexresultados.avaluoCalculate depreciation factors and render the final appraisal result
GET/registro/resultados/avaluo/edit/{id}CreateRegistroController@seleccionarEditarresultados.avaluo.seleccionarEditarEdit-mode method selector (requires continuar policy)
GET/registro/avaluo/editDatosVehiculo/{id}CreateRegistroController@editavaluo.editDatosVehiculoLoad vehicle edit form with existing data and brands
POST/registro/avaluo/editDatosVehiculo/update/{id}CreateRegistroController@updateavaluo.editDatosVehiculo.updateApply updates to vehicle and general condition records
GET/registro/resultados/avaluo/continuar/{id}CreateRegistroController@showresultados.avaluo.continuarSmart redirect: determines next incomplete step in the workflow
GET/registro/continuar/avaluo/{id}ContinuarController@continuarcontinuar.avaluoResume an in-progress appraisal from the dashboard

Archivos (PDF Generation)

Generates and stores a PDF report for a completed appraisal using mccarlosen/laravel-mpdf. The generated file is saved to storage/app/public/pdfReportes/ and the path is persisted in the archivos table.
MethodPathControllerRoute NameDescription
GET/archivos/generarPdf/{id}ArchivoControler@generarPdfarchivos.generarPdfGenerate (or regenerate) the PDF appraisal report for vehicle {id}

Usuarios

User management is restricted to administrators. UserRegistroController delegates role assignment to the Spatie Permission package via syncRoles().
MethodPathControllerRoute NameDescription
GET/usuarios/listadoUserRegistroController@indexusuarios.listadoList all users with their Spatie roles
POST/usuarios/crearUserRegistroController@storeusuarios.storeCreate a new user and assign an initial role
POST/usuarios/actualizar/{id}UserRegistroController@updateusuarios.updateUpdate name, email, and phone
POST/usuarios/cambiar-password/{id}UserRegistroController@changePasswordusuarios.changePasswordReset a user’s password (admin only)
POST/usuarios/cambiar-rol/{id}UserRegistroController@changeRoleusuarios.changeRoleSwap a user’s Spatie role (cannot self-modify)
POST/usuarios/suspend/{id}UserRegistroController@changeSuspensionusuarios.suspendToggle a user’s is_suspended flag
DELETE/usuarios/eliminar/{id}UserRegistroController@destroyusuarios.destroySoft-delete a user (admins cannot be deleted)

Reciclaje (Recycle Bin)

Manages soft-deleted vehicles. The restore and forceDelete routes use ->withTrashed() so that Laravel’s model scoping allows accessing trashed records.
MethodPathControllerRoute NameDescription
GET/reciclaje/listadoResourceReciclajeController@indexreciclaje.indexList all soft-deleted vehicles for the current user (or all if admin)
GET/reciclaje/restore/{id}ResourceReciclajeController@restorereciclaje.restoreRestore a vehicle and all its related records
DELETE/reciclaje/forceDelete/{id}ResourceReciclajeController@forceDeletereciclaje.forceDeletePermanently delete a vehicle and its files (admin only)
DELETE/reciclaje/destroy/{id}ResourceReciclajeController@destroyreciclaje.destroyMove all vehicle relations to trash and soft-delete the vehicle

Depreciacion

Manages the MarcaVehiculo catalog that drives depreciation calculations. Each brand stores a tasa_k (annual depreciation rate) and a valor_residual (minimum floor value).
MethodPathControllerRoute NameDescription
GET/depreciacion/consultarMarcasController@indexdepreciacion.consultarList all brands ordered by name
POST/depreciacion/crearMarcasController@storedepreciacion.storeCreate a new brand with depreciation rates
POST/depreciacion/actualizar/{id}MarcasController@updatedepreciacion.updateUpdate rates for an existing brand
DELETE/depreciacion/eliminar/{id}MarcasController@destroydepreciacion.destroyDelete a brand record

Avaluo Compartido (Sharing)

Handles sharing appraisals with other users. When motivo is "acceso publico", a random 40-character token is generated and stored, enabling the unauthenticated public view route below.
MethodPathControllerRoute NameDescription
GET/avaluo/shareShareController@indexavaluo.share.indexList appraisals shared by me and shared with me
POST/avaluo/share/{id}ShareController@storeavaluo.share.storeShare an appraisal with one or more users; generates token if public
POST/avaluo/share/update/{id}ShareController@updateavaluo.share.updateUpdate sharing dates, status, or motivo (requires update_avaluocompartido permission)
POST/avaluo/share/renovar/{id}ShareController@renovaravaluo.share.renovarRenew an expired share link with a new fecha_fin
DELETE/avaluo/share/destroy/{id}ShareController@destroyavaluo.share.destroyRevoke a shared appraisal entry (requires delete_avaluocompartido permission)

Roles & Permisos

Full Spatie Permission management for roles and permissions. All routes are admin-only, enforced inside the controller via hasRole('admin') checks.
MethodPathControllerRoute NameDescription
GET/roles/listadoRolesController@indexroles.indexList all roles with their permissions (paginated)
POST/roles/crearRolesController@storeroles.storeCreate a new role and assign permissions
POST/roles/actualizar/{id}RolesController@updateroles.updateRename a role and sync its permissions
POST/roles/asignarPermisosRolesController@asignarPermisosroles.asignarPermisosBulk-assign a permission set to an existing role
POST/roles/crearPermisoRolesController@storePermissionroles.storePermissionCreate a new named permission
POST/roles/actualizarPermiso/{id}RolesController@updatePermissionroles.updatePermissionRename an existing permission
DELETE/roles/eliminar/{id}RolesController@destroyRoleroles.destroyDelete a role (the admin role cannot be deleted)
DELETE/roles/eliminarPermiso/{id}RolesController@destroyPermissionroles.destroyPermissionDelete a permission

Secciones

Manages the inspection catalog — the SeccionFalla (visual faults) and SeccionTecnica (mechanical systems) master data that drives evaluation forms. Also handles accessory catalog entries.
MethodPathControllerRoute NameDescription
GET/secciones/listadoInspecionesController@indexsecciones.indexList all sections, faults, technical items, and accessories
POST/secciones/actualizar/{id}InspecionesController@updateFallasecciones.updateUpdate a visual fault entry
POST/secciones/actualizarTecnica/{id}InspecionesController@updateTecnicasecciones.updateTecnicaUpdate a technical system entry
POST/secciones/actualizarAccesorio/{id}InspecionesController@updateAccesoriosecciones.updateAccesorioUpdate an accessory catalog entry
POST/secciones/crearAccesorioInspecionesController@createAccesoriosecciones.createAccesorioCreate a new accessory catalog entry
DELETE/secciones/eliminarAccesorio/{id}InspecionesController@deleteAccesoriosecciones.deleteAccesorioRemove an accessory catalog entry

Accesorios

Manages per-vehicle accessory checklists associated with each appraisal record.
MethodPathControllerRoute NameDescription
GET/accesorios/listado/{id}AccesorioController@indexaccesorios.indexList all accessories for vehicle {id}
POST/accesorios/crear/{id}AccesorioController@storeaccesorios.storeAdd an accessory record to a vehicle
GET/accesorios/edit/{id}AccesorioController@editaccesorios.editLoad the accessory edit form
POST/accesorios/actualizar/{id}AccesorioController@updateaccesorios.updateUpdate an existing accessory record

Ruta Pública (No Auth)

This is the only route outside of authentication middleware. It allows external stakeholders to view a completed appraisal via a secure, time-limited token without creating an account.
MethodPathControllerRoute NameDescription
GET/avaluo/publico/{token}AvaluoPublicoController@verPublicoavaluo.publicoRender a full appraisal result for public viewers using a share token
This is the only unauthenticated application route (outside of routes/auth.php). The token is a random 40-character string generated by ShareController@store when motivo is set to "acceso publico". The controller validates that the link is activo or renovado and that fecha_fin has not passed; expired links return an HTTP 403.

Auth Routes

Authentication routes live in routes/auth.php and are handled by Laravel Breeze. Public guest-only routes include login and password reset; routes requiring auth middleware handle email verification and logout. Note: User self-registration is commented out — new accounts are created exclusively by an administrator via /usuarios/crear.
MethodPathMiddlewareDescription
GET/loginguestShow login form
POST/loginguestAuthenticate user session
GET/forgot-passwordguestShow password reset request form
POST/forgot-passwordguestSend password reset link email
GET/reset-password/{token}guestShow new password form
POST/reset-passwordguestStore new password
GET/verify-emailauthEmail verification notice prompt
GET/verify-email/{id}/{hash}authConfirm email verification link
POST/email/verification-notificationauthResend verification email (throttled)
POST/logoutauthDestroy authenticated session

Build docs developers (and LLMs) love