Deploy

Overview

View as MarkdownOpen in Claude

The Browser SDK runs entirely in the browser — there’s no server-side runtime to deploy. What you do deploy is the host application that loads it, plus the small backend surface that mints tokens for your users. This section covers the four things that consistently come up between “it works on my laptop” and “it works in production”:

What ships where

A Browser SDK app is split between two runtimes:

Lives in the browserLives on your backend
@signalwire/js (or @signalwire/web-components)Endpoint that mints SATs / embed tokens
Your UIYour auth / user system
WebRTC peer connection(Optionally) webhook handlers for incoming calls

The SDK never sees your SignalWire API credentials. Project ID and auth token live exclusively on the backend; the browser only ever holds a short-lived JWT it received from your token endpoint. This is the most important invariant to preserve across every framework, deployment target, and CDN setup discussed in this section.

A minimal production topology

┌─────────────────────────┐ 1. fetch("/api/sw-token") ┌──────────────────────────┐
│ Browser │ ─────────────────────────────► │ Your backend │
│ • @signalwire/js │ │ • POST /api/sw-token │
│ • Your UI │ ◄───────────────────────────── │ • mints SAT via REST │
│ │ 2. { token, expiry_at } │ • uses PROJECT creds │
│ │ │ (env var, secret) │
│ │ └──────────────────────────┘
│ │ 3. WebSocket → SignalWire ──►┌──────────────────────────┐
│ │ │ SignalWire │
└─────────────────────────┘ └──────────────────────────┘

Everything else (CDN choice, framework, SSR strategy) is a variation on this shape. The remaining pages in this section walk through the practical details of each layer.