# Mission: BroadcastChannel

## Why
As a frontend engineer, you want durable judgment about **same-origin multi-tab pub/sub** — not a one-off `new BroadcastChannel` tutorial. When a feature needs multi-tab logout, theme sync, or “data changed — refetch,” you should pick `BroadcastChannel` only when light messaging is enough, defend that choice against SharedWorker / storage events / service-worker clients, and spot deal-breakers early (no shared process, not server truth, origin + channel name rules).

## Success looks like
- Given a product requirement, choose among BroadcastChannel, SharedWorker, dedicated worker, service worker clients, `localStorage` + `StorageEvent`, and `sessionStorage` (and say why)
- Know what BroadcastChannel gives you (same-origin named channel, structured-clone messages, windows + workers) — and what it does not (no shared memory, no single coordinator process, not authoritative server state)
- Spot deal-breakers early (cross-origin, large payload bus, leader election that needs a process, treating notify as persistence)
- Defend the choice in a design review with clear “notify vs shared process” constraints

## Status
**Complete** — lessons 1–4 done (lesson-first path; external primaries optional). Keep `reference/decision-playbook.html` + `integration-checklist.html` + `core-api.html` for design reviews.

## Constraints
- Frontend-first: system design decisions and browser APIs
- Sibling to Web Workers (lesson 5 already placed BC on the multi-tab map), Session Storage, and Service Workers: decision fluency first; API mechanics after the map
- Short interactive lessons; optimize for retention over speed
- Learner already has multi-tab decision framing from Web Workers; do not re-teach SharedWorker from zero

## Out of scope
- Full SharedWorker / service worker implementation depth (comparison only; other tracks own those)
- Building a multiplayer product architecture or CRDT layer
- Cross-origin messaging (`window.postMessage` / MessageChannel ports) as the primary focus
- Server-side realtime (SSE/WebSocket) beyond “BC is not your source of truth”
