• Mahmoud Aglan's avatar
    Mobile API Phase 2: Push notifications via Firebase Cloud Messaging · 0b2c6122
    Mahmoud Aglan authored
    - Install kreait/firebase-php SDK
    - Create PushNotificationService with 3-tier credential resolution
      (system_settings → storage file → env var, graceful degradation)
    - Auto-deactivate invalid/unregistered FCM tokens on send failure
    - Add Push case to NotificationChannel enum
    - Create 6 event listeners for push notifications:
      - AttendanceMarked → notify guardians (present/absent)
      - PaymentReceived → confirm payment to guardians
      - InvoiceCreated → alert guardians of new invoice
      - SessionCancelled → notify all group participants
      - EnrollmentCreated → confirm enrollment to guardians
      - EvaluationShared → notify guardians of new evaluation
    - Register all listeners in EventServiceProvider (queued)
    - Create NotificationController API endpoints:
      - GET notifications (paginated + unread count)
      - PATCH notifications/{id}/read
      - POST notifications/read-all
      - GET/POST notifications/preferences
    - Create scheduled push commands:
      - push:session-reminder (every minute, 30min before session)
      - push:installment-due (daily, 1 and 3 days before due)
    - Add channel_push column to notification_preferences
    - Total: 20 API endpoints now live
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    0b2c6122
Name
Last commit
Last update
..
AlertFullGroups.php Loading commit data...
AutoMarkAbsent.php Loading commit data...
CleanupAuditLogs.php Loading commit data...
DeactivateExpiredEnrollments.php Loading commit data...
DetectPaymentPlanDefaults.php Loading commit data...
EnforceAttendanceThresholds.php Loading commit data...
ExpireDocuments.php Loading commit data...
GenerateRenewalInvoices.php Loading commit data...
GenerateUpcomingSessions.php Loading commit data...
MarkAutoAbsent.php Loading commit data...
MarkOverdueInvoices.php Loading commit data...
NotifyLowStock.php Loading commit data...
ReconcileFinancials.php Loading commit data...
ReconcileGroupCounts.php Loading commit data...
SendAttendanceAlerts.php Loading commit data...
SendBirthdayGreetings.php Loading commit data...
SendDailySummary.php Loading commit data...
SendExpiringSoonReminders.php Loading commit data...
SendInstallmentDuePush.php Loading commit data...
SendInstallmentReminders.php Loading commit data...
SendOverdueReminders.php Loading commit data...
SendParentWeeklyReport.php Loading commit data...
SendSessionReminderPush.php Loading commit data...
SetupFreshInstall.php Loading commit data...