nocobase-realtime
ما الذي تفعله
توجه هذه المهارة تصميم التحديثات الفورية في تطبيقات وإضافات NocoBase 3. وهي مخصصة للمطورين الذين يريدون أن تعرض الصفحات بيانات جديدة أو التقدم لحظة حدوثه.
متى تستخدمها
- ✓عندما تريد أن تتحدث صفحة عند تغيّر السجلات دون استطلاع متكرر.
- ✓عندما تحتاج إلى عرض تقدم مهمة أو إشعارات شخصية بشكل فوري.
- ✓عندما تريد بث السجلات أو إرسال تحديثات فورية عبر عدة عمليات خادم.
رابط المهارة
https://github.com/nocobase/nocobase/blob/v3-develop/packages/libs/realtime/skills/nocobase-realtime/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“هل يمكنك جعل صفحة الطلبات لدي تتحدث فورًا عند حفظ طلب جديد، بدل إعادة التحميل كل بضع ثوان؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يقرر الذكاء الاصطناعي مصدر البيانات الموثوق، ثم يضبط موضوعات الخادم وخطافات العميل. الأحداث الفورية مجرد تلميحات، وتعيد الصفحة تحميل البيانات الحقيقية عند الحاجة.
المحتوى التقني (ملف 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
- الترخيص
- —
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
nocobase-app-development
25kيساعد وكيلك على بناء صفحات ومسارات وبيانات وصلاحيات واختبارات لتطبيق أعمال كامل على NocoBase 3.
shadcn
25kيساعد وكيلك على إيجاد مكونات shadcn/ui وإضافتها وإصلاحها وتنسيقها في مشروع ويب، باستخدام وثائقها الرسمية وسجلاتها.
nocobase-app-plugin-development
25kيساعد وكيلك على إنشاء إضافات NocoBase 3 وصيانتها داخل تطبيق موجود، بما في ذلك أجزاء الخادم والعميل وقاعدة البيانات والتسجيل.
nocobase-app-upgrade
25kيساعد وكيلك على ترقية تطبيق NocoBase إلى إصدار أحدث من القالب، فيأخذ تغييرات القالب ويحتفظ بعملك الخاص.
مهارات مشابهة
api-connector-builder
280kيبني وكيلك اتصالات API جديدة على النمط الموجود، ويفيد عندما تحتاج إلى تكامل إضافي دون ابتكار طريقة جديدة للعمل.
api-design
280kيساعد وكيلك على تصميم واجهات REST API وفق أفضل الممارسات، ويوضح كيف تتواصل وكيف تُعرض الأخطاء وكيف تُنظَّم البيانات.
backend-patterns
280kيساعد وكيلك على أنماط بنية الخادم وتحسين قاعدة البيانات، ويفيد في بناء الشيفرة التي تعمل على الخادم أو مراجعتها.