Add web frontend
This commit is contained in:
38
web/README.md
Normal file
38
web/README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Sybil Web
|
||||
|
||||
Preact + Vite frontend for the Sybil backend.
|
||||
|
||||
## Setup
|
||||
|
||||
1. Copy env values:
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
2. Install and run:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Default dev URL: `http://localhost:5173`
|
||||
|
||||
## Environment variables
|
||||
|
||||
- `VITE_API_BASE_URL`: backend API base URL. Defaults to `http://localhost:8787`.
|
||||
- `VITE_ADMIN_TOKEN`: optional. Pre-fills a token in the login form.
|
||||
|
||||
## Authentication
|
||||
|
||||
- On startup, the app checks `GET /v1/auth/session`.
|
||||
- If backend runs with `ADMIN_TOKEN`, sign in using that token.
|
||||
- If backend runs in open mode (`ADMIN_TOKEN` unset), you can continue without a token.
|
||||
- The entered token is stored in browser `localStorage` and can be cleared via Logout.
|
||||
|
||||
## UI
|
||||
|
||||
- Left panel: conversation list + new chat.
|
||||
- Right panel: selected transcript + model controls + composer.
|
||||
- Sending a message uses `POST /v1/chat-completions` and then refreshes chat history from the backend.
|
||||
Reference in New Issue
Block a user