Skip to content
Get the kit

Broadcasts

A broadcast is one Firestore document (a row in the broadcasts table on the Supabase stack) that renders as a banner in the popup and the side panel, with no store review in between. This is remote data, which store policy allows; remote code is not.

Firebase console → Firestore → broadcasts collection → create a doc with any ID. The ID doubles as the dismissal key: reuse an ID and users who dismissed it won’t see it again. On the Supabase stack, add a row to the broadcasts table instead; its columns are the same fields in snake case (active_from, active_until, min_version).

fieldtyperequirednotes
messagestringyesbanner text; keep it to one line
levelstringnoinfo (default) · warning · promo; styling only
linkstringnohttps only; renders as “Learn more”
activeFromnumbernoepoch ms; hidden before this
activeUntilnumbernoepoch ms; hidden after this
minVersionstringnoonly shown on extension versions ≥ this (e.g. "1.2.0")

Delete the doc (or set activeUntil in the past) to retract it. Every extension reads the whole collection, so delete retired broadcasts rather than letting them pile up.

Typical uses: incident notice (warning), launch or discount (promo with an activeUntil), feature announcements. minVersion targets newer versions, not older ranges; for “update available” nudges, announce broadly and gate the feature in code.

The background holds an onSnapshot listener on the collection (public read-only, enforced by Firestore rules) and mirrors it into storage.local.broadcasts; <BroadcastBanner> shows the first active one. Dismissals are per-message and local. Offline, the last mirrored list keeps serving. Clients can never write the collection; the rules say write: if false. On Supabase, a Realtime subscription refetches the 20 newest rows on every change, and row level security allows reads only.

The wizard’s Firebase step writes the first document for you, right after it deploys the rules: broadcasts/welcome, an info banner that says it comes from your Firestore, with a link to this page. Open the popup and it is there. Edit its message in the console and watch the banner follow; delete the document when you have seen enough. On the Supabase stack the core migration inserts the same row.

Every banner comes from that collection. Nothing is generated locally, so to announce a release, create a document when you ship it (a minVersion of the new version keeps it off installs that have not updated yet).