Examples

This section provides complete integration examples for different architectures. Each example walks through building a functional chat interface from scratch.

Available Examples

ExampleTransportBest For
Next.js ChatHTTP/SSENext.js, Remix, standard web apps
Socket ChatSockJSMeteor, Phoenix, real-time apps

Choosing a Transport

Use HTTP Transport when:

  • Building with Next.js, Remix, or similar frameworks
  • You want the simplest integration
  • Deploying to serverless (Vercel, Netlify, etc.)

Use Socket Transport when:

  • Using Meteor, Phoenix, or socket-based frameworks
  • Need custom real-time events (typing indicators, presence)
  • Behind proxies that don't support SSE well