PHPackages                             notification-hub/hub - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. notification-hub/hub

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

notification-hub/hub
====================

A reusable, extensible, and production-ready notification system for PHP

00PHPCI passing

Since Jul 4Pushed 1mo agoCompare

[ Source](https://github.com/YoussefMansour9/notification-hub-)[ Packagist](https://packagist.org/packages/notification-hub/hub)[ RSS](/packages/notification-hub-hub/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Notification Hub
================

[](#notification-hub)

> A reusable, extensible, and production-ready notification system for PHP.

[![CI](https://github.com/notification-hub/hub/actions/workflows/ci.yml/badge.svg)](https://github.com/notification-hub/hub/actions/workflows/ci.yml)[![Latest Stable Version](https://camo.githubusercontent.com/09b49a8ff5dd3b3adcfecce0aa7c87555f336acbeb7152a6b4166930f581e098/68747470733a2f2f706f7365722e707567782e6f72672f6e6f74696669636174696f6e2d6875622f6875622f762f737461626c65)](https://packagist.org/packages/notification-hub/hub)

Installation
------------

[](#installation)

```
composer require notification-hub/hub
```

Requirements
------------

[](#requirements)

- PHP &gt;= 8.3
- ext-pdo
- MySQL or SQLite (via PDO)

Quick Start
-----------

[](#quick-start)

```
use NotificationHub\Domain\Aggregate\Delivery;
use NotificationHub\Domain\ValueObject\ChannelType;
use NotificationHub\Domain\ValueObject\Notification;
use NotificationHub\Domain\ValueObject\Recipient;

$delivery = new Delivery(
    id: DeliveryId::generate(),
    notification: new Notification('Welcome!', 'Hello, friend.'),
    recipient: new Recipient('user-123', email: 'friend@example.com'),
    channelType: ChannelType::EMAIL,
);
```

Architecture
------------

[](#architecture)

```
Domain (no framework deps)
  Aggregate: Delivery (status, attempts, idempotency)
  Value Objects: Notification, Recipient, ChannelType, DeliveryStatus
  Repository: DeliveryRepositoryInterface
  Events: DeliveryCreated, DeliverySent, DeliveryFailed, ...

Application (orchestration)
  Commands: SendNotification, CancelDelivery, RetryFailedDelivery
  Queries: GetDeliveryHistory, GetPendingDeliveries
  Handlers, Event Subscribers, Workers

Infrastructure (concrete implementations)
  Persistence: PdoDeliveryRepository
  Channels: EmailChannel, SmsChannel
  Providers: SendGrid, Twilio (via interfaces)

```

Features
--------

[](#features)

- **Multi-Channel**: Email, SMS, Push, Slack, Webhooks
- **CQRS**: Separate command and query buses
- **Retry Logic**: Exponential backoff for failed deliveries
- **Idempotency**: Duplicate detection via idempotency keys
- **Event-Driven**: Domain events for extensibility
- **Metrics Interface**: Plug in Prometheus/Datadog
- **SQLite/MySQL**: Works with both via PDO

Testing
-------

[](#testing)

```
vendor/bin/phpunit
```

Testing with API + UI
---------------------

[](#testing-with-api--ui)

See `examples/` and `ui/` directories for a working demo.

License
-------

[](#license)

MIT

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance60

Regular maintenance activity

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d6d3694558eab3a95270545282b736db09669a7ff96b37d696444c18370c775b?d=identicon)[YoussefMansour9](/maintainers/YoussefMansour9)

### Embed Badge

![Health badge](/badges/notification-hub-hub/health.svg)

```
[![Health](https://phpackages.com/badges/notification-hub-hub/health.svg)](https://phpackages.com/packages/notification-hub-hub)
```

###  Alternatives

[bigbharatjain/laravel-clickatell

This package makes it easy to send sms using clickatell.com with Laravel 5.

1435.2k](/packages/bigbharatjain-laravel-clickatell)[motomedialab/smtp2go

Send emails via API using the first-class email courier SMTP2Go

1323.6k](/packages/motomedialab-smtp2go)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
