# danieldev87/virtual-center-app architecture

> Architecture diagram of the GitHub repository danieldev87/virtual-center-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/danieldev87/virtual-center-app
- Repository: https://github.com/danieldev87/virtual-center-app

## Overview

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: [`app/Models`](https://github.com/danieldev87/virtual-center-app/tree/main/app/Models) (Eloquent models), [`app/Http/Middleware`](https://github.com/danieldev87/virtual-center-app/tree/main/app/Http/Middleware) (Middleware), [`resources/views`](https://github.com/danieldev87/virtual-center-app/tree/main/resources/views) (Blade views), [`app/Http/Controllers/ServiceManagementController.php`](https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/ServiceManagementController.php) (Service mgmt)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry & HTTP"]
  node_client(("Browser/API<br/>client"))
  node_web_routes["Web routes<br/>route map<br/>[web.php]"]
  node_api_routes["API routes<br/>route map<br/>[api.php]"]
  node_middleware["Middleware<br/>request pipeline"]
end

subgraph group_backoffice["Back-office"]
  node_admin_ctrls["Admin controllers<br/>admin web"]
  node_auth_ctrl["Auth access<br/>auth web<br/>[AuthController.php]"]
  node_profile_ctrl["Profile<br/>user web"]
  node_collab_ctrl["Collaborators<br/>portal web"]
  node_contrib_ctrl["Contributors<br/>portal web"]
end

subgraph group_domains["Domains"]
  node_service_ctrl["Service mgmt<br/>workflow web"]
  node_project_ctrl["Project mgmt<br/>workflow web"]
  node_reports_ctrl["Reports<br/>reporting web"]
  node_content_ctrls["Public content<br/>content web<br/>[HomeController.php]"]
  node_dashboard_ctrl["Dashboard<br/>portal web"]
end

subgraph group_ui["UI Layer"]
  node_views["Blade views<br/>presentation"]
  node_js_ui["JS widgets<br/>frontend"]
end

subgraph group_data["Persistence & Ops"]
  node_models[("Eloquent models<br/>domain model")]
  node_migrations["Migrations<br/>schema"]
  node_seeders["Seeders<br/>bootstrap data"]
  node_mail["Mail<br/>notifications"]
  node_console["Console<br/>maintenance"]
  node_database[("MySQL<br/>database")]
end

node_client -->|"browse"| node_web_routes
node_client -->|"api calls"| node_api_routes
node_web_routes -->|"http pipeline"| node_middleware
node_api_routes -->|"http pipeline"| node_middleware
node_middleware -->|"auth"| node_auth_ctrl
node_middleware -->|"dispatch"| node_admin_ctrls
node_middleware -->|"dispatch"| node_service_ctrl
node_middleware -->|"dispatch"| node_project_ctrl
node_middleware -->|"dispatch"| node_content_ctrls
node_admin_ctrls -->|"crud"| node_models
node_auth_ctrl -->|"users"| node_models
node_profile_ctrl -->|"profile"| node_models
node_collab_ctrl -->|"people"| node_models
node_contrib_ctrl -->|"people"| node_models
node_service_ctrl -->|"tickets"| node_models
node_project_ctrl -->|"tracking"| node_models
node_reports_ctrl -->|"analytics"| node_models
node_content_ctrls -->|"content"| node_models
node_dashboard_ctrl -->|"summaries"| node_models
node_models -->|"persist"| node_database
node_migrations -->|"schema"| node_database
node_seeders -->|"seed"| node_database
node_service_ctrl -->|"notify"| node_mail
node_admin_ctrls -->|"render"| node_views
node_service_ctrl -->|"render"| node_views
node_project_ctrl -->|"render"| node_views
node_content_ctrls -->|"render"| node_views
node_auth_ctrl -->|"auth UI"| node_views
node_views -->|"enhance"| node_js_ui
node_console -->|"maintenance"| node_models

click node_web_routes "https://github.com/danieldev87/virtual-center-app/blob/main/routes/web.php"
click node_api_routes "https://github.com/danieldev87/virtual-center-app/blob/main/routes/api.php"
click node_middleware "https://github.com/danieldev87/virtual-center-app/tree/main/app/Http/Middleware"
click node_admin_ctrls "https://github.com/danieldev87/virtual-center-app/tree/main/app/Http/Controllers/Admin"
click node_auth_ctrl "https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/AuthController.php"
click node_profile_ctrl "https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/ProfileController.php"
click node_collab_ctrl "https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/CollaboratorsController.php"
click node_contrib_ctrl "https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/ContributorController.php"
click node_service_ctrl "https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/ServiceManagementController.php"
click node_project_ctrl "https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/ProjectManagementController.php"
click node_reports_ctrl "https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/ReportsController.php"
click node_content_ctrls "https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/HomeController.php"
click node_dashboard_ctrl "https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/DashboardController.php"
click node_views "https://github.com/danieldev87/virtual-center-app/tree/main/resources/views"
click node_js_ui "https://github.com/danieldev87/virtual-center-app/tree/main/resources/js/components"
click node_models "https://github.com/danieldev87/virtual-center-app/tree/main/app/Models"
click node_migrations "https://github.com/danieldev87/virtual-center-app/tree/main/database/migrations"
click node_seeders "https://github.com/danieldev87/virtual-center-app/tree/main/database/seeders"
click node_mail "https://github.com/danieldev87/virtual-center-app/tree/main/app/Mail"
click node_console "https://github.com/danieldev87/virtual-center-app/blob/main/app/Console/Commands/ResetUserPassword.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_client,node_web_routes,node_api_routes,node_middleware toneBlue
class node_admin_ctrls,node_auth_ctrl,node_profile_ctrl,node_collab_ctrl,node_contrib_ctrl toneAmber
class node_service_ctrl,node_project_ctrl,node_reports_ctrl,node_content_ctrls,node_dashboard_ctrl toneMint
class node_views,node_js_ui toneRose
class node_models,node_migrations,node_seeders,node_mail,node_console,node_database toneIndigo
```

## Components

### Entry & HTTP

Request entry points and Laravel request pipeline.

- **Browser/API**: client · Web users and authenticated API consumers.
- [Web routes](https://github.com/danieldev87/virtual-center-app/blob/main/routes/web.php): route map · Browser-facing route definitions. · `routes/web.php`
- [API routes](https://github.com/danieldev87/virtual-center-app/blob/main/routes/api.php): route map · Authenticated API route definitions. · `routes/api.php`
- [Middleware](https://github.com/danieldev87/virtual-center-app/tree/main/app/Http/Middleware): request pipeline · Laravel HTTP middleware stack. · `app/Http/Middleware`

### Back-office

Administrative management surfaces and role/account operations.

- [Admin controllers](https://github.com/danieldev87/virtual-center-app/tree/main/app/Http/Controllers/Admin): admin web · Administration CRUD for institutional and platform data. · `app/Http/Controllers/Admin`
- [Auth access](https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/AuthController.php): auth web · Authentication and user-facing access control. · `app/Http/Controllers/AuthController.php`
- [Profile](https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/ProfileController.php): user web · Profile editing and user identity management. · `app/Http/Controllers/ProfileController.php`
- [Collaborators](https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/CollaboratorsController.php): portal web · Collaborator portal and management flows. · `app/Http/Controllers/CollaboratorsController.php`
- [Contributors](https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/ContributorController.php): portal web · Contributor portal and dashboard flows. · `app/Http/Controllers/ContributorController.php`

### Domains

Core service, project, and content workflows.

- [Service mgmt](https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/ServiceManagementController.php): workflow web · Ticket and service lifecycle management. · `app/Http/Controllers/ServiceManagementController.php`
- [Project mgmt](https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/ProjectManagementController.php): workflow web · Project tracking, tasks, and sprint coordination. · `app/Http/Controllers/ProjectManagementController.php`
- [Reports](https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/ReportsController.php): reporting web · Status and operational reporting. · `app/Http/Controllers/ReportsController.php`
- [Public content](https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/HomeController.php): content web · Home, radio, monitor, and public-facing pages. · `app/Http/Controllers/HomeController.php`
- [Dashboard](https://github.com/danieldev87/virtual-center-app/blob/main/app/Http/Controllers/DashboardController.php): portal web · Landing dashboard for logged-in users. · `app/Http/Controllers/DashboardController.php`

### UI Layer

Blade layouts and client-side enhancements.

- [Blade views](https://github.com/danieldev87/virtual-center-app/tree/main/resources/views): presentation · Server-rendered UI templates and layouts. · `resources/views`
- [JS widgets](https://github.com/danieldev87/virtual-center-app/tree/main/resources/js/components): frontend · Client-side enhancements for tables and navigation. · `resources/js/components`

### Persistence & Ops

Models, migrations, seeders, notifications, and maintenance commands.

- [Eloquent models](https://github.com/danieldev87/virtual-center-app/tree/main/app/Models): domain model · Core entities for identity, tickets, projects, and content. · `app/Models`
- [Migrations](https://github.com/danieldev87/virtual-center-app/tree/main/database/migrations): schema · Schema evolution for the application's domain tables. · `database/migrations`
- [Seeders](https://github.com/danieldev87/virtual-center-app/tree/main/database/seeders): bootstrap data · Initial roles, users, request types, and fixtures. · `database/seeders`
- [Mail](https://github.com/danieldev87/virtual-center-app/tree/main/app/Mail): notifications · Ticket closure and service rating email notifications. · `app/Mail`
- [Console](https://github.com/danieldev87/virtual-center-app/blob/main/app/Console/Commands/ResetUserPassword.php): maintenance · CLI maintenance commands and scheduler entry point. · `app/Console/Commands/ResetUserPassword.php`
- **MySQL**: database · Primary relational persistence layer.

## Connections

- 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.
