Rebuild frontend in React, add doc/session management, fix broken deps
beerohan
dd4a03a
Frontend rebuilt as a React + Vite + TypeScript SPA, replacing the vanilla
JS/CSS app. Adds dark mode, a document list with per-document delete,
multi-file upload, cancellable streaming, and chat history that survives a
page reload. Served by FastAPI from static/, which is now a build artifact
produced by the Node stage of a multi-stage Dockerfile.
Backend additions:
- DELETE /documents/{name} removes a single document from the Chroma index
- Chat history persisted to SQLite (app/services/history_service.py) with
GET/PATCH/DELETE /sessions routes; transcripts survive process restarts
Performance:
- /stream_query fetched citation sources by calling query() a second time,
running a full LLM generation whose text was discarded. Replaced with a
retrieval-only path, saving ~0.6s and one Groq call per message.
- Embedding model is warmed during startup so the first request no longer
pays the model-load cost.
Pre-existing breakages fixed:
- requirements.txt pinned llama-index-embed…