Open Source ยท MIT License

Drop an AI chatbot into any website

Multi-provider, streaming, embeddable in one script tag. OpenAI, Anthropic, and Gemini โ€” switch with one env var.

๐ŸŽฎ Live Demo โญ View on GitHub
Embed
<!-- That's it. One tag. -->
<script src="https://your-server.com/js/widget.js"
        data-server="https://your-server.com"
        data-title="Chat with us"
        data-greeting="Hi! How can I help?"
        data-stream="true"></script>
๐ŸŸข
OpenAI
๐ŸŸ 
Anthropic
๐Ÿ”ต
Google Gemini

Built for production

๐Ÿ”Œ

Multi-Provider

OpenAI, Anthropic, and Google Gemini out of the box. Switch providers with a single environment variable. Add custom providers by implementing one interface.

โšก

Streaming

Real-time Server-Sent Events for instant, token-by-token responses. Users see the AI thinking in real time โ€” no waiting for the full response.

๐ŸŽจ

Embeddable Widget

Vanilla JavaScript, zero dependencies. One script tag to embed. CSS custom properties for theming โ€” match any brand in minutes.

๐Ÿ›ก๏ธ

Security First

Helmet security headers, CORS configuration, rate limiting, and Zod input validation on every endpoint. Production-hardened by default.

๐Ÿงช

Fully Tested

33 tests covering unit logic, middleware, config validation, and full API integration. Coverage reporting with Vitest + V8.

๐Ÿ“

Clean Architecture

Routes โ†’ Controllers โ†’ Services โ†’ Providers. Each layer has a single responsibility. Extend without touching existing code.

How it works

Widget
โ†’
Express API
โ†’
ChatService
โ†’
Provider

The widget sends messages to your Express server. ChatService resolves the configured provider and forwards the request. Responses stream back via SSE.

Quick Start

1

Clone

git clone https://github.com/devtony42/chatbot-drop.git
2

Install

cd chatbot-drop && npm install
3

Configure

Copy the example env and add your API key.

cp .env.example .env
4

Run

npm run dev

Open http://localhost:3000 โ€” the demo page has a working chat widget.