C Concierge Documentation
Documentation

Multi‑channel messaging for small businesses, in one Cloudflare Worker.

Concierge connects WhatsApp, Instagram, catch‑all email, and a unified Discord inbox. AI or static auto‑replies, glob‑pattern routing rules, embeddable lead capture, and prepaid credit billing. Self‑host on Cloudflare or use the hosted service.

License AGPL‑3.0 Runtime Rust + WebAssembly Storage D1 · KV · Workers AI · Queues
The unified pipeline · channels → worker → actions
Inbound channels
WhatsAppPOST /webhook/whatsapp
InstagramPOST /webhook/instagram
Email (catch‑all)email() handler
Lead formPOST /lead/{slug}
Normalize
Concierge Worker
01InboundMessage  normalize
02Tenant lookup & credit check
03Reply rules · keyword + embedding match
04Persona prompt + action dispatch
05Metadata to D1 · no content
Dispatch
Outbound actions
Canned replyStatic text. Free, no AI call.
AI replyWorkers AI · llama‑4‑scout · persona + rule prompt
Forward to DiscordEmbed with Reply / Approve / Drop buttons
Forward emailReverse‑alias keeps replies routing back

Concierge is one Cloudflare Worker, deployed once, that absorbs every customer message you receive and decides what to do with it, instantly. Below is the shortest path through the docs depending on where you’re starting.

Don’t want to self‑host?

concierge.calculon.tech runs this exact stack as a managed service. Sign up, connect your channels, and start auto‑replying in minutes. 100 free replies/month · paid credit packs · email subdomains.

Features at a glance

Surface areaWhat ships in the box 12 modules
WhatsApp auto‑reply Rule‑routed canned or AI reply on every incoming WhatsApp message. Embedded Signup wires phone numbers to your shared WABA in one click.
Instagram DM auto‑reply Per‑account OAuth via Facebook Login. Page tokens encrypted in KV, rotated daily by the cron.
Reply rules Per‑channel ordered list. Keyword matchers (case‑insensitive substring) and embedding matchers (BGE cosine similarity) route to canned text or an AI prompt. Mandatory default rule.
Persona builder Tenant‑wide AI persona via curated preset, guided builder, or raw prompt. Every change runs through an async safety classifier before AI replies resume.
Email routing Catch‑all on cncg.email subdomains. Rules match on from, to, subject, body, has_attachment. Last‑match‑wins by priority.
Discord relay Unified inbox in Discord. Messages from any channel arrive as embeds with Reply Approve Drop.
Slash commands /status, /domains, /rules for managing your tenant from Discord.
Lead capture forms Embeddable phone‑number form. Submission triggers a WhatsApp send. One‑line iframe.
Onboarding wizard 5‑step guided setup at /admin/wizard for new tenants.
Localization Per‑tenant BCP‑47 locale (en-IN, en-US) drives Indian‑vs‑Western number grouping via icu4x; fluent‑rs FTL files for drop‑in new languages.
Management panel Operator dashboard at /manage/* behind Cloudflare Access. Tenant CRUD, billing, audit logs.
Billing Prepaid reply credits (100 free/mo). Razorpay for paid packs. Optimistic deduction, restored on failure.

Live captures of the public site, regenerated from the running Worker by npm run screenshots (Playwright + headless Chromium, wired through the Nix devShell).

Architecture model

Concierge runs as a single Worker. State lives in Cloudflare primitives: D1 for append‑only message metadata and billing, KV for tenant config and conversation context, Workers AI for reply generation and BGE embeddings, and Queues for the persona safety classifier. Inbound email is routed through Cloudflare Email Routing’s send_to_worker action; outbound email uses the EMAIL binding.

Tokens are encrypted at rest with AES‑256‑GCM using a single ENCRYPTION_KEY. Message content is never persisted: only metadata (channel, direction, sender, recipient, timestamp). The reverse‑alias system for email replies stores enough information in KV to route a reply back to the original sender, then expires.

i
Privacy posture

Inbound message bodies pass through the Worker but are never written to durable storage. AI replies are generated synchronously and discarded. Cloudflare retains nothing past the request lifecycle. There is a data‑deletion endpoint at /data-deletion for the metadata that is stored, plus account‑wide deletion from the admin Settings page.

Getting started

Self‑host: deploy the Worker, then walk the deployment guide. You’ll need a Cloudflare account (Workers, D1, KV, Queues, Email Routing), a Meta Developer app, and a Discord application. Razorpay is optional.

bash deploy from scratch
# 1. clone
git clone https://github.com/ananthb/concierge
cd concierge

# 2. provision Cloudflare resources
wrangler d1 create concierge
wrangler kv namespace create KV
wrangler queues create concierge-safety
wrangler queues create concierge-safety-dlq

# 3. apply migrations · D1 schema
wrangler d1 migrations apply concierge --remote

# 4. deploy · webhooks, Access, Discord wired in the deployment guide
wrangler deploy

Hosted: sign in at concierge.calculon.tech, run the onboarding wizard, and you’re live on a shared cncg.email address. The hosted service runs the same code as this repo: the difference is that we own the WABA, the Discord app, and the email domain.

Built with

  • Cloudflare Workers: Rust compiled to WebAssembly via worker-rs.
  • Cloudflare D1, KV, Workers AI, Queues, Email Routing: the entire data plane.
  • Meta Graph API: WhatsApp Business, Instagram, Facebook Login.
  • Discord Interactions API: slash commands, button callbacks, modal submissions.
  • icu4x + fluent‑rs: number/currency formatting and translation message bundles.
  • Razorpay: payment gateway for paid credit packs and email subdomain subscriptions.