How piyas33/push-notification works
Main Components Identification
The project is a Laravel package for handling push notifications through Firebase Cloud Messaging. The key components to represent are:
• Package Core (PushNotification.php)
• Service Provider Layer
• Service Layer
• Queue System
• Firebase Cloud Messaging (External Service)
• Configuration Management
• Job Processing System
Flow Representation
• Laravel Application
• ↓
• PushNotificationServiceProvider
• ↓
• PushNotification (Facade)
• ↓
• PushNotificationService
• ↓
• [Queue System (Optional)] → PushNotificationJob
• ↓
• Firebase Cloud Messaging
Important Elements
a. Configuration Flow:
• Fcm_config.php connecting to the service layer
• Environment variables input
b. Queue System (Conditional):
• Alternative paths based on FCM_ENABLE_QUEUE setting
• Direct path when queue is disabled
• Queue-based path when enabled
Additional Details
Annotations for:
• Required environment variables
• Queue configuration options
• Service registration points
• Firebase credential requirements