Real-time sync uses Firestore's native onSnapshot listeners on every client surface — the React Native app, the React coach portal, and any admin tools the studio builds. The architectural choice is to use Firestore as the message bus rather than build one.
What that looks like in practice
When a member finishes a set on the watch and it writes to Firestore via the phone, the same record streams to the coach's open dashboard within roughly 100–300 milliseconds, depending on network. There's no separate WebSocket server, no Redis pub-sub, no Pusher channel — Firestore is the message bus.
Security rules carry the scope
Security rules ensure each listener only receives data scoped to that user's tenant. A coach's dashboard listener fires only on documents under their roster. A member's app listener fires only on their own programmes and workouts. The rule layer is the same code path that protects writes.
Where ordering matters
For features that need stronger ordering guarantees — programme edits with conflict resolution, sequential workout completion — the studio uses Firestore transactions. A transaction reads the current version, validates it hasn't changed, and writes the new one. If a transaction loses, the client retries or surfaces a conflict toast.
