Back to architecture
live

Embeddable Widget

One snippet drops the chat onto any customer site.

A single script tag mounts the chat on any website. The embed route hands the widget a scoped session token, so the same ChatWidget that powers the dashboard preview runs live on customer sites with no extra build step.

Data flow

How the pieces connect and where data moves.

Components: Customer site (one snippet), Widget loader (script tag), Embed route (issues session token), Chat widget (ChatWidget), Chat API (FastAPI). Connections: Customer site to Widget loader for loads script; Widget loader to Embed route for requests widget; Embed route to Chat widget for session token; Chat widget to Chat API for chat; Chat API to Chat widget for reply.

Loading data-flow map

Behavior

How it behaves step by step over time.

Loading behavior diagram
The customer site loads the snippet, which asks the embed route for the widget. The embed route mounts the chat widget with a scoped session token; the widget then exchanges messages with the chat API and streams replies back to the visitor.