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:- Docker 20.10+ and Docker Compose (download)
- A Vaquill API key (
vq_key_...) from app.vaquill.ai/settings/api
- 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
.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.http://localhost:5173 with hot reload.
Configuration
All configuration is via the.env file:
Example production
.env:
Embedding
Option 1 - Floating chatbot (Intercom-style)
Add one script tag before</body> on the host site:
Option 2 - Inline embed
Platform recipes
examples/ folder in the repo has full working test pages for both embed modes.
Deployment
Docker Compose (recommended)
Behind an Nginx reverse proxy
SSL with Let’s Encrypt
API endpoints
The backend exposes:
Example
/api/chat request:
Troubleshooting
Widget not loading- Run
docker-compose psto verify the container is up. - Check
HOST_PORTin.envmatches the port you are visiting. - Tail logs with
docker-compose logs -f.
- The
data-api-urlin 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_ORIGINSto a comma-separated list of host-site origins.
- Try a more specific legal query (cite a statute or doctrine by name).
- Verify the API key at app.vaquill.ai/settings/api.
- Ensure Docker Desktop’s Rosetta / ARM support is enabled.
- Check available disk space with
df -h.
- Test connectivity from the container:
docker-compose exec backend curl https://api.vaquill.ai/api/v1/health. - Verify
VAQUILL_API_KEYandVAQUILL_API_URLare correct.
Related
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.

