# Fresh Web Page Actor Demo

This is a fresh browser sample. It is served by Vite, not by Matrix Web,
HiveCast gateway, Host Service, or any Matrix/HiveCast HTTP service.

It uses:

- `@open-matrix/sdk` in the browser
- Vite only for static page serving and a tiny dev-only credential endpoint
- a HiveCast API key on the dev server side
- HiveCast `/api/install/actor-credential`
- NATS WebSocket for the actual actor bus

The API key is never bundled into the browser. Vite reads it from environment
variables and exchanges it for a short-lived actor credential.

## Run

```bash
export MATRIX_CLOUD=https://<your-hivecast-cloud>
export MATRIX_SPACE=<your-space-root>
export MATRIX_API_KEY=<your-hivecast-api-key>

pnpm install --frozen-lockfile
pnpm setup:browser
pnpm run doctor:hivecast
pnpm --filter matrix-sdk-demo-fresh-web-page dev
```

Open the printed Vite URL. The page mounts a browser actor and calls it over
HiveCast-backed NATS WebSocket.
