CommonPHP Notifications owns the shared application notification boundary.
- Notification message objects.
- Recipient value objects and recipient normalization.
- Delivery status, result, and report objects.
- Named channel registration and lookup.
- Notification driver contracts and helpers.
- A small notifier service.
- Exceptions for invalid notification state and delivery failures.
- Runtime service provider integration.
- SMTP, SendGrid, Twilio, Slack, Teams, or webhook provider clients.
- Template rendering engines.
- Queues, workers, retry schedulers, or background jobs.
- Marketing automation, campaign segmentation, or unsubscribe management.
- Real-time chat or bidirectional messaging.
- HTTP controllers, routing, UI rendering, or database persistence.
Those concerns should live in provider driver packages, application services, or other CommonPHP packages.
Application code should create Notification objects and send them through NotifierInterface. Provider packages should implement NotificationDriverInterface and return structured DeliveryResult values.
This keeps application code independent from vendor APIs while still making provider-specific details available through result details and metadata.