Pular para o conteúdo
Skillpedia
APIs e servidores (backend)25 mil · #10085

nocobase-realtime

O que ela faz

Esta skill orienta o desenho de atualizações ao vivo em apps e plugins NocoBase 3. Ela é indicada para desenvolvedores que querem páginas que mostrem novos dados ou o progresso à medida que acontecem.

Quando usar

  • ✓Quando você quer que uma página seja atualizada quando os registros mudam, sem fazer polling.
  • ✓Quando você precisa mostrar o progresso de uma tarefa ou notificações pessoais ao vivo.
  • ✓Quando você quer transmitir logs ou enviar atualizações ao vivo entre vários processos de servidor.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/nocobase/nocobase/blob/v3-develop/packages/libs/realtime/skills/nocobase-realtime/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Você pode fazer minha página de pedidos ser atualizada ao vivo quando um novo pedido for salvo, em vez de recarregar a cada poucos segundos?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

A IA decide qual fonte de dados é a autoritativa e então configura tópicos no servidor e hooks no cliente. Os eventos ao vivo são sinais curtos, e a página recarrega os dados reais quando necessário.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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.

Perguntas frequentes

Um evento ao vivo contém todos os dados?

Não. Os eventos são sinais curtos, e os dados duráveis continuam no serviço normal deles.

Isto é para recursos de voz da OpenAI?

Não. É para atualizações ao vivo dentro de apps NocoBase.

O que acontece quando um navegador se desconecta?

A skill cobre a recuperação por snapshot, para que a página possa se atualizar depois de reconectar.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
25 mil
Posição no ranking
#10085
Licença
—
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas