I wanted to add live chat to my WordPress sites without loading a 500KB third-party script. So I built my own.
GhostChat is an open source embeddable
chat widget that runs on Cloudflare Workers and Durable Objects.
The client widget is under 10KB. Here's how it works.
The architecture
Widget: Vanilla JS, no framework, ~10KB
Backend: Cloudflare Workers + Durable Objects for persistent WebSocket connections
Payments: Stripe for the hosted tier
Self-hostable: Bring your own Cloudflare account
Why Cloudflare Durable Objects?
Durable Objects give you stateful serverless — each chat session
lives in its own DO instance. No Redis, no external DB needed for
real-time state. It's genuinely elegant for this use case.
The "bring your own agent" model
GhostChat supports a webhook architecture so you can pipe messages to any AI agent, your own backend, or a human operator.…