Built a live visitor counter using a single Supabase RPC (no websockets, no Realtime Presence)
The RPC validates the visitor ID, upserts last_seen_at, and returns the active count in one call. Table access is fully locked down - anon can only execute the function, nothing else.
Full writeup + live demo: https://edvins.io/live-visitor-counter-nextjs-supabase