承接 nawasara/notification 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nawasara/notification

Composer 安装命令:

composer require nawasara/notification

包简介

Unified outbound notification for the Nawasara superapp framework — multi-channel routing, Blade templates, queue dispatch, and an audit log of every send.

README 文档

README

Unified outbound notification for the Nawasara superapp framework. Build a Blade template once, then send it to anyone over any registered channel via a single fluent API. Every send is queued, retried with backoff on failure, and recorded in an audit log.

Features

  • Notify facade — fluent, chainable: Notify::to($user)->template('ssl.expiry')->data([...])->send()
  • Email channel (MVP) — sends via Laravel's Mail facade. Credentials read from the smtp Vault group with a fallback to .env (MAIL_*)
  • Template manager — Blade-rendered subject and body, multi-channel bodies (HTML / text / WhatsApp / Telegram / in-app), priority and active flag
  • Live preview — render any template against arbitrary JSON variables in an iframe before saving
  • Test send — kick off a real send to your own email from the template list to verify rendering and delivery end-to-end
  • Audit log — every send is one row in nawasara_notification_logs with status (queued / sending / sent / delivered / failed / bounced), error trace, attempts, and rendered body
  • Retry from UI — failed and bounced logs can be re-dispatched in one click
  • Future channels — WhatsApp, Telegram, and in-app are stubbed in the schema and contract; only EmailChannel is implemented in the MVP

Installation

composer require nawasara/notification
php artisan migrate
php artisan db:seed --class="Nawasara\Notification\Database\Seeders\PermissionSeeder" --force

Auto-discovered. The Notify facade is registered as an alias.

SMTP credentials

The package reads SMTP credentials from the smtp Vault group at send time. Open /nawasara-vault/credentials → SMTP Email → fill in:

Field Example
Host smtp.gmail.com
Port 587
Encryption tls
Username noreply@kominfo.go.id
Password (Gmail app password if 2FA is on)
From Address noreply@kominfo.go.id
From Name Nawasara Kominfo

Use Test Connection in the dropdown to verify the host is reachable. If Vault is empty, the channel falls back to whatever Laravel resolves from .env — useful in local where MAIL_MAILER=log writes the rendered email to storage/logs/laravel.log.

Sending notifications

Template-driven

use Nawasara\Notification\Facades\Notify;

Notify::to($user)
    ->template('ssl.expiry.warning')
    ->data(['domain' => 'dinkes.ponorogo.go.id', 'days' => 7])
    ->send();

Ad-hoc

Notify::to('admin@kominfo.go.id')
    ->channel('email')
    ->subject('Test')
    ->body('<p>Hello world</p>')
    ->send();

Synchronous (skip queue)

Useful for tests and admin actions that need immediate feedback:

Notify::to($user)->template('welcome')->data([...])->sync()->send();

Pages

Route Permission
/nawasara-notification/templates notification.template.view
/nawasara-notification/logs notification.log.view

Permissions

Permission Description
notification.template.view View template list
notification.template.create Create template
notification.template.update Update template
notification.template.delete Delete template
notification.log.view View notification log
notification.log.retry Retry a failed/bounced notification
notification.test.send Trigger a Test Send from the template UI
notification.broadcast.send Broadcast (planned for future)

Roadmap

  • WhatsApp channel via nawasara/whatsapp-forwarder
  • Telegram bot channel
  • In-app notification bell in topbar
  • Webhook delivery callbacks (open/click tracking, bounce handling)
  • User notification preferences (per-channel, quiet hours)
  • Template broadcast (blast to role / OPD / custom audience)

See docs/todo-notification.md for the full plan.

Author

Pringgo J. Saputro <odyinggo@gmail.com>

License

MIT

nawasara/notification 适用场景与选型建议

nawasara/notification 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 65 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「queue」 「template」 「email」 「Audit」 「notification」 「smtp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 nawasara/notification 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 nawasara/notification 我们能提供哪些服务?
定制开发 / 二次开发

基于 nawasara/notification 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 65
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 53
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-09