How manuelrisco/sistema-notificaciones-test works
This is a PHP stock-alert and notification system, with a web interface for managing stock thresholds and a scheduled/manual process that evaluates inventory and emails grouped alerts. The principal alert path is the scheduled processor, which coordinates stock evaluation, persistence, and email delivery; the web path also supports authenticated inventory configuration and manual execution. The README lists dependencies but does not document capabilities, so web relationships are included only where the source index or excerpts support them; unsampled route internals are represented cautiously.
Main entry points: seguridad.php Session and CSRF · procesar_alertas.php Alert runner · StockNotificationService.php Notification coordinator · StockRepository.php Stock repository
Components 20
Web management
- Inventory dashboard
public/index.php - Authentication
public/autenticacion.php - Session and CSRF
public/seguridad.php - Login
public/login.php - Logout
public/logout.php - Create threshold
public/crear.php - Edit threshold
public/editar.php - Article lookup
public/consultar_articulo.php - Toggle availability
public/cambiar_estado.php - Manual execution
public/ejecutar_manual.php
Alert processing
- Alert runner
bin/procesar_alertas.php - Notification coordinator
src/StockNotificationService.php - Stock evaluation
src/StockAlertService.php
Persistence and delivery
- Stock repository
src/StockRepository.php - SQL connection
config/database.php - SQL Server
- Email service
src/EmailService.php - SMTP server
Other components
- Operator
- Scheduler
Connections 31
- Operator → Inventory dashboard: uses
public/index.php - Inventory dashboard → Session and CSRF: loads
public/index.php - Session and CSRF → Authentication: requires auth
public/seguridad.php - Operator → Login: signs in
- Operator → Logout: signs out
- Operator → Create threshold: sets threshold
- Operator → Edit threshold: edits threshold
- Operator → Article lookup: searches catalog
- Operator → Toggle availability: changes state
- Operator → Manual execution: runs alerts
- Login → Session and CSRF: loads
public/login.php - Logout → Session and CSRF: loads
public/logout.php - Create threshold → Session and CSRF: loads
public/crear.php - Edit threshold → Session and CSRF: loads
public/editar.php - Article lookup → Session and CSRF: loads
public/consultar_articulo.php - Toggle availability → Session and CSRF: loads
public/cambiar_estado.php - Manual execution → Session and CSRF: loads
public/ejecutar_manual.php - Scheduler → Alert runner: invokes
- Operator → Alert runner: invokes manually
- Alert runner → SQL connection: loads connection
bin/procesar_alertas.php - SQL connection → SQL Server: connects
- Alert runner → Stock repository: constructs
bin/procesar_alertas.php - Alert runner → Stock evaluation: constructs
bin/procesar_alertas.php - Alert runner → Email service: constructs
bin/procesar_alertas.php - Alert runner → Notification coordinator: invokes
bin/procesar_alertas.php - Notification coordinator → Stock evaluation: processes through
src/StockNotificationService.php - Stock evaluation → Stock repository: reads and updates
src/StockAlertService.php - Notification coordinator → Email service: sends alerts
src/StockNotificationService.php - Notification coordinator → Stock repository: marks sent
src/StockNotificationService.php - Stock repository → SQL Server: queries and writes
- Email service → SMTP server: delivers mail