Download the PHP package azaharizaman/nexus-notifier without Composer
On this page you can find all versions of the php package azaharizaman/nexus-notifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azaharizaman/nexus-notifier
More information about azaharizaman/nexus-notifier
Files in azaharizaman/nexus-notifier
Package nexus-notifier
Short Description Framework-agnostic notification engine for multi-channel communication (Email, SMS, Push, In-App)
License MIT
Informations about the package nexus-notifier
Nexus\Notifier
Framework-agnostic notification engine for multi-channel communication.
Purpose
Nexus\Notifier provides a unified, decoupled interface for sending notifications across multiple channels (Email, SMS, Push Notifications, In-App Messages) without coupling your business logic to specific vendors or delivery mechanisms.
Core Philosophy
"Define the message once, deliver everywhere."
This package implements the Channel Agnosticism principle: your business logic triggers notifications without knowing how they're delivered. The consuming application (Atomy) provides the concrete implementations for each channel.
Key Features
- Multi-Channel Support: Email, SMS, Push Notifications, In-App messaging
- Channel Agnosticism: Business logic remains decoupled from delivery mechanisms
- Single Definition: One notification event contains all channel variations
- Asynchronous Delivery: Queue-based delivery prevents blocking
- Priority Handling: Critical notifications bypass normal queues
- Template Engine: Variable substitution and multi-language support
- Delivery Tracking: Complete lifecycle tracking (Pending → Sent → Delivered → Failed)
- Preference Management: Per-recipient channel and category preferences
- Audit Trail: Full logging integration via
Nexus\AuditLogger - Rate Limiting: Prevents spam and abuse
- Fallback Channels: Automatic fallback if primary channel fails
Architecture
This package follows Nexus's "Logic in Packages, Implementation in Applications" principle:
- Package (
packages/Notifier/): Defines contracts, business logic, and value objects - Application (
apps/Atomy/): Implements repositories, models, and channel handlers
Package Structure
Requirements Addressed
This package addresses the following requirements from REQUIREMENTS.csv:
- FR-NOT-101: Channel agnosticism - business services trigger notifications without knowing delivery method
- FR-NOT-102: Single notification definition containing all channel variations
- FR-NOT-103: Recipient abstraction via
NotifiableInterface - FR-NOT-104: Asynchronous notification delivery via queue
- BUS-NOT-0001 to BUS-NOT-0010: Business requirements for multi-channel delivery, consistency, retry logic, etc.
- FUN-NOT-0185 to FUN-NOT-0204: Functional requirements for notification management
See REQUIREMENTS.csv for complete list.
Installation
This package is part of the Nexus monorepo. To use it in the Atomy application:
Usage
1. Define a Notification
Create a notification class implementing NotificationInterface:
2. Send a Notification
3. Implement Notifiable
Your recipient entity must implement NotifiableInterface:
User Stories Solved
1. System Administrator Story
Problem: Switching SMS vendors requires code changes across multiple packages.
Solution:
2. Package Developer Story
Problem: Implementing notifications requires understanding SMTP, SMS APIs, etc.
Solution:
3. Customer Relations Manager Story
Problem: Need multi-channel confirmation after booking.
Solution: The system automatically sends both email and SMS based on recipient preferences when you call $notifier->send().
Dependencies
This package depends on:
azaharizaman/nexus-audit-logger: For audit trail loggingazaharizaman/nexus-connector: For actual email/SMS delivery via external providersazaharizaman/nexus-identity: For recipient user dataazaharizaman/nexus-setting: For notification preferences
Integration Points
The consuming application (Atomy) must implement:
- Channel Handlers: Email, SMS, Push, In-App channel implementations
- Repositories: Template, History, Preference repositories with database persistence
- Queue System: For asynchronous delivery
- Service Provider Bindings: Wire all interfaces to concrete implementations
See docs/NOTIFIER_IMPLEMENTATION.md for complete implementation guide.
Testing
Package tests are unit tests with mocked repositories. Atomy tests are feature tests with database.
License
MIT License - see LICENSE file for details.
Support
Part of the Nexus ERP Monorepo.