How cristhianllanque/san_roman works
This is a classic Laravel monolith organized around an MVC flow: HTTP requests enter through public/index.php, are routed in routes/web.php and routes/auth.php, handled by controllers under app/Http/Controllers, persisted with Eloquent models in app/Models, and rendered with Blade templates in resources/views.
The application’s core domain is a support-ticket system. The main entities are User, Ticket, Mensaje (messages/chat), Incidencia (incident records), and Oficina (office/location or department). The migrations show the schema evolution: users gained role/status fields, tickets gained technician assignment and user data fields, and incidents were added later with an eventual delivery date.
Authentication and account management are built in using Laravel’s standard auth stack. The Auth controllers and views cover login, registration, password reset, email verification, and password confirmation. A separate ProfileController and profile views handle user profile updates and account deletion.
Access is segmented by role. The views and controllers indicate at least three personas: usuario (end user), tecnico (support technician), and admin. Each persona has its own dashboard and ticket views, suggesting role-based navigation and authorization boundaries around the same core ticket data.
Ticket lifecycle is the main data flow. Users can create tickets, view their own tickets, follow ticket status, and open a chat view for conversation. Technicians have their own ticket list plus an incidence form, implying they process or resolve tickets and record incident details. The Mensaje model and resources/views/tickets/chat.blade.php point to a threaded message flow attached to tickets.
The admin subsystem is broader operational management. Admin views exist for dashboards, statistics, offices, technicians, users, tickets, and reports. That implies the admin can oversee the support operation end-to-end: manage reference data (Oficinas), manage personnel and accounts, inspect ticket volume, and generate summary reports.
The UI layer is server-rendered Blade rather than a SPA. Layouts are split into app/guest shells, with reusable Blade components for forms, buttons, dropdowns, navigation, modal dialogs, and chat bubbles. This keeps presentation centralized while each role-specific screen composes the shared shell differently.
Front-end tooling is lightweight and Laravel-native. resources/css/app.css, resources/js/app.js, Tailwind config, and Vite config indicate asset compilation with Vite and utility-first styling. A small amount of client-side behavior is likely present for navigation, modals, and chat updates, but the system remains primarily server-rendered.
Persistence is handled through Laravel’s database layer with migrations, factories, and seeders. The AdminUserSeeder suggests the app boots with at least one privileged account. Standard framework tables for cache and jobs are present, but there is no sign of a separate queue worker or external backend service in the repository structure.
Operationally, the app stores public assets under public/ and uses Laravel’s storage directories for generated files, logs, sessions, cache, and private app data. The presence of a chat notification sound and a couple of video files in public/ suggests some media assets are shipped directly with the application UI.
Testing is mostly framework-default feature coverage around auth and profile flows, with unit and feature test scaffolding in place. That implies the most critical automated checks currently focus on access/account management rather than the ticket domain, at least from the visible tree.
For an architecture diagram, the main boundaries to draw are: browser/UI → Laravel HTTP layer → controllers → Eloquent models/database, with a secondary boundary for role-specific dashboards and admin/reporting screens. The central shared domain is ticket handling, and everything else—auth, profiles, admin management, technician workflows—branches around that core.
Main entry points: AdminController.php Admin ctrl · TicketController.php Ticket ctrl · app.blade.php Layouts · web.php Web routes
Components 19
HTTP layer
Laravel request entry, routing, controllers, and request validation.
- Web routes · Main HTTP routes for app, tickets, admin, and role-specific screens.
routes/web.php - Auth routes · Authentication and account-management routes.
routes/auth.php - Ticket ctrl · Handles ticket creation, listing, chat, and follow-up flows.
app/Http/Controllers/TicketController.php - Admin ctrl · Coordinates admin dashboards, reports, users, offices, and technicians.
app/Http/Controllers/AdminController.php - Profile ctrl · Manages profile updates and account deletion.
app/Http/Controllers/ProfileController.php - Auth ctrls · Login, registration, verification, password reset, and confirmation controllers.
app/Http/Controllers/Auth/AuthenticatedSessionController.php - Form requests · Request validation for login and profile updates.
app/Http/Requests/Auth/LoginRequest.php
Domain & data
Support-ticket entities and database persistence.
- User · Application user with role and status fields.
app/Models/User.php - Ticket · Core support request entity, including technician assignment and user data.
app/Models/Ticket.php - Mensaje · Threaded ticket messages used by the chat flow.
app/Models/Mensaje.php - Incidencia · Incident record linked to ticket handling and delivery timing.
app/Models/Incidencia.php - Oficina · Office or department reference data.
app/Models/Oficina.php
Server UI
Blade layouts, role dashboards, and shared components.
- Layouts · Shared app, guest, and navigation layouts for server-rendered screens.
resources/views/layouts/app.blade.php - Components · Reusable UI pieces such as buttons, inputs, modal, nav, and chat bubbles.
resources/views/components/chat-bubbles.blade.php - Role screens · User, technician, and admin dashboards plus role-specific ticket screens.
resources/views/usuario/dashboard.blade.php - Admin screens · Admin dashboards, statistics, offices, technicians, users, tickets, and reports.
resources/views/admin/dashboard.blade.php - Auth & profile UI · Login, registration, password, verification, and profile management screens.
resources/views/auth/login.blade.php
Infra & assets
Public entrypoint, asset pipeline, storage, and bootstrapping.
- Entry point · Web requests enter Laravel through the public bootstrap file.
public/index.php - Assets & storage · Public media assets, compiled front-end assets, logs, cache, and generated storage.
public/sounds/new-message.mp3
Connections 29
- Entry point → Web routes: boots app · The front controller hands off to Laravel routing.
- Entry point → Auth routes: auth entry · Authentication paths are registered through the route layer.
- Web routes → Ticket ctrl: dispatches · Ticket-related endpoints are routed to the ticket controller.
- Web routes → Admin ctrl: dispatches · Admin endpoints are routed to the admin controller.
- Web routes → Profile ctrl: dispatches · Profile endpoints are routed to the profile controller.
- Auth routes → Auth ctrls: dispatches · Auth routes map to the auth controller set.
- Ticket ctrl → Ticket: reads/writes · Ticket workflows persist support requests.
- Ticket ctrl → Mensaje: chat data · Ticket chat uses message records.
- Ticket ctrl → Incidencia: creates incidents · Technician handling can produce incident records.
- Admin ctrl → User: manages · Admin views and updates users and their roles.
- Admin ctrl → Ticket: oversees · Admin reporting and dashboards inspect ticket data.
- Admin ctrl → Oficina: manages · Admin maintains office reference data.
- Admin ctrl → Incidencia: reports on · Incident records support operational reporting.
- Profile ctrl → User: updates · Profile changes apply to the authenticated user.
- Auth ctrls → User: auth accounts · Registration, login, and recovery operate on user accounts.
- Form requests → Auth ctrls: validates · Form requests validate auth submissions.
- Form requests → Profile ctrl: validates · Profile update requests are validated before persistence.
- Layouts → Components: composes · Layouts reuse shared Blade components.
- Layouts → Role screens: wraps · Role-specific screens render inside the main app shell.
- Layouts → Admin screens: wraps · Admin screens use the shared application layout.
- Layouts → Auth & profile UI: wraps · Auth and profile pages use guest or app layouts.
- Role screens → Ticket ctrl: drives · User and technician screens present ticket actions and statuses.
- Admin screens → Admin ctrl: drives · Admin screens surface management and reporting actions.
- Auth & profile UI → Auth ctrls: submits to · Auth forms post to the auth controller set.
- Auth & profile UI → Profile ctrl: submits to · Profile forms post to profile actions.
- Role screens → Ticket: shows · Role dashboards and ticket pages render ticket data.
- Admin screens → User: shows · Admin views display user management data.
- Role screens → Mensaje: shows · Chat screens display ticket conversations.
- Assets & storage → Components: serves assets · UI uses public media and compiled front-end resources.