Real-time updates for the projects module, backed by
PhoenixKit.PubSub.Manager.
Topics
"projects:all"— any project/template/task/assignment mutation"projects:tasks"— task library mutations"projects:templates"— template project mutations"projects:project:<uuid>"— updates scoped to one project
Events
Messages are {:projects, event_atom, payload_map} tuples.
Tenant scoping (deferred)
Topics are global today. PhoenixKit core does not currently expose
a per-tenant Scope.organization_id or equivalent, and no other
feature module (locations, staff, sync, …) does multi-tenant
PubSub partitioning either — so this is a framework-wide gap, not
a projects-specific one.
When core grows tenant scoping, the right shape here is to thread
the org/tenant key into every topic
("projects:org:<org_id>:all", etc.) and have subscribe/1 raise
if the scope is missing. Until then, the :project:<uuid> topic
is the only one safe against cross-tenant fan-out (you need the
UUID to subscribe), and the :all / :tasks / :templates
topics deliberately broadcast across all subscribers.
Summary
Functions
Broadcasts an assignment event to the all-projects and the parent project's topic.
Broadcasts a dependency event to the all-projects and the parent project's topic.
Broadcasts a project event. Templates also fan out to the templates topic.
Broadcasts a task-library event to the all-projects and tasks topics.
Subscribes the calling process to the given PubSub topic.
Topic for any project, template, task, or assignment mutation.
Topic scoped to a single project.
Topic for task-library mutations.
Topic for template-project mutations.
Functions
Broadcasts an assignment event to the all-projects and the parent project's topic.
Broadcasts a dependency event to the all-projects and the parent project's topic.
Broadcasts a project event. Templates also fan out to the templates topic.
Broadcasts a task-library event to the all-projects and tasks topics.
Subscribes the calling process to the given PubSub topic.
Topic for any project, template, task, or assignment mutation.
Topic scoped to a single project.
Topic for task-library mutations.
Topic for template-project mutations.