Skip to content
Skillpedia
APIs & servers (backend)25k · #10085

nocobase-realtime

What it does

This skill guides the design of live updates in NocoBase 3 apps and plugins. It is for developers who want pages to show new data or progress as it happens.

When to use it

  • ✓When you want a page to update when records change, without polling.
  • ✓When you need to show task progress or personal notifications live.
  • ✓When you want to stream logs or send live updates across several server processes.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/nocobase/nocobase/blob/v3-develop/packages/libs/realtime/skills/nocobase-realtime/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Can you make my orders page update live when a new order is saved, instead of reloading every few seconds?”

5 new skills a week. 1 minute to read.

How it works

The AI decides which data source is authoritative, then sets up server topics and client hooks. Live events are short hints, and the page reloads the real data when needed.

Technical content (original SKILL.md)

Original text by the author, straight from 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.

FAQ

Does a live event contain all the data?

No. Events are short hints, and the durable data stays in its normal service.

Is this for OpenAI voice features?

No. It is for live updates inside NocoBase apps.

What happens when a browser disconnects?

The skill covers snapshot recovery so the page can catch up after reconnecting.

Details

Original description by the author

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

Popularity

GitHub stars
25k
Ranking position
#10085
License
—
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills