tRPC SSE ChatSource
Server-sent Events

tRPC SSE Chat

A chat on TanStack Start where new messages and typing indicators arrive through tRPC subscriptions over Server-sent Events.

How it works
  • Open the inspector's Network tab: every request goes over HTTP, and subscriptions are EventStream responses
  • post.onAdd adds new messages as they're posted, and resumes from the last event id after a reconnect
  • channel.whoIsTyping shows who's writing in each channel
Channels
Pick one to start chatting.