Professional shared inbox workspace for teams, built on Cloudflare Workers.
Zotlyx Inbox is a self-hosted team inbox application for shared mailbox operations such as info@, support@, and sales@. It combines a modern mailbox UI, role-based access control, real-time updates, and an integrated AI assistant while keeping the full deployment inside your own Cloudflare account.
Incoming mail is handled through Cloudflare Email Routing, each mailbox is isolated inside its own Durable Object with SQLite storage, attachments are stored in R2, and the AI features run on Workers AI.
Zotlyx Inbox is inspired by and adapted from Cloudflare's Agentic Inbox, with additional product, UX, and operational changes for team mailbox usage.
For practical product usage and setup instructions, use the docs folder:
Zotlyx Inbox is designed for teams that want:
- A clean shared inbox instead of forwarding everything into personal mailboxes
- Fine-grained access control for users and groups
- Real-time inbox updates without manual refresh
- A lightweight AI agent that can read, search, and draft replies
- Full control over the infrastructure, data, and deployment
You can deploy the application directly from GitHub with Cloudflare's deploy flow:
- Creates the Worker from this repository
- Provisions the configured Cloudflare resources used by the app
- Lets you set the required secrets for the first admin login
After the deploy completes, the app will automatically initialize its D1 tables on first run, so you can sign in right away without running any manual migration commands.
Cloudflare email infrastructure still needs a short guided setup after the app is deployed:
- Configure your domain in Cloudflare
- Set up Email Routing for inbound mail
- Enable Email Service for outbound sending
- Open the app and sign in with the bootstrap admin account
- Add your domain, users, groups, and shared mailboxes
This means the app is deployable in one click, but email routing and sender configuration still require Cloudflare dashboard setup.
- Shared mailbox operations: inbox, sent, drafts, archive, trash, spam, search, threading, reply, and forward
- Team access control: assign mailbox access directly to users or through groups
- Real-time mailbox updates: SSE-based live refresh for new emails, read state, draft updates, and thread changes
- AI side panel: search conversations, read thread context, and draft replies with a mailbox-aware agent
- Mailbox isolation: every mailbox runs in its own Durable Object with isolated SQLite state
- Attachment handling: upload, preview, and download via R2
- Audit visibility: administrative actions and mailbox activity can be tracked from the admin side
- Frontend: React 19, React Router v7, Tailwind CSS, Zustand, TipTap,
@cloudflare/kumo - Backend: Hono, Cloudflare Workers, Durable Objects, D1, R2
- Realtime: Server-Sent Events
- AI: Cloudflare Agents SDK, AI SDK v6, Workers AI
- Authentication: email/password sessions with PBKDF2 password hashing
┌──────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Browser │────>│ Hono Worker │────>│ MailboxDO │
│ React SPA │ │ (API + SSR) │ │ (SQLite + R2) │
│ Agent Panel │ │ │ └─────────────────┘
└──────┬───────┘ │ /agents/* ──────┼────>┌─────────────────┐
│ │ │ │ EmailAgent DO │
│ SSE │ │ │ AI draft tools │
└─────────────┤ │────>│ Workers AI │
└──────────────────┘ └─────────────────┘
Before running the app, make sure you have:
- A Cloudflare account
- A domain connected to Cloudflare
- Email Routing enabled for receiving mail
- Email Service enabled for outbound sending
- Workers AI enabled if you want the AI agent features
pnpmand Node.js 20+
pnpm installThis project auto-initializes its D1 tables on first run, so most users do not need to run migrations manually.
If you are developing the project and want to apply a schema change explicitly:
- Add a new SQL file under
workers/db/migrations/(e.g.0003_add_feature.sql) - Apply migrations locally:
pnpm exec wrangler d1 migrations apply zotlyx-inbox-db --local- Apply migrations to production:
pnpm exec wrangler d1 migrations apply zotlyx-inbox-db --remoteImportant:
- The
--remotecommand must target the same D1 database that is bound to the Worker under theDBbinding (Cloudflare dashboard → Workers & Pages → your Worker → Bindings).
Create the R2 bucket:
pnpm exec wrangler r2 bucket create zotlyx-inboxCreate the D1 database:
pnpm exec wrangler d1 create zotlyx-inbox-dbCreate .dev.vars in the project root:
ADMIN_BOOTSTRAP_EMAIL="admin@yourdomain.com"
ADMIN_BOOTSTRAP_PASSWORD="change-this-password"On first boot, the application seeds the first administrator account automatically.
pnpm run devpnpm exec wrangler secret put ADMIN_BOOTSTRAP_EMAIL
pnpm exec wrangler secret put ADMIN_BOOTSTRAP_PASSWORDpnpm run deployAfter deployment, use this checklist to finish production setup:
- Sign in with the bootstrap admin account
- Open the app once to let it auto-initialize the D1 schema (tables are created automatically)
- Open Cloudflare Email Routing and point inbound mail to the Worker
- Enable outbound sending in Cloudflare Email Service
- Add your domain in the app
- Create shared mailboxes such as
info@,support@, orsales@ - Grant mailbox access to users or groups
- Send and receive a real test email before inviting the team
Domain onboarding is intentionally manual in the app. After deployment:
- Open your domain in the Cloudflare dashboard
- Go to Email Routing → Routing rules
- Create a rule and set the action to Send to Worker → select your deployed Worker (e.g.
zotlyx-inbox) - Enable the rule
Recommended rules:
- Catch-all:
*@yourdomain.com→ Worker (useful for team inboxes likeinfo@,support@,sales@) - Mailbox-specific:
support@yourdomain.com→ Worker (if you only want to route specific addresses)
Important:
- If the routing rule is disabled, inbound email will not arrive and you may see bounces like
550 5.1.1 Address does not exist. - The app only shows mail for mailboxes you created in the UI. Create the mailbox first, then send a test email to it.
- Go to Email Service / Email Sending
- Enable onboarding for your domain (e.g.
yourdomain.com) - Complete the required DNS records and verification steps shown in the dashboard
- In the app, send emails from addresses under the onboarded domain (example:
support@yourdomain.com)
Notes:
- Email Service is intended for transactional messages (replies, notifications) rather than marketing/bulk email.
- If Cloudflare shows recipient restrictions in your account, you may need to verify destination addresses while testing.
The app manages mailboxes and access control, but Cloudflare dashboard configuration remains the source of truth for routing and sender setup.
Recommended setup order for a fresh workspace:
- Register the domain in the app
- Create users
- Create groups if needed
- Create shared mailboxes
- Grant mailbox access to users or groups
- Start using the mailbox UI from the dashboard
- Delete from normal folders moves mail to
Trash - Delete from
Trashremoves mail permanently - Non-admin users only see mailboxes they have access to
- Real-time updates use SSE, so you will see a long-lived
eventconnection in DevTools - The AI assistant helps with reading and drafting, but sending still stays explicit and user-controlled
pnpm run dev
pnpm run build
pnpm run deploy
pnpm run preview
pnpm run typecheck
pnpm exec wrangler whoamiIf you are upgrading from an older single-tenant version:
- Deploy the latest code and open the app once to let it auto-initialize any missing D1 tables
- Sign in with the bootstrap admin account
- Re-check mailbox access assignments
- Verify that existing mailboxes have matching access rows for employee visibility
- Cloudflare Email Routing
- Cloudflare Email Service
- Cloudflare Durable Objects
- Cloudflare Workers AI
- Cloudflare Agents SDK
- Email for Agents blog post
Zotlyx Inbox is inspired by and adapted from Cloudflare's Agentic Inbox.
This project keeps its own branding, product direction, and custom implementation work, while acknowledging the original open-source foundation and ideas from Cloudflare's project.
If this project helps you and you want to support ongoing development, add your official Buy Me a Coffee link here:
- Buy Me a Coffee:
https://buymeacoffee.com/muhammadsujon
Current maintainer:
- Muhammad Sujon
- GitHub: developer-sujon
- Email: muhammad.sujon.cse@gmail.com
Apache 2.0. See LICENSE.

