nocobase-app-plugin-notification-web-push
できること
NocoBase 3アプリにWeb Pushの通知を追加し、利用者がブラウザやデバイスで通知を受け取れるようにします。安全なデバイス登録でプッシュ通知を行いたい開発者向けです。
使う場面
- ✓NocoBaseアプリから、利用者にブラウザのプッシュ通知を届けたいとき。
- ✓利用者が設定ページで、デバイスのプッシュ設定を管理できるようにする必要があるとき。
- ✓Web PushのためにHTTPSとVAPIDキーを設定する必要があるとき。
スキルのリンク
https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-notification-web-push/skills/nocobase-app-plugin-notification-web-push/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“注文が承認されたとき利用者に知らせるよう、私のNocoBaseアプリにブラウザのプッシュ通知を設定してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AIはWeb Pushプラグインを登録し、その設定を追加し、サインイン後のページに設定用のコンポーネントを配置します。その後、既存の通知サービスを通じて、選ばれたデバイスや利用者に通知を送ります。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Web Push integration
Read this package's README before integration. Register its server plugin after authentication, authorization and notification, and its client factory for localized device preferences. Add pushConfig under push to application default configuration and configure notification.channels.webPush.type as web-push. Mount the exported PushPreferences on an authenticated preferences page and call unsubscribeDevice during sign-out. Provide HTTPS, persistent VAPID and secrets keys, and application-owned installation metadata using pushManifest where installation is needed.
Send title/body/url/dedupeKey with explicit device and user recipients using the existing notification service. URLs include the application's public base path. Business authorization and foreground takeover belong to the application; use the optional named beforeSend hook on every attempt and never put business state into the generic channel. A missing named hook refuses delivery.
The device API is fixed at /api/webPush; browser storage and logout use the framework defaults. defineWebPushPlugin({ title, icon }) accepts application branding, and the worker remains at <publicBasePath>/push-worker.js. Register named afterSubscribe hooks on the service for application initialization after a device is saved; do not mount aliases or customize browser protocols.
Subscriptions accept application language identifiers; untranslated test notifications fall back to English. Renewing an existing subscription preserves its enabled state. Device JSON bodies are strict: listing includes meta.total, PATCH returns the updated device, DELETE returns 204 (404 for missing or unowned devices), and test submission returns 202. Click URLs must be root-relative within the public base path. Message validation rejects the final serialized title/body/url/dedupeKey payload above 3993 UTF-8 bytes before queueing, reserving the aes128gcm encryption overhead within 4096 bytes.
よくある質問
HTTPSが必要ですか?
はい。プッシュ通知が動作するには、アプリをHTTPSで提供する必要があると、このスキルは説明しています。
プッシュを送る前に業務のルールを確認できますか?
はい。アプリケーションは、送信のたびに実行される名前付きのフックを提供できます。
サインアウト時はどうなりますか?
サインアウト時に、デバイスの登録を解除するよう説明しています。
詳細
作者による元の説明
Integrate encrypted browser push subscriptions and the Web Push notification channel in a NocoBase 3 application.
repo: nocobase/nocobase
人気
- GitHubのスター
- 25k
- ランキング
- #10102
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
nocobase-app-development
25kエージェントが、NocoBase 3の完全なビジネスアプリケーションのために、ページ、ルーティング、データ、権限、テストを作れるよう支援します。
shadcn
25kエージェントが、公式のドキュメントとレジストリを使い、Webプロジェクトの shadcn/uiコンポーネントを見つけ、追加し、修正し、スタイルを整えられるよう支援します。
nocobase-app-plugin-development
25kエージェントが、既存のNocoBase 3アプリの中で、サーバー、クライアント、データベース、登録の部分を含むプラグインを作成し、保守できるよう支援します。
nocobase-app-upgrade
25kエージェントが、NocoBaseのアプリを新しいテンプレートのリリースにアップグレードし、テンプレートの変更を取り込みつつ、あなた自身の作業を保てるよう支援します。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。