# pixel-17/mssc architecture

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

- Interactive diagram: https://gitdiagram.com/pixel-17/mssc
- Repository: https://github.com/pixel-17/mssc

## Overview

MSSC is a Laravel application for managing employee papeletas (work/leave authorizations), from worker submission through supervisor and HR decisions, supporting evidence, and return/closure. The tree also shows shift scheduling, workforce administration, reports, catalogs, and notifications as substantial product areas. The workflow links below follow the sampled controllers’ explicit action calls; several other capabilities are represented from the tree, but their wiring is not asserted because their source was not sampled.

Main entry points: [`routes/web.php`](https://github.com/pixel-17/mssc/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/Trabajador/PapeletaController.php`](https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Trabajador/PapeletaController.php) (Worker papeletas), [`app/Http/Controllers/Jefe/DecisionController.php`](https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Jefe/DecisionController.php) (Supervisor decisions), [`app/Http/Controllers/Rrhh/DecisionController.php`](https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Rrhh/DecisionController.php) (HR decisions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Papeleta workflow"]
  node_workerui["Worker papeletas"]
  node_create["Create papeleta"]
  node_supervisorui["Supervisor decisions"]
  node_supervisorapprove["Supervisor approval"]
  node_hrui["HR decisions"]
  node_hrapprove["HR approval"]
  node_evidence["Supporting evidence"]
  node_return["Return tracking"]
  node_state{{"Papeleta states<br/>[PapeletaState.php]"}}
  node_papeleta[("Papeleta records<br/>[Papeleta.php]")]
end

subgraph group_operations["Scheduling and reports"]
  node_turnui["Shift planning"]
  node_turnservice["Shift services"]
  node_reports["Reports"]
  node_reportservice["Report services"]
end

subgraph group_admin["Workforce administration"]
  node_adminui["User administration"]
  node_createuser["Create user"]
  node_catalogs["Organization catalogs"]
end

subgraph group_platform["Application platform"]
  node_web["Web routes<br/>[web.php]"]
  node_notifications["Notifications"]
  node_dash["Dashboard<br/>[DashboardIndex.php]"]
  node_schedule["Scheduled processing<br/>[app.php]"]
  node_expiry["Expiry processing"]
  node_push["Push subscriptions"]
end

node_employee(("Worker"))
node_supervisor(("Supervisor"))
node_hr(("HR"))

node_employee -->|"submits requests"| node_web
node_supervisor -->|"reviews requests"| node_web
node_hr -->|"reviews requests"| node_web
node_web -->|"dispatches"| node_workerui
node_web -->|"dispatches"| node_supervisorui
node_web -->|"dispatches"| node_hrui
node_workerui -->|"invokes"| node_create
node_supervisorui -->|"invokes"| node_supervisorapprove
node_hrui -->|"invokes"| node_hrapprove
node_workerui -->|"queries"| node_papeleta
node_supervisorui -->|"decides on"| node_papeleta
node_hrui -->|"decides on"| node_papeleta
node_web -->|"dispatches"| node_evidence
node_web -->|"dispatches"| node_return
node_web -->|"dispatches"| node_turnui
node_web -->|"dispatches"| node_reports
node_web -->|"dispatches"| node_adminui
node_web -->|"dispatches"| node_catalogs
node_adminui -->|"invokes"| node_createuser
node_schedule -->|"schedules"| node_expiry
node_web -->|"dispatches"| node_notifications

click node_web "https://github.com/pixel-17/mssc/blob/main/routes/web.php"
click node_workerui "https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Trabajador/PapeletaController.php"
click node_create "https://github.com/pixel-17/mssc/blob/main/app/Actions/Papeleta/CrearPapeletaAction.php"
click node_supervisorui "https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Jefe/DecisionController.php"
click node_supervisorapprove "https://github.com/pixel-17/mssc/blob/main/app/Actions/Papeleta/AprobarJefeAction.php"
click node_hrui "https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Rrhh/DecisionController.php"
click node_hrapprove "https://github.com/pixel-17/mssc/blob/main/app/Actions/Papeleta/AprobarRrhhAction.php"
click node_evidence "https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Trabajador/SustentoController.php"
click node_return "https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Trabajador/RetornoController.php"
click node_state "https://github.com/pixel-17/mssc/blob/main/app/States/Papeleta/PapeletaState.php"
click node_papeleta "https://github.com/pixel-17/mssc/blob/main/app/Models/Papeleta.php"
click node_turnui "https://github.com/pixel-17/mssc/blob/main/app/Livewire/Turnos/ProgramacionMensual.php"
click node_turnservice "https://github.com/pixel-17/mssc/blob/main/app/Services/ProgramacionTurnoService.php"
click node_reports "https://github.com/pixel-17/mssc/blob/main/app/Livewire/Reportes/HorasAcumuladasIndex.php"
click node_reportservice "https://github.com/pixel-17/mssc/blob/main/app/Services/ReporteHorasAcumuladasService.php"
click node_adminui "https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Usuario/UsuarioController.php"
click node_createuser "https://github.com/pixel-17/mssc/blob/main/app/Actions/Usuario/CrearUsuarioAction.php"
click node_catalogs "https://github.com/pixel-17/mssc/blob/main/app/Livewire/UnidadesOrganicas/UnidadOrganicaIndex.php"
click node_notifications "https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/NotificacionController.php"
click node_dash "https://github.com/pixel-17/mssc/blob/main/app/Livewire/DashboardIndex.php"
click node_schedule "https://github.com/pixel-17/mssc/blob/main/bootstrap/app.php"
click node_expiry "https://github.com/pixel-17/mssc/blob/main/app/Console/Commands/ProcesarVencimientosPapeletas.php"
click node_push "https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/PushSubscriptionController.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_workerui,node_create,node_supervisorui,node_supervisorapprove,node_hrui,node_hrapprove,node_evidence,node_return,node_state,node_papeleta toneBlue
class node_turnui,node_turnservice,node_reports,node_reportservice toneAmber
class node_adminui,node_createuser,node_catalogs toneMint
class node_web,node_notifications,node_dash,node_schedule,node_expiry,node_push,node_employee toneRose
class node_supervisor,node_hr toneIndigo
```

## Components

### Papeleta workflow

- [Worker papeletas](https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Trabajador/PapeletaController.php): `app/Http/Controllers/Trabajador/PapeletaController.php`
- [Create papeleta](https://github.com/pixel-17/mssc/blob/main/app/Actions/Papeleta/CrearPapeletaAction.php): `app/Actions/Papeleta/CrearPapeletaAction.php`
- [Supervisor decisions](https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Jefe/DecisionController.php): `app/Http/Controllers/Jefe/DecisionController.php`
- [Supervisor approval](https://github.com/pixel-17/mssc/blob/main/app/Actions/Papeleta/AprobarJefeAction.php): `app/Actions/Papeleta/AprobarJefeAction.php`
- [HR decisions](https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Rrhh/DecisionController.php): `app/Http/Controllers/Rrhh/DecisionController.php`
- [HR approval](https://github.com/pixel-17/mssc/blob/main/app/Actions/Papeleta/AprobarRrhhAction.php): `app/Actions/Papeleta/AprobarRrhhAction.php`
- [Supporting evidence](https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Trabajador/SustentoController.php): `app/Http/Controllers/Trabajador/SustentoController.php`
- [Return tracking](https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Trabajador/RetornoController.php): `app/Http/Controllers/Trabajador/RetornoController.php`
- [Papeleta states](https://github.com/pixel-17/mssc/blob/main/app/States/Papeleta/PapeletaState.php): `app/States/Papeleta/PapeletaState.php`
- [Papeleta records](https://github.com/pixel-17/mssc/blob/main/app/Models/Papeleta.php): `app/Models/Papeleta.php`

### Scheduling and reports

- [Shift planning](https://github.com/pixel-17/mssc/blob/main/app/Livewire/Turnos/ProgramacionMensual.php): `app/Livewire/Turnos/ProgramacionMensual.php`
- [Shift services](https://github.com/pixel-17/mssc/blob/main/app/Services/ProgramacionTurnoService.php): `app/Services/ProgramacionTurnoService.php`
- [Reports](https://github.com/pixel-17/mssc/blob/main/app/Livewire/Reportes/HorasAcumuladasIndex.php): `app/Livewire/Reportes/HorasAcumuladasIndex.php`
- [Report services](https://github.com/pixel-17/mssc/blob/main/app/Services/ReporteHorasAcumuladasService.php): `app/Services/ReporteHorasAcumuladasService.php`

### Workforce administration

- [User administration](https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/Usuario/UsuarioController.php): `app/Http/Controllers/Usuario/UsuarioController.php`
- [Create user](https://github.com/pixel-17/mssc/blob/main/app/Actions/Usuario/CrearUsuarioAction.php): `app/Actions/Usuario/CrearUsuarioAction.php`
- [Organization catalogs](https://github.com/pixel-17/mssc/blob/main/app/Livewire/UnidadesOrganicas/UnidadOrganicaIndex.php): `app/Livewire/UnidadesOrganicas/UnidadOrganicaIndex.php`

### Application platform

- [Web routes](https://github.com/pixel-17/mssc/blob/main/routes/web.php): `routes/web.php`
- [Notifications](https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/NotificacionController.php): `app/Http/Controllers/NotificacionController.php`
- [Dashboard](https://github.com/pixel-17/mssc/blob/main/app/Livewire/DashboardIndex.php): `app/Livewire/DashboardIndex.php`
- [Scheduled processing](https://github.com/pixel-17/mssc/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [Expiry processing](https://github.com/pixel-17/mssc/blob/main/app/Console/Commands/ProcesarVencimientosPapeletas.php): `app/Console/Commands/ProcesarVencimientosPapeletas.php`
- [Push subscriptions](https://github.com/pixel-17/mssc/blob/main/app/Http/Controllers/PushSubscriptionController.php): `app/Http/Controllers/PushSubscriptionController.php`

### Other components

- **Worker**
- **Supervisor**
- **HR**

## Connections

- Worker → Web routes: submits requests
- Supervisor → Web routes: reviews requests
- HR → Web routes: reviews requests
- Web routes → Worker papeletas: dispatches
- Web routes → Supervisor decisions: dispatches
- Web routes → HR decisions: dispatches
- Worker papeletas → Create papeleta: invokes
- Supervisor decisions → Supervisor approval: invokes
- HR decisions → HR approval: invokes
- Worker papeletas → Papeleta records: queries
- Supervisor decisions → Papeleta records: decides on
- HR decisions → Papeleta records: decides on
- Web routes → Supporting evidence: dispatches
- Web routes → Return tracking: dispatches
- Web routes → Shift planning: dispatches
- Web routes → Reports: dispatches
- Web routes → User administration: dispatches
- Web routes → Organization catalogs: dispatches
- User administration → Create user: invokes
- Scheduled processing → Expiry processing: schedules
- Web routes → Notifications: dispatches
