Zum Inhalt springen
Skillpedia
APIs & Server (Backend)25k · #10085

nocobase-realtime

Was er macht

Dieser Skill führt beim Entwurf von Live-Updates in NocoBase-3-Apps und Plugins. Er ist für Entwickler, deren Seiten neue Daten oder Fortschritte sofort anzeigen sollen.

Wann du ihn nutzt

  • ✓Wenn sich eine Seite aktualisieren soll, sobald Datensätze geändert werden, ohne Polling.
  • ✓Wenn du den Fortschritt von Aufgaben oder persönliche Benachrichtigungen live zeigen musst.
  • ✓Wenn du Logs live streamen oder Live-Updates über mehrere Serverprozesse senden möchtest.

Link zum Skill

https://github.com/nocobase/nocobase/blob/v3-develop/packages/libs/realtime/skills/nocobase-realtime/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/nocobase/nocobase/blob/v3-develop/packages/libs/realtime/skills/nocobase-realtime/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Kannst du meine Bestellseite live aktualisieren lassen, wenn eine neue Bestellung gespeichert wird, statt sie alle paar Sekunden neu zu laden?”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Die KI entscheidet, welche Datenquelle maßgeblich ist, und richtet dann Server-Topics und Client-Hooks ein. Live-Ereignisse sind kurze Hinweise, und die Seite lädt bei Bedarf die echten Daten nach.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

NocoBase Realtime

Use the installed package declarations as the API authority. Applications reuse the host server service through realtimeServiceToken from @nocobase/app-server/realtime and the host browser client through @nocobase/app-client. Do not create a socket or service per component. In a source workspace, this Skill lives under packages/libs/realtime/skills/nocobase-realtime; in generated applications, package Skills are synchronized copies.

Choose the data contract first

Identify the authoritative snapshot endpoint, its access policy, the committed writes that announce changes, and how a disconnected client catches up. Realtime events are transient hints; durable business data remains in its owning service. A successful publication means broker admission, not browser processing. Prefer small invalidations containing a record ID or revision over copying protected record contents into an event.

  • Read server integration for topic declaration, resource authorization, transaction boundaries, limits and distributed deployment.
  • Read client integration for query correctness, coalesced refresh, readiness, errors, manual retry and cleanup.
  • Read business scenarios when choosing between snapshots, cursors, progress and periodic reconciliation.
  • Read verification for meaningful acceptance cases and adapter recovery tests.

Boundaries to preserve

Register topics during provider boot and release them during shutdown. Unknown topics are denied. A user topic derives the subscriber's user from the authenticated connection; publishing uses the intended recipient, never a user ID supplied as subscription authority by the browser. Resource families reuse the HTTP endpoint's policy and recheck it on delivery.

Publish only after commit. Treat a notification failure separately from an already successful write; use the domain's durable job/outbox when announcements must be retried. Never skip distributed publication because this process has no subscribers. eventId supports tracing and bounded duplicate suppression; business revisions and persisted cursors own ordering and gap recovery.

Read snapshots after the topic's onReady, including initial subscription and reconnect. Transport onOpen is too early. For TanStack Query use refreshRealtimeQueries, which waits for pre-event reads and follows them with a new read. Return the actual refresh promise to the scheduler so failures and trailing events are observed.

Remove a poll only after identifying all its producers and failure recovery. Time-based expiry, external systems without announcements, bounded initialization waits and failed best-effort publication can still require reconciliation. A healthy WebSocket alone does not prove the snapshot is fresh.

Häufige Fragen

Enthält ein Live-Ereignis alle Daten?

Nein. Ereignisse sind kurze Hinweise, die dauerhaften Daten bleiben in ihrem normalen Dienst.

Ist das für OpenAI-Sprachfunktionen?

Nein. Es ist für Live-Updates innerhalb von NocoBase-Apps gedacht.

Was passiert, wenn ein Browser die Verbindung verliert?

Der Skill behandelt die Wiederherstellung per Snapshot, damit die Seite nach dem Neuverbinden aufholen kann.

Details

Originalbeschreibung des Autors

Design and implement live updates in NocoBase 3 applications and plugins using @nocobase/realtime, host client hooks and authorized server topics. Use for replacing business polling, snapshot recovery, task progress, personal notifications, streamed logs or multi-process fan-out. Not for OpenAI audio Realtime APIs.

repo: nocobase/nocobase

Beliebtheit

GitHub-Sterne
25k
Platz im Ranking
#10085
Lizenz
—
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills