Skip to main content
A self-contained chat widget that bundles a FastAPI backend and a Vite-built frontend into a single Docker container. Drop it onto any server, point a script tag at it, and you get either a floating chatbot (Intercom-style) or an inline embed - no Vercel account, no Node toolchain in production. Source: github.com/Vaquill-AI/integrations/widget.
If you only need a US-only marketing-site widget and prefer Vercel over Docker, the leaner Embedded Chat Widget is a better fit. Pick this one when you want self-hosting, a floating button, or a configurable jurisdiction.

What you get

  • One container: FastAPI backend serves both the JSON API and the built frontend
  • Two embed modes: floating chatbot (bottom-right bubble) or inline <div>
  • Single script tag install on the host site - no iframe required
  • Configurable widget title, host port, and CORS origins
  • Structured statute source rendering: title, section, code, jurisdiction, excerpt, link
  • Health endpoint for Docker / Kubernetes probes

Prerequisites

For Docker deployment: For local development:
  • Python 3.10+
  • Node.js 18+ and Yarn (npm install -g yarn)
  • A Vaquill API key

Quickstart

1

Clone the repo

2

Set your API key

Open .env and set:
3

Start with Docker Compose

4

Open the widget

Visit http://localhost:8000 and ask a test question.

Local development (without Docker)

Run backend and frontend in separate terminals.
Frontend dev server runs at http://localhost:5173 with hot reload.

Configuration

All configuration is via the .env file: Example production .env:
In production, always replace ALLOWED_ORIGINS=* with an explicit list of domains that should be allowed to embed the widget.

Embedding

Option 1 - Floating chatbot (Intercom-style)

Add one script tag before </body> on the host site:
A floating button appears in the bottom-right corner. Clicking it opens a slide-in chat panel.

Option 2 - Inline embed

Platform recipes

The examples/ folder in the repo has full working test pages for both embed modes.

Deployment

Behind an Nginx reverse proxy

SSL with Let’s Encrypt

Modern browsers block mixed content. If your host site is HTTPS, the widget host must be HTTPS too - or the script tag will silently fail to load.

API endpoints

The backend exposes: Example /api/chat request:
Full schema lives in the Statutes API reference.

Troubleshooting

Widget not loading
  • Run docker-compose ps to verify the container is up.
  • Check HOST_PORT in .env matches the port you are visiting.
  • Tail logs with docker-compose logs -f.
“Failed to fetch” or CORS errors
  • The data-api-url in the embed script must match the widget backend URL exactly (including scheme).
  • For testing, set ALLOWED_ORIGINS=* and restart the container.
  • In production, set ALLOWED_ORIGINS to a comma-separated list of host-site origins.
No sources in responses Docker build fails on ARM64 Macs
  • Ensure Docker Desktop’s Rosetta / ARM support is enabled.
  • Check available disk space with df -h.
Health check failing
  • Test connectivity from the container: docker-compose exec backend curl https://api.vaquill.ai/api/v1/health.
  • Verify VAQUILL_API_KEY and VAQUILL_API_URL are correct.

Embedded Chat Widget

Leaner Next.js variant pinned to the US.

Widget Pro

Multi-thread sidebar, voice mode, gamification.

Statutes API

The statutes endpoint this widget proxies.

GitHub

Source code and issue tracker.