Back to browse
AI Chat App on Durable Streams and Tanstack DB

AI Chat App on Durable Streams and Tanstack DB

by sorenbs·Jun 12, 2026·2 points·0 comments

AI Analysis

●●●BangerWizardryBig BrainZero to One

Tokens are durable before they reach your browser — drops become impossible.

Strengths
  • Log-not-table architecture means refresh mid-stream never loses tokens.
  • TanStack DB live queries join event streams with relational metadata elegantly.
  • Open-source with detailed explainer showing full end-to-end implementation.
Weaknesses
  • AI chat is a crowded category despite the novel streaming approach.
  • ElectricSQL dependency may limit adoption for teams on other stacks.
Target Audience

Backend developers, AI infrastructure engineers

Similar To

Vercel AI SDK · LangChain · Continue

Post Description

I built an AI chat app that uses Durable Streams from ElectricSQL as both the storage format and transport medium. It has the very nice property that tokens are stored durably as they are steamed back from the LLM provider, and then streamed to the frontend for a smooth user experience.

The frontend uses Tanstack DBs differential dataflow implementation to tie together meta data from Postgres with the chat streams in the Durable Stream.

Made a detailed explainer of all the components.

Similar Projects

Developer Tools●●●Banger

Ecotokens – Another token saver for CLI Agents

PreToolUse hooks filter shell output before it hits the model, saving tokens automatically.

Big BrainSolve My Problem
ansicode
102mo ago