38 lines
806 B
Markdown
38 lines
806 B
Markdown
# web-chat-frontend
|
|
|
|
A minimal Vue chat client for nanobot WebChannel.
|
|
|
|
Now supports phone + password login before entering chat.
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
cd web-chat-frontend
|
|
npm install
|
|
cp .env.example .env
|
|
npm run dev
|
|
```
|
|
|
|
By default it connects to `http://127.0.0.1:9000`.
|
|
|
|
## Environment Variables
|
|
|
|
- `VITE_API_BASE`: WebChannel base URL
|
|
- `VITE_AUTH_BASE`: Standalone auth service base URL
|
|
- `VITE_SENDER_ID`: sender id passed to WebChannel `/message`
|
|
- `VITE_CHAT_ID`: chat id used for SSE stream and routing
|
|
- `VITE_API_TOKEN`: fixed bearer token for WebChannel auth
|
|
|
|
## Endpoints Expected From WebChannel
|
|
|
|
- `POST /message`
|
|
- `GET /events/{chat_id}` (SSE)
|
|
- `GET /history/{chat_id}`
|
|
- `GET /health`
|
|
|
|
## Endpoints Expected From Auth Service
|
|
|
|
- `POST /auth/register`
|
|
- `POST /auth/login`
|
|
- `GET /auth/me`
|