Skip to content

Frontend Deep Dive

Domain model

The API client models users, threads, files, messages, run events, presigned uploads/downloads, and SSE events. Auth uses cookie credentials. Threads expose messages/events/files, while the planned chat stream carries selected file IDs.

UI composition

The frontend contains login, sidebar, side-panel, chat message/viewer components, live trace, user management, keyboard shortcuts, Zustand state, and TanStack Query hooks. Viewers cover CSV, code, HTML, images, Markdown, and tabular artifacts.

Stream parser

streamChat reads ReadableStream chunks, buffers incomplete lines, parses SSE event, id, and multi-line data fields, ignores comments, JSON-decodes payloads when possible, and yields normalized events. This is a strong client boundary for backend/LangGraph event evolution.

Planned first milestone

Authenticated file list, chat composer, streamed response panel, and artifact preview panel. The plan explicitly says not to make a manual code editor the main interaction surface.