WebX11 Chat Widget 1.0.0
A single-file AI chat widget you drop onto your own website. It renders a floating bubble, streams answers token-by-token from an Ollama-compatible endpoint, formats links/e-mails/phone numbers, offers quick-reply chips, and goes fullscreen on phones. No build step, no framework, no external CDN, no tracking, no cookies.
What you receive
| Item | File |
|---|---|
| Widget source (HTML + CSS + JS in one file) | src/widget.html |
| Configuration template with every option documented | src/config.example.js |
| This README + license + changelog | README.md, LICENSE, CHANGELOG.md |
| Setup guide, embed snippet, troubleshooting | docs/USAGE.md |
| 30 days of setup help by e-mail after purchase | included with the Setup Package |
You do not receive a hosted service, a model, or an API key. The widget is a front end: it calls an endpoint that you own and operate. That is deliberate — your conversations and your key stay on your infrastructure.
Requirements
- Any static web host (or an existing site — the widget is a fragment you paste in).
- An Ollama-compatible endpoint reachable over HTTPS that accepts
POST {"model": "...", "prompt": "...", "stream": true}and returns newline-delimited JSON with aresponsefield. - That endpoint must allow your website's origin (CORS). See
docs/USAGE.md→ Troubleshooting.
Install in 3 steps
- Copy the files. Put
src/widget.htmland a copy ofsrc/config.example.jsrenamed toconfig.jsin the same directory on your server. - Edit
config.js. Setendpointto your gateway (for examplehttps://YOUR-HOST/ollama), setmodel,title,accentColor,welcomeMessageandsystemPrompt. Never put an API key in this file. - Open or embed. Visit the page, or paste the widget block from
src/widget.htmlplus the two<script>tags into your existing template. Done.
Full instructions: docs/USAGE.md.
Configuration at a glance
| Key | Default | Purpose |
|---|---|---|
endpoint |
'' (required) |
Your gateway base URL; /api/generate is appended |
model |
llama3.2:latest |
Model name as your backend knows it |
title |
Chat with us |
Header text |
accentColor |
#00e5a0 |
Brand colour; readable text colour is chosen automatically |
welcomeMessage |
Hi! How can I help you today? |
First message in the transcript |
inputPlaceholder |
Type your message… |
Input hint |
systemPrompt |
generic assistant | The assistant's instructions |
promptUrl / promptVersion |
'' |
Optional: load the prompt from a text URL |
chips |
[] |
Quick-reply buttons [label, message] |
position |
right |
right or left |
statusLine |
true |
Show the Model: … line |
idleTimeoutMs |
60000 |
Abort if the gateway sends nothing for this long |
Known limitations (be aware before you buy)
- There is no conversation history: each message is sent with the system prompt plus that one question. The model does not see earlier turns.
- There is no server component in this package. You supply the endpoint; the key lives there, not in the browser.
- There is no persistence: nothing is written to
localStorageor cookies, so the transcript is gone on reload (and there is no cookie banner to add). - Markdown support is intentionally minimal: bold, italic, inline code, links, line breaks.
- The widget is an inline
<style>+<script>block, so a host page with a strict Content-Security-Policy must allow those blocks (hash/nonce) or serve them as files from its own origin. It uses noeval, no CDN and no third-party requests.
License
Commercial license — see LICENSE. Use it on sites you own or operate; you may not resell or redistribute the widget itself as a product.
Support
30 days of setup help are included with the Setup Package. Reply to your purchase receipt with the URL where you installed the widget and the exact error text (browser console + network tab) — that is usually enough to diagnose CORS and endpoint issues in one round trip.