diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index f12dd42..e6faa25 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -8,7 +8,7 @@ frontend (same origin, no CORS). Persistence is SQLite via Bun's native browser ──► Bun.serve (src/index.ts) ├─ /api/* ──► auth gate ──► routes ──► db.ts ──► kisassistant.db │ └─────► DriverRegistry ──► ollama / APIs - └─ /* ──► static files + SPA fallback (index.html, covers /share/:id) + └─ /* ──► static files + SPA fallback (index.html, covers /share/:id and /chat/:id) ``` ## Request flow: chat diff --git a/docs/FRONTEND.md b/docs/FRONTEND.md index e59d9f2..5064506 100644 --- a/docs/FRONTEND.md +++ b/docs/FRONTEND.md @@ -15,6 +15,10 @@ No router library — a tiny history wrapper (`lib/route.ts`: `navigate()`, - `/register` — full-page self-registration (`RegisterPage.tsx`; key shown once, then hands username+key to `/login` via `sessionStorage`). No splash. - `/chat` — the platform itself (auth required; boots behind the splash). + Bare `/chat` is the empty composer (new chat, created lazily on first send). +- `/chat/:id` — one conversation page (deep-linkable, back/forward supported). + Selecting a chat navigates there; unknown ids bounce back to `/chat`. + Archived chats are viewed read-only on bare `/chat` (no per-id URL). - `/` — redirects to `/chat` when logged in, `/login` otherwise (placeholder for a future landing page). - Public routes (unchanged): `/share/:publicId`, `/reset/:token`,