The widget connects through a proxy server that keeps the gateway auth token server-side. No token ever appears in client-side code or browser DevTools.
ws://localhost:3100/ws
connect frame (no token)
GOCLAW_TOKEN from env, forwards to gateway
# 1. Configure the proxy server
cd server/
cp .env.example .env
# Edit .env: set GOCLAW_URL and GOCLAW_TOKEN
# 2. Install deps & start the proxy
npm install
npm run dev
# 3. Build the widget (from project root)
cd ..
npm run build
# 4. Open this page in a browser
GoClaw.init({
url: 'ws://localhost:3100/ws', // proxy server — no token needed!
title: 'Chat with us',
theme: 'auto',
});