nocobase-realtime
यह क्या करती है
यह स्किल NocoBase 3 ऐप और प्लगइन में लाइव अपडेट के डिज़ाइन में मार्गदर्शन करती है। यह उन डेवलपर्स के लिए है जो चाहते हैं कि पेज नया डेटा या प्रगति तुरंत दिखाए।
कब इस्तेमाल करें
- ✓जब आप चाहते हैं कि रिकॉर्ड बदलने पर पेज अपने-आप अपडेट हो, बिना पोलिंग के।
- ✓जब आपको काम की प्रगति या निजी सूचनाएँ लाइव दिखानी हों।
- ✓जब आप लॉग स्ट्रीम करना चाहें या कई सर्वर प्रोसेस में लाइव अपडेट भेजना चाहें।
Skill का लिंक
https://github.com/nocobase/nocobase/blob/v3-develop/packages/libs/realtime/skills/nocobase-realtime/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप मेरे orders पेज को लाइव बना सकते हैं, ताकि नया ऑर्डर सेव होते ही वह अपने-आप अपडेट हो जाए, हर कुछ सेकंड में रीलोड न करना पड़े?”
हर हफ़्ते 5 नई skills, 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 की voice सुविधाओं के लिए है?
नहीं। यह NocoBase ऐप्स के अंदर लाइव अपडेट के लिए है।
जब ब्राउज़र कनेक्शन टूट जाता है तो क्या होता है?
स्किल snapshot recovery बताती है, ताकि कनेक्शन लौटने पर पेज छूटा हुआ डेटा पकड़ ले।
जानकारी
लेखक का मूल विवरण
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
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
nocobase-app-development
25kयह आपके एजेंट को पूर्ण NocoBase 3 व्यावसायिक एप्लिकेशन के लिए पेज, routes, डेटा, अनुमतियाँ और टेस्ट बनाने में मदद करती है।
shadcn
25kयह आपके एजेंट को वेब प्रोजेक्ट में shadcn/ui कंपोनेंट खोजने, जोड़ने, ठीक करने और स्टाइल करने में मदद करती है, उनके आधिकारिक दस्तावेज़ और registries का उपयोग करके।
nocobase-app-plugin-development
25kयह आपके एजेंट को मौजूदा NocoBase 3 ऐप के भीतर plugins बनाने और उनकी देखभाल करने में मदद करती है, जिसमें server, client, database और registration के हिस्से शामिल हैं।
nocobase-app-upgrade
25kयह आपके एजेंट को NocoBase ऐप को नए template रिलीज़ तक अपग्रेड करने में मदद करती है, template के बदलाव लाते हुए आपका अपना काम बनाए रखते हुए।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।