realtime
Browse all articles, tutorials, and guides about realtime
2posts
Posts
⌘K
DevOps
|9 min read
Realtime Chat With Auth: Next.js, Neon Auth, and WebSockets
A WebSocket cannot carry an Authorization header, so how do you know who is on the other end? This build-log wires a realtime chat where every socket is authenticated with a Neon Auth JWT, verified before the connection is accepted, and fanned out across isolates with Postgres LISTEN/NOTIFY. Real code, the security gotcha that matters, and the test output that proves it.
DevOps
|9 min read
Realtime Without a WebSocket Service
Live counters, presence, notifications: the reflex is to add a websocket service to run and pay for. But if your data already lives in Postgres, it has a pub/sub built in. Here is realtime fan-out with Postgres LISTEN/NOTIFY and SSE on a Neon Function, tested with two live subscribers.