Quick Start
Prerequisites
Section titled “Prerequisites”- A domain on Cloudflare (with Email Routing enabled)
- Bun installed
- Wrangler CLI authenticated (
wrangler login)
1. Clone and install
Section titled “1. Clone and install”git clone https://github.com/AppulseSoftware/chatterbox3000.gitcd chatterbox3000bun install2. Create D1 database
Section titled “2. Create D1 database”cd workerwrangler d1 create email-gatewayCopy the database_id from the output into worker/wrangler.toml.
3. Configure environment
Section titled “3. Configure environment”Create a worker/.dev.vars file (for local development):
AUTH_TOKEN=generate-a-random-secret-hereDESTINATION_EMAIL=your-real@email.comFor production, use Wrangler secrets:
wrangler secret put AUTH_TOKENwrangler secret put DESTINATION_EMAIL4. Run migrations
Section titled “4. Run migrations”# Local developmentbun run db:migrate:local
# Productionbun run db:migrate:remote5. Deploy the worker
Section titled “5. Deploy the worker”bun run deploy6. Set up DNS
Section titled “6. Set up DNS”Point your domain’s MX records to Cloudflare Email Routing:
MX yourdomain.com → route1.mx.cloudflare.net (priority 1)MX yourdomain.com → route2.mx.cloudflare.net (priority 2)MX yourdomain.com → route3.mx.cloudflare.net (priority 3)Then configure a catch-all or specific address route in Cloudflare Email Routing to point to your worker.
7. Build and install the Chrome extension
Section titled “7. Build and install the Chrome extension”cd extensionbun run buildThen in Chrome:
- Go to
chrome://extensions/ - Enable “Developer mode”
- Click “Load unpacked” and select the
extension/distfolder
8. Configure the extension
Section titled “8. Configure the extension”- Click the Chatterbox3000 icon to open the side panel
- Go to Settings
- Enter your worker URL and auth token
- Click Save & Connect
You’re all set! Incoming emails will now flow through the gateway.