本文へスキップ
Skillpedia
APIとサーバー(バックエンド)25k · #10102

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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-notification-web-push/skills/nocobase-app-plugin-notification-web-push/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル