Who's viewing this page, right now

A live roster built on the SSE presence topic. Each open connection joins the "presence-demo" topic; the server pushes an updated avatar stack to every viewer when someone joins or leaves.

Viewing now

No one is here yet. Open this page in a second browser to see a viewer appear live.

Try it

  • Open this URL in a second browser (or a private window). A second avatar appears within a second.
  • Close the second tab. Its avatar drops from the roster.
  • Two tabs of the SAME browser share one session, so they show as one viewer (correct: it's the same person).

How identity works

The name under each avatar is SERVER-DERIVED. On an authenticated app it comes from the request-context user (battery/auth); this demo site has no auth, so each browser gets a stable pseudo-identity synthesized from its session id. A client can name a topic but can never claim another user's identity.

This demo configures no fanout, so its roster reflects only connections on this server. Configure framework.WithFanout in your app to aggregate presence rosters across replicas; see the Presence guide.