meteor-pubsub

Installation
SKILL.md

Meteor publications and subscriptions

Publications stream a set of documents to subscribed clients and keep them live. The publication is the only place server-side authorization can filter rows before they reach the client.

Decision flow

  1. Does the client need this data reactively? If no, prefer a method (one-shot read). If yes, use a publication.
  2. Is the data user-specific? Filter by this.userId inside the publish function. Without that filter, documents leak across users.
  3. Can the publication be expressed as a single cursor? Return it directly.
  4. Does it need one async lookup before choosing a cursor? Use an async publish handler, await the lookup, then return the cursor.
  5. Does it need per-document async joins, custom aggregation output, or an external reactive source? Drop to the low-level this.added / this.changed / this.removed API.
Installs
33
GitHub Stars
7
First Seen
12 days ago
meteor-pubsub — meteor/agent-skills