Write apps/backend/docs/concepts-presence-heartbeat.md explaining services/presence.ts and services/heartbeat.ts — the Redis-backed per-device/per-user presence model, TTL-based liveness, the 30s/90s heartbeat timing, and how multi-device aggregation works.
Acceptance criteria:
- Explains the Redis key structure used for presence tracking (which keys exist, what each holds, TTLs)
- Explains the heartbeat timing contract with the actual current interval/timeout values
- Explains multi-device aggregation and the transition-broadcast behavior
Write
apps/backend/docs/concepts-presence-heartbeat.mdexplainingservices/presence.tsandservices/heartbeat.ts— the Redis-backed per-device/per-user presence model, TTL-based liveness, the 30s/90s heartbeat timing, and how multi-device aggregation works.Acceptance criteria: