Aller au contenu
Skillpedia
API et serveurs (backend)25k · #10101

nocobase-app-plugin-notification-in-app

Ce qu’il fait

Cette skill met en place la boîte de notifications intégrée dans une application NocoBase 3. Chaque utilisateur ne voit que ses propres notifications, et la boîte se met à jour en direct. Elle s'adresse aux développeurs qui veulent une boîte de réception dans l'application.

Quand l’utiliser

  • ✓Quand vous voulez que les utilisateurs voient des notifications dans une boîte intégrée à l'application.
  • ✓Quand la boîte doit se mettre à jour en direct après l'enregistrement d'une notification.
  • ✓Quand des notifications manquent ou apparaissent pour le mauvais utilisateur, et qu'un diagnostic est nécessaire.

Lien du skill

https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-notification-in-app/skills/nocobase-app-plugin-notification-in-app/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-notification-in-app/skills/nocobase-app-plugin-notification-in-app/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Je voudrais ajouter une boîte de notifications à mon application NocoBase qui se met à jour en direct quand une tâche est assignée à un utilisateur.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'IA enregistre les points d'entrée client et serveur du plugin, place les composants de la boîte sur une page que l'application possède, et relie le canal de mise à jour en direct. Les notifications enregistrées restent la source de vérité.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Goal

Integrate and maintain the authenticated, user-isolated in-app inbox while keeping durable HTTP state authoritative and realtime events limited to invalidation.

Ownership and Placement

This Skill is published with @nocobase/app-plugin-notification-in-app. The plugin owns its Server runtime, persistence, APIs, realtime contract, and Client inbox components. The target application owns whether both Client and Server entries are registered.

Scope

  • Register the Client and Server plugin entries and the core notification dependency.
  • Render the exported inbox components in an application-owned page.
  • Consume the public realtime topic and event types from the /realtime package entry.
  • Verify or diagnose inbox HTTP access, mutations, user isolation, and reconnect refresh.

Non-Goals

  • Do not replace durable notifications with transient browser toasts.
  • Do not edit inbox tables directly or publish forged realtime events as notification state.
  • Do not expect the plugin to contribute an inbox page; the application owns the route.

Input Contract

Input Required Default Validation Clarification Question
action yes verify for existing code; register for a new target register/verify/diagnose "Should I register, verify, or diagnose the inbox?"
application yes infer from one unambiguous workspace application application root with Server and Client configuration "Which application should register the inbox plugin?"
apiConfig no the target application's injected ApiClient and RealtimeClient authenticated client with the intended baseURL/realtimeURL "Should this application use its default or a custom API host?"

Rules:

  • Resolve package versions and enabled plugins from the target application before changing source.
  • Register the package's public /client and /server entries; do not import implementation files.
  • If the target application is ambiguous, stop mutation and ask.

Mandatory Clarification Gate

  • Max clarification rounds: 2.
  • Max questions per round: 3.
  • Read-only inspection and diagnosis may proceed when the application is unambiguous.
  • Missing required input blocks mutation; report the missing contract instead of guessing.

Workflow

  1. Read Inbox Integration Contract for package requirements, public surfaces, and runtime semantics.
  2. Inspect the target application's Server plugin list, Client composition, authentication setup, api.baseURL, api.realtimeURL, and installed package versions.
  3. Register @nocobase/app-plugin-notification before @nocobase/app-plugin-notification-in-app/server when the application needs the in-app Channel contribution.
  4. Register @nocobase/app-plugin-notification-in-app/client in the Client composition root. The plugin contributes no pages: render NotificationInAppInbox inside NotificationInAppProvider in a page the application declares among its own routes.
  5. In React components and custom Hooks, use useApiClient() from @nocobase/app-client for inbox reads and mutations, and useService(realtimeClientToken) for subscriptions. Outside React, resolve the corresponding tokens from the application's services or receive the clients explicitly. Do not reconstruct /api from the browser location or Portal base.
  6. Keep HTTP state authoritative. On a validated inbox.changed event, realtime connection open, or window focus, trigger a bounded HTTP refetch.
  7. Use the public @nocobase/app-plugin-notification-in-app/realtime entry for shared topic or event types; do not import Server internals.
  8. Test allowed and denied users, mutations without a CSRF token, cross-site cookie writes rejected with INVALID_CSRF_ORIGIN, pagination, custom API hosts, realtime invalidation, and reconnect recovery.
  9. Run lint, typecheck, tests, and build for the plugin and affected application.

Reference Loading Map

| Reference

Questions fréquentes

Les mises à jour en direct sont-elles les vraies notifications ?

Non. Les événements en direct ne sont que des indices, et la boîte enregistrée fait autorité.

Le plugin ajoute-t-il la page de la boîte ?

Non. L'application possède la route et place la page.

Les petites fenêtres temporaires peuvent-elles remplacer la boîte ?

Non. La skill précise que les notifications durables ne doivent pas être remplacées par des alertes temporaires du navigateur.

Détails

Description originale de l’auteur

Use when agents need to register, verify, or diagnose the NocoBase durable in-app inbox, its development-only Client page, or realtime refresh behavior.

repo: nocobase/nocobase

Popularité

Étoiles GitHub
25k
Position au classement
#10101
Licence
—
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires