refactor(ui): delete legacy static website and refresh documentation
This commit is contained in:
+18
-22
@@ -7,45 +7,41 @@ sdk: docker
|
||||
app_port: 7860
|
||||
pinned: false
|
||||
short_description: Voice chat over WebSocket against a HF speech-to-speech
|
||||
hf_oauth: true
|
||||
---
|
||||
|
||||
# Realtime voice backend and retained static client
|
||||
# Realtime voice backend
|
||||
|
||||
FastAPI server and retained static voice-chat UI for an OpenAI Realtime-compatible
|
||||
speech-to-speech backend. The browser streams microphone audio over WebSocket,
|
||||
plays assistant audio, displays transcripts, and offers Spanish controls.
|
||||
FastAPI APIs and WebSocket relay for the [React voice frontend](../s2s-frontend).
|
||||
This service handles configuration, caller context, upstream authentication,
|
||||
search, reasoning, ApiPilot tools, and optional load-balancer allocation.
|
||||
|
||||
The root `start_ui.sh` now serves the [React frontend](../s2s-frontend) with
|
||||
Vite on public port `8420`, proxying backend requests here on loopback port
|
||||
`8421`. This directory's static UI remains available when FastAPI is run
|
||||
directly or through the existing Docker image.
|
||||
`8421`. The browser UI lives entirely in `s2s-frontend`; running FastAPI directly
|
||||
or through Docker exposes only backend routes and shared documentation.
|
||||
|
||||
The complete [usage guide](../docs/client/usage.md) covers local startup,
|
||||
connection modes, Docker, settings, and usage limits. See the
|
||||
connection modes, Docker, settings, and queue behavior. See the
|
||||
[documentation index](../docs/README.md), [architecture](../docs/client/architecture.md),
|
||||
and [change history](CHANGELOG.md) for implementation details and history.
|
||||
|
||||
The retained static client's assistant replies render Markdown with Marked and
|
||||
DOMPurify. Their pinned, checked-in browser modules are served from `vendor/`, including upstream
|
||||
licenses, so the UI does not require a CDN or a Node.js runtime. To refresh the
|
||||
browser dependencies with Node.js 20 or newer after updating `package.json`:
|
||||
|
||||
```bash
|
||||
cd s2s-client
|
||||
npm install --ignore-scripts
|
||||
npm run vendor
|
||||
```
|
||||
|
||||
Commit `package-lock.json` and the generated `vendor/` files together. Existing
|
||||
locked versions can be restored with `npm ci --ignore-scripts`.
|
||||
|
||||
Build from the repository root so the container includes the documentation:
|
||||
|
||||
```bash
|
||||
docker build -f s2s-client/Dockerfile -t s2s-client .
|
||||
```
|
||||
|
||||
Run the backend regression tests from the repository root after installing
|
||||
`requirements.txt` in `.venv`:
|
||||
|
||||
```bash
|
||||
.venv/bin/python -m unittest discover -s s2s-client/tests -v
|
||||
```
|
||||
|
||||
Tests isolate environment configuration, use HTTP fixtures for allocation and
|
||||
caller authentication, and start a loopback WebSocket service to verify audio
|
||||
frames, keepalive, and teardown. No deployed services or database are needed.
|
||||
|
||||
FastAPI's API explorer remains at `/docs`. Project documents are served as files below
|
||||
`/docs/client/`, `/docs/speech/`, `/docs/adr/`, `/docs/examples/`, and
|
||||
`/docs/proposals/`. The historical `/project/` and `/public/docs.html` URLs
|
||||
|
||||
Reference in New Issue
Block a user