{"repo":"akshat-OwO/z1-chat","free":true,"listed":false,"github":"https://github.com/akshat-OwO/z1-chat","clone":"git clone https://github.com/akshat-OwO/z1-chat.git","description":"A next-generation chat application that demonstrates how to build scalable, real-time applications with resumable AI streaming","language":"TypeScript","stars":23,"topics":["ai","postgres","redis","tanstack-start","zero"],"license":"MIT","category":"databases-storage","readme_excerpt":"z1-Chat 🚀 Built for Cloneathon - A real-time multi-user chat application with resumable LLM streaming A next-generation chat application that demonstrates how to build scalable, real-time applications with resumable AI streaming . Built with Zero's sync engine for insane scalability and PostgreSQL for rock-solid persistence. ✨ Key Features - 🔄 Resumable AI Streaming - Reload the page mid-response? No problem, the stream continues seamlessly - 🧠 Multiple LLM Models - Powered by OpenRouter with support for various AI models - 🔐 Flexible Authentication - Support for both authenticated and anonymous users - 📱 Modern UI - Clean, responsive interface built with React and Tailwind CSS - ⚡ Lightning Fast - Optimized for performance with minimal database operations 🏗️ Architecture This project showcases an innovative streaming architecture that solves the challenge of resumable LLM responses at scale : The Problem Streaming every token through PostgreSQL/Zero isn't scalable. But users expect real-time updates and resumable streams. The Solution A hybrid approach using Redis for streaming state and PostgreSQL for persistence : 1. Start Stream : Insert message with isStreaming: true and empty content into PostgreSQL 2. Real-time Sync : Zero immediately syncs this \"streaming\" message to all connected clients 3. Token Streaming : Client opens SSE connection for that specific message (not the entire chat) 4. Redis Buffering : Stream tokens are stored in Redis and sent via Server-Sent","default_branch":null,"files":null,"tree":[],"storefront":"/r/akshat-OwO","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/akshat-OwO/z1-chat/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}