Platform Architecture Modules Developers Security Integrations Articles
Modules / Notifications & Messaging
Production-Ready Specification

Notifications & Messaging

Omni-channel delivery engine across Email, SMS, Webhooks, Push, and In-App.

The Notifications module abstracts away communication channel complexities. Applications dispatch high-level domain notifications, and the module handles template compilation, user preference filtering, localization, delivery retries, and webhook callbacks.

Capabilities

Core Functional Capabilities

Multi-channel routing (Transactional Email, SMS, Webhooks, Push, In-App bell)
Tenant and user preference matrix (channels, quiet hours, digest frequency)
Template engine supporting Markdown, HTML, and localized variables
Asynchronous queue-based sending with automatic backoff retries
Real-time In-App notification broadcast via WebSockets / SSE
Delivery status webhooks and open/click tracking infrastructure

Contracts

Public Interface Contracts

Other modules and domain action classes interact exclusively via these typed PHP contracts.

interface NotificationDispatcherInterface
interface ChannelAdapterInterface
interface TemplateRendererInterface
interface PreferenceManagerInterface

Reactivity

Dispatched Domain Events

Dispatched upon state mutation for downstream audit recording, webhook firing, and asynchronous notifications.

NotificationDispatched
NotificationDelivered
NotificationFailed
NotificationRead

Customization

Extension Points

  • Custom SMS / Email / Chat gateway adapters (Twilio, Postmark, Slack, Teams, WhatsApp)
  • Custom template engine filters and helpers

🛡 Security & Isolation

  • Rate limiting against notification spam and SMS pump attacks
  • Automatic suppression lists for bounces and unsubscribes

Core Entities & Models

  • NotificationTemplate (Slug, channel, content, subject, tenant_id)
  • UserNotification (User_id, type, data, read_at, channel)
  • DeliveryLog (Message_id, recipient, status, attempts, error_message)