Assignment Realtime Subscription
Component Detail
Infrastructure
medium complexity
mobile
0
Dependencies
0
Dependents
2
Entities
0
Integrations
Description
Supabase Realtime subscription manager that streams assignment state changes to coordinator clients without polling. Manages subscription lifecycle (connect, reconnect, teardown) and filters change events by the coordinator's organizational scope using Postgres channel filters.
assignment-realtime-subscription
Responsibilities
- Establish and maintain Supabase Realtime channel for assignments table
- Filter incoming events to coordinator's team or organization scope
- Reconnect automatically on network interruption
- Dispatch state update events to the tracking service
Interfaces
subscribe(organizationId, onUpdate)
unsubscribe(channelId)
reconnect(channelId)
getSubscriptionStatus(channelId)
filterEventsByScope(event, scope)
Related Data Entities (2)
Data entities managed by this component