Hotpipe documentation
Type-safe real-time events for React and Next.js. Define your events with Zod, subscribe with React hooks, publish from client or server. Clients connect directly to the Hotpipe API over WebSocket — your Next.js server is never in the hot path.
When a user loads your app, the PipeProvider calls your route handler to get an auth token. Your handler checks the session and signs a JWT with pipe permissions. The client then opens a WebSocket directly to the Hotpipe API — events flow between clients and server through the API, and your Next.js server stays completely out of the loop. No long-lived connections, no Vercel cost impact.
The Hotpipe API is stateless. It handles connection management and event fan-out. Your database is the source of truth — the API doesn't persist anything.
Hotpipe requires one environment variable on your server. Never expose this on the client.
- HOTPIPE_SECRET — your secret for auth tokens and server-side publish

