How danieldev87/virtual-center-app works
1. Overall shape
- This is a single Laravel 10 monolith with a Blade-rendered UI, Eloquent models, MySQL persistence, and a small API/AJAX surface.
- The application is organized as a central management platform for educational production/media centers, not as a generic CRUD app.
2. Primary request flow
- Incoming traffic enters through routes/web.php for the browser UI and routes/api.php for authenticated API calls.
- Requests are processed by Laravel middleware in app/Http/Middleware, then routed to controllers in app/Http/Controllers, which read/write data through models in app/Models, and render Blade views in resources/views.
3. Authentication and access control boundary
- Authentication is Laravel-based and the README states Sanctum is used for API auth.
- The app separates users into role-based areas: admin, collaborator, contributor, and likely requester/public-facing flows.
- Role and profile data are modeled with User, UserRole, and UserLog, with admin-side management controllers for users and roles.
4. Admin/back-office subsystem
- The app/Http/Controllers/Admin/* controllers and resources/views/admin/* templates form a conventional administration console.
- This area handles CRUD for institutional structure and catalog data: institutions, faculties, programs, courses, job positions, users, roles, tickets, and reports.
- The admin UI is laid out separately from other portals using resources/views/layouts/admin.blade.php.
5. Project and service management domain
- The core operational domain appears to be project/service coordination.
- Relevant models include ProjectTracking, ProjectTask, ProjectComment, Sprint, TaskList, Ticket, TicketAssignment, and TicketProgress.
- Controllers such as ProjectManagementController, ServiceManagementController, DashboardController, and ReportsController indicate a workflow centered on tracking work items, assigning responsibility, recording progress, and producing status views.
6. Ticketing and request lifecycle
- The ticket subsystem is a major data boundary: migrations cover ticket creation plus later additions for request types, nullable optional fields, academic metadata, progress percentage, and closing fields.
- The presence of TicketClosed and ServiceRated mail classes suggests the ticket lifecycle includes closure notifications and service feedback/rating after completion.
- TicketAssignment and TicketProgress imply the system tracks ownership and state transitions, not just static issue records.
7. Collaborator/contributor portals
- Separate controllers and views exist for collaborators and contributors, each with its own layout (layouts/contributor.blade.php, layouts/requester.blade.php).
- These portals likely expose narrower workflows than admin: profile management, participation in projects, and access to assigned work or service details.
- ProfileController and the user profile migration additions reinforce that user-facing identity data is a first-class concern.
8. Public/content-facing modules
- The app includes public or semi-public sections for home, about/contact, radio station, monitor, and dashboard pages.
- Models such as News, Podcast, Contact, MaterialType, StationRequest, MultimediaRequest, DevelopmentRequest, and MediationForm show the platform also manages media/content requests and institutional communication.
- RadioStationController and MonitorController suggest specialized presentation areas, likely for publishing content and operational status views.
9. Frontend and client-side interaction
- The UI is built with Blade templates plus Bootstrap 5, with custom CSS/JS under resources/css and resources/js.
- resources/js/components/DataTable.js and VirtualCenter.js indicate some richer client-side behavior, likely table interaction and dashboard/navigation enhancements.
- The README mentions AJAX endpoints for search/details/status updates, so the frontend is not purely static page rendering; some views call back into controller endpoints for partial updates.
10. Persistence model
- The database is structured via many migrations, with a strong emphasis on domain tables rather than a single generic record table.
- Key clusters are:
- Identity/organization: users, roles, institutions, faculties, programs, courses, job positions, areas
- Work tracking: project tracking, tasks, comments, sprints, assignments, progress
- Service/ticketing: tickets, request types, ticket progress, ticket assignments
- Content/media: news, podcasts, multimedia requests, station requests, mediation forms
- Seeders and factories provide initial and test data, including legacy-user and role bootstrapping.
11. Background/utility operations
- app/Console/Commands/ResetUserPassword.php and app/Console/Kernel.php show there are at least some CLI maintenance operations.
- The app uses Laravel’s mail subsystem for notifications, and queue/cache/session/mail configuration is present in config/, though the architecture in this repo appears primarily synchronous.
12. Testing and operational documentation
- Feature tests cover the main business areas: email notifications, ticket management, and user management.
- The manuales/ directory contains separate documentation for different user roles, which mirrors the role-based architecture in the codebase.
- There is also a bundled SQL dump (database/tdeacpmapplication.sql), suggesting the project has migration or deployment support for an existing production schema.
13. How to draw the architecture
- A good diagram would show:
- Browser / API client
- → Laravel routing + middleware
- → role-specific controllers
- → Eloquent models
- → MySQL
- with side paths to email notifications, AJAX/JS UI components, and admin/public portal views.
- The clearest subsystem boundaries are admin management, ticket/service workflow, project tracking, and public/media pages.
Main entry points: Models Eloquent models · Middleware Middleware · views Blade views · ServiceManagementController.php Service mgmt
Components 22
Entry & HTTP
Request entry points and Laravel request pipeline.
- Browser/API · Web users and authenticated API consumers.
- Web routes · Browser-facing route definitions.
routes/web.php - API routes · Authenticated API route definitions.
routes/api.php - Middleware · Laravel HTTP middleware stack.
app/Http/Middleware
Back-office
Administrative management surfaces and role/account operations.
- Admin controllers · Administration CRUD for institutional and platform data.
app/Http/Controllers/Admin - Auth access · Authentication and user-facing access control.
app/Http/Controllers/AuthController.php - Profile · Profile editing and user identity management.
app/Http/Controllers/ProfileController.php - Collaborators · Collaborator portal and management flows.
app/Http/Controllers/CollaboratorsController.php - Contributors · Contributor portal and dashboard flows.
app/Http/Controllers/ContributorController.php
Domains
Core service, project, and content workflows.
- Service mgmt · Ticket and service lifecycle management.
app/Http/Controllers/ServiceManagementController.php - Project mgmt · Project tracking, tasks, and sprint coordination.
app/Http/Controllers/ProjectManagementController.php - Reports · Status and operational reporting.
app/Http/Controllers/ReportsController.php - Public content · Home, radio, monitor, and public-facing pages.
app/Http/Controllers/HomeController.php - Dashboard · Landing dashboard for logged-in users.
app/Http/Controllers/DashboardController.php
UI Layer
Blade layouts and client-side enhancements.
- Blade views · Server-rendered UI templates and layouts.
resources/views - JS widgets · Client-side enhancements for tables and navigation.
resources/js/components
Persistence & Ops
Models, migrations, seeders, notifications, and maintenance commands.
- Eloquent models · Core entities for identity, tickets, projects, and content.
app/Models - Migrations · Schema evolution for the application's domain tables.
database/migrations - Seeders · Initial roles, users, request types, and fixtures.
database/seeders - Mail · Ticket closure and service rating email notifications.
app/Mail - Console · CLI maintenance commands and scheduler entry point.
app/Console/Commands/ResetUserPassword.php - MySQL · Primary relational persistence layer.
Connections 30
- Browser/API → Web routes: browse · Browser traffic enters the web routes.
- Browser/API → API routes: api calls · Authenticated clients call API routes.
- Web routes → Middleware: http pipeline · Web requests pass through middleware.
- API routes → Middleware: http pipeline · API requests pass through middleware.
- Middleware → Auth access: auth · Middleware feeds authentication and session handling.
- Middleware → Admin controllers: dispatch · Protected requests reach admin controllers.
- Middleware → Service mgmt: dispatch · Protected requests reach workflow controllers.
- Middleware → Project mgmt: dispatch · Protected requests reach project controllers.
- Middleware → Public content: dispatch · Public and semi-public pages route to content controllers.
- Admin controllers → Eloquent models: crud · Admin actions read and write domain models.
- Auth access → Eloquent models: users · Authentication and account flows use user models.
- Profile → Eloquent models: profile · Profile edits persist through the user model.
- Collaborators → Eloquent models: people · Collaborator management uses user and role data.
- Contributors → Eloquent models: people · Contributor portal reads user-related records.
- Service mgmt → Eloquent models: tickets · Service workflow reads and updates ticket entities.
- Project mgmt → Eloquent models: tracking · Project workflow uses tasks, comments, and sprint entities.
- Reports → Eloquent models: analytics · Reports aggregate operational data from domain models.
- Public content → Eloquent models: content · Public pages read news, podcasts, requests, and forms.
- Dashboard → Eloquent models: summaries · Dashboard views summarize model data.
- Eloquent models → MySQL: persist · Eloquent models persist to MySQL.
- Migrations → MySQL: schema · Migrations define the database schema.
- Seeders → MySQL: seed · Seeders populate baseline data.
- Service mgmt → Mail: notify · Ticket closure and rating events send mail.
- Admin controllers → Blade views: render · Admin controllers render Blade templates.
- Service mgmt → Blade views: render · Service workflow renders portal views.
- Project mgmt → Blade views: render · Project workflow renders dashboard views.
- Public content → Blade views: render · Public content controllers render pages.
- Auth access → Blade views: auth UI · Authentication pages use Blade templates.
- Blade views → JS widgets: enhance · Blade pages are enhanced by client-side widgets.
- Console → Eloquent models: maintenance · CLI maintenance commands operate on user data.