NextChat
Real-time AI chat with multi-session support on a high-performance Next.js core.
Multi-chat
parallel conversations with persistent history
Streaming
token-by-token responses for perceived speed
Reusable
component system shared across product surfaces
Tech Stack
The Challenge
Chat UX lives and dies on responsiveness and state management. Users juggle several conversations at once, expect instant feedback while the model streams, and need history that survives reloads — all on a frontend that must not refetch the world on every keystroke.
Approach
- 1
Designed the conversation model around sessions: each chat is an independent thread with its own message list, so switching chats never loses in-flight responses.
- 2
Streamed OpenAI responses token-by-token into the UI, with an abort path so users can stop a generation mid-flight.
- 3
Built the interface from reusable, themeable components so new chat features (export, editing, regeneration) dropped in without rewrites.
- 4
Tuned Next.js data fetching and rendering so cold loads stayed fast despite a rich client-side experience.
Technical Highlights
Streaming without jank
Buffered token rendering kept the message list smooth under load instead of re-rendering the full thread on every chunk.
State that survives refresh
Session metadata and history are persisted server-side and hydrated lazily, so a reload lands you exactly where you were.
What I Learned
Perceived latency matters more than actual latency in AI UX — streaming plus optimistic UI changes how fast a model feels.
A disciplined component system pays for itself the moment the product roadmap adds a feature.