본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)25k · #10085

nocobase-realtime

하는 일

이 스킬은 NocoBase 3 앱과 플러그인의 실시간 업데이트 설계를 안내합니다. 새 데이터나 진행 상황을 일어나는 대로 페이지에 보여 주고 싶은 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓폴링하지 않고 레코드가 바뀔 때 페이지가 업데이트되기를 원할 때.
  • ✓작업 진행 상황이나 개인 알림을 실시간으로 보여 줘야 할 때.
  • ✓여러 서버 프로세스에 걸쳐 로그를 스트리밍하거나 실시간 업데이트를 보내고 싶을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

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.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“새 주문이 저장될 때 주문 페이지가 실시간으로 업데이트되도록 해 주실 수 있나요? 몇 초마다 새로 고치지 않게요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 어떤 데이터 소스가 권위 있는지 정한 뒤, 서버 토픽과 클라이언트 훅을 설정합니다. 실시간 이벤트는 짧은 힌트이며, 필요할 때 페이지가 실제 데이터를 다시 불러옵니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.

자주 묻는 질문

실시간 이벤트에 모든 데이터가 들어 있나요?

아니요. 이벤트는 짧은 힌트이며, 지속되는 데이터는 원래 서비스에 남습니다.

OpenAI 음성 기능용인가요?

아니요. NocoBase 앱 안의 실시간 업데이트를 위한 것입니다.

브라우저 연결이 끊기면 어떻게 되나요?

스킬은 재연결 후 페이지가 놓친 내용을 따라잡을 수 있도록 스냅샷 복구를 다룹니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
25k
순위
#10085
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬