How to build a live visitor counter with Next.js and Supabase

Build a live "active now" visitor counter in Next.js using Supabase, Postgres RPC, anonymous browser IDs, and a simple heartbeat.