Standalone demo · single HTML file

An AI chat in a tiny iPhone, with no build step.

Drop this file on any static host, or run npm run dev and open localhost:3000/chat-demo.html so the widget hits same-origin /api/chat. Live hosted copy: publishd.app/chat-demo.html — streams from our API; visitors never paste a key (Groq stays in server env). From other domains, set CHAT_WIDGET_ALLOWED_ORIGINS on the host. Offline / blocked → short canned demo.

File in repo: public/chat-demo.html

Download this HTML file

Stack

One .html file. No bundler, no React — bezel PNG is embedded as base64. Pure HTML + CSS + vanilla JS.

Phone frame

Transparent PNG bezel (embedded as base64). Same 84.33% × 92.5% screen inset as the real site.

Streaming

POSTs to same-origin /api/chat on publishd.app, www, or localhost dev — otherwise https://publishd.app/api/chat. No key in the file.

Persistence

Messages only in localStorage on the visitor's device. Clear with the refresh icon in the chat header.