PHPackages                             betocampoy/champs-notification-center - 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. betocampoy/champs-notification-center

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

betocampoy/champs-notification-center
=====================================

Champs Notification Center - backend package for standardized notifications compatible with Champs Frontend.

v1.0.0(1mo ago)04MITPHPPHP &gt;=8.0

Since Apr 29Pushed 1mo agoCompare

[ Source](https://github.com/betocampoy/champs-notification-center)[ Packagist](https://packagist.org/packages/betocampoy/champs-notification-center)[ RSS](/packages/betocampoy-champs-notification-center/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (3)Used By (0)

Champs Notification Center
==========================

[](#champs-notification-center)

Pacote POC para padronizar uma central de notificações reutilizável em projetos legados e Symfony.

Frontend esperado: `data-champs-notification-center` do `champs-frontend/champs-core-js`.

Instalação local para teste
---------------------------

[](#instalação-local-para-teste)

No projeto consumidor:

```
{
  "repositories": [
    {
      "type": "path",
      "url": "../champs-notification-center",
      "options": { "symlink": true }
    }
  ],
  "require": {
    "betocampoy/champs-notification-center": "*@dev"
  }
}
```

Depois:

```
composer update betocampoy/champs-notification-center
```

Tabela
------

[](#tabela)

Execute o SQL:

```
database/mysql.sql
```

Uso legado com PDO
------------------

[](#uso-legado-com-pdo)

```
use BetoCampoy\Champs\NotificationCenter\Repository\PdoNotificationRepository;
use BetoCampoy\Champs\NotificationCenter\Service\NotificationDispatcher;
use BetoCampoy\Champs\NotificationCenter\Service\NotificationReader;
use BetoCampoy\Champs\NotificationCenter\Service\NotificationActionHandler;

$repository = new PdoNotificationRepository($pdo);
$dispatcher = new NotificationDispatcher($repository);
$reader = new NotificationReader($repository);
$actions = new NotificationActionHandler($repository);

$dispatcher->dispatch(
    recipientType: 'user',
    recipientId: '1',
    subject: 'Boleto gerado',
    body: 'O boleto foi gerado com sucesso.',
    link: '/financeiro/boletos/123',
    type: 'finance'
);
```

Endpoints esperados pelo frontend
---------------------------------

[](#endpoints-esperados-pelo-frontend)

### Counter

[](#counter)

```
{
  "success": true,
  "unread": 3
}
```

### Lista

[](#lista)

```
{
  "success": true,
  "unread": 3,
  "items": [
    {
      "id": 1,
      "subject": "DC-e autorizada",
      "body": "A declaração foi autorizada.",
      "link": "/fiscal/document/1",
      "read": false,
      "createdAt": "27/04/2026 10:00",
      "media": null
    }
  ]
}
```

Symfony
-------

[](#symfony)

A pasta `config/routes.yaml` contém rotas POC:

```
champs_notification_counter:
  path: /champs/notifications/counter
```

Na primeira versão, o controller Symfony resolve o recipient por headers:

- `X-Champs-Recipient-Type`
- `X-Champs-Recipient-Id`

No projeto real, vamos trocar por `Security->getUser()` ou um `RecipientResolverInterface`.

Firebase
--------

[](#firebase)

A interface `PushNotificationProviderInterface` já existe. A classe `FirebaseMessagingProvider` é placeholder para a próxima evolução com Firebase Cloud Messaging HTTP v1.

Status
------

[](#status)

Versão POC para testes no legado e no Symfony.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance91

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

41d ago

### Community

Maintainers

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

---

Top Contributors

[![betocampoy](https://avatars.githubusercontent.com/u/85419774?v=4)](https://github.com/betocampoy "betocampoy (1 commits)")

### Embed Badge

![Health badge](/badges/betocampoy-champs-notification-center/health.svg)

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

###  Alternatives

[mattketmo/email-checker

Throwaway email detection library

2742.1M5](/packages/mattketmo-email-checker)[ifightcrime/bootstrap-growl

Pretty simple jQuery plugin that turns standard Bootstrap alerts into 'Growl-like' notifications.

80113.0k](/packages/ifightcrime-bootstrap-growl)[sarfraznawaz2005/noty

Laravel package to incorporate noty flash notifications into laravel.

324.5k](/packages/sarfraznawaz2005-noty)[andheiberg/notify

A site notification package for laravel.

119.1k1](/packages/andheiberg-notify)

PHPackages © 2026

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