chat-application-architecture
End-to-end architecture of a conversational AI application in TypeScript with NestJS, Prisma, PostgreSQL and a Nuxt client - performance first (time-to-first-token, fast thread list and open, coalesced streaming writes, responsive long threads), projects that group conversations with shared instructions and reference files, conversation and message-tree data model with edit/regenerate branching, typed message parts, run records and status lifecycle, idempotent sends, server-owned truth versus optimistic client state, request flow, stop/regenerate/edit/retry semantics, attachments, titles, deletion, per-conversation model selection, and instruction layering. Provider-agnostic. Load when designing or reviewing the data model, API, performance, or request flow of a chat application.
Pinned to revision c74eff4a9f08, so it is the text this page describes rather than whatever the author pushed since.
Files
Every link opens the file at its source, pinned to the revision this page describes.