A modern, full-stack email client running entirely on Cloudflare Workers
Email Explorer is a full-stack, serverless email client that runs entirely on your own Cloudflare account. It provides a modern, fast, and secure way to manage your emails using Cloudflare's powerful infrastructure, including Workers, R2, Durable Objects, Email Routing, and Email Sending.
- Overview
- Why Email Explorer?
- Key Features
- Prerequisites
- Getting Started
- Configuration
- Documentation
- Architecture
- Production Ready Features
- Testing
- Roadmap & Future Enhancements
- Known Limitations
- Security
- Contributing
- Support
- License
- π User Guides - Complete documentation for all features
- π Getting Started - Deploy in minutes
- π Authentication - Setup your first account
- π Account Recovery - Password reset via email
- π₯ Admin Panel - Manage users and permissions
- βοΈ Configuration - Customize your deployment
Email Explorer gives you a private, self-hosted email solution with a user-friendly web interface. By leveraging the Cloudflare ecosystem, it offers a cost-effective and scalable alternative to traditional email hosting. All your data is stored securely in your own R2 buckets and Durable Objects, giving you full control over your information.
π Privacy First
- All data stays in YOUR Cloudflare account
- No third-party tracking or analytics
- You control your data completely
π° Cost-Effective
- Runs on Cloudflare's generous free tier
- Pay only for what you use beyond free limits
- No monthly subscription fees
β‘ Performance
- Built on Cloudflare's global edge network
- Fast loading times worldwide
- Serverless architecture scales automatically
π¨ Modern Experience
- Clean, intuitive interface
- Rich text email composition
- Mobile-responsive design
π οΈ Easy Setup
- Deploy with one click
- Automatic mailbox creation
- Smart authentication setup
Note: To send emails, you need to have Cloudflare Email Sending enabled on your account. Receiving emails works through Cloudflare Email Routing.
Note: When you first load your worker, there will be no mailboxes. They are automatically created when you start receiving emails.
- π Secure & Private: Self-hosted on your Cloudflare account. No third-party tracking or data scanning.
- π Smart Authentication: Automatic first-user admin setup with role-based access control and secure session management.
- π₯ Multi-User Support: Admin panel for managing users and mailbox permissions with granular roles (Owner, Admin, Write, Read).
- βοΈ Rich Text Editor: Full-featured WYSIWYG editor with formatting, colors, links, lists, and more - just like Gmail or Outlook.
- β©οΈ Reply & Forward: Reply to sender, reply all, or forward emails with automatic quoting and threading support.
- βοΈ Email Management: Send, receive, and organize emails with a clean and intuitive interface.
- π Folder Organization: Create custom folders to organize your emails.
- π Attachment Support: View and download attachments directly in the browser.
- π Search: Find emails quickly with full-text search across all your mailboxes.
- π§ Contacts: Manage your contacts with an integrated address book.
- β‘ Serverless Architecture: Each mailbox is its own Durable Object for optimal performance and isolation.
Before deploying Email Explorer, make sure you have:
- Cloudflare Account - Sign up for free
- Domain Name - Added to your Cloudflare account
- Email Routing - Enable Email Routing for receiving emails
- Email Sending - Enable Email Sending for sending emails (optional but recommended)
- Node.js 18+ - For local development (not required for deployment)
Cloudflare Services Used:
- Workers (Compute)
- Durable Objects (State management)
- R2 (Object storage)
- D1 (SQL database via Durable Objects)
- Email Routing (Receive emails)
- Email Sending (Send emails)
Most of these services have generous free tiers that are sufficient for personal use.
To deploy Email Explorer, you can use the "Deploy to Cloudflare" button above or run this command:
npm create cloudflare@latest -- --template=https://github.com/G4brym/email-explorer/tree/main/templateOr deploy manually:
# Clone the repository
git clone https://github.com/G4brym/email-explorer.git
cd email-explorer
# Install dependencies
pnpm install
# Deploy to Cloudflare
pnpm --filter email-explorer deployEmail Explorer uses a factory function pattern for configuration. Edit src/index.ts:
// Recommended: Smart Mode (Default)
export default EmailExplorer({
auth: {
enabled: true
// registerEnabled not specified = smart mode
},
accountRecovery: {
fromEmail: '[email protected]' // Optional: enable password reset via email
}
})Smart Mode (Recommended):
- First user to register automatically becomes admin
- Registration closes after first user
- Admins can create additional users via admin panel
- Perfect for production deployments
Other Modes:
// Open Registration (Development/Testing)
export default EmailExplorer({
auth: {
enabled: true,
registerEnabled: true // Anyone can register
}
})
// No Authentication (Single User)
export default EmailExplorer({
auth: {
enabled: false
}
})
// With Account Recovery
export default EmailExplorer({
auth: {
enabled: true
},
accountRecovery: {
fromEmail: '[email protected]' // Email address to send password reset links from
}
})Configuration Options:
| Option | Type | Default | Description |
|---|---|---|---|
auth.enabled |
boolean | true |
Enable/disable authentication |
auth.registerEnabled |
boolean | undefined (smart mode) |
Control user registration |
accountRecovery.fromEmail |
string | undefined (disabled) |
Enable password recovery via email |
Account Recovery:
- When configured, users can reset forgotten passwords via email
- The
fromEmailaddress must be a valid email on your Cloudflare account - Requires Cloudflare Email Sending to be enabled
- See Account Recovery Guide for more details
- Deploy your worker with smart mode enabled (default)
- Visit your worker URL in a browser
- Register the first user - this becomes your admin account
- Log in with your admin credentials
- Manage additional users through the admin panel
As an admin, you can:
- Create new users
- Grant/revoke mailbox access
- Assign roles:
owner,admin,write, orread - Promote users to admin status
Comprehensive user guides are available for all features:
- Feature Documentation - Complete user guides
- Authentication Guide - Account creation, login, and security
- Account Recovery Guide - Password reset via email
- Admin Panel Guide - User management and permissions
- Rich Text Editor Guide - Email formatting and composition
- Reply & Forward Guide - Email responses and threading
For developers:
- ROADMAP.md - Project roadmap and planned features
- AGENTS.md - Technical architecture and development guide
Email Explorer is built with modern web technologies:
Backend (Worker):
- Hono - Fast, lightweight web framework
- Cloudflare Durable Objects - Distributed state management
- Cloudflare R2 - Object storage for attachments
- Cloudflare D1 - SQL database (via Durable Objects)
- Cloudflare Email Routing - Email sending and receiving
Frontend (Dashboard):
- Vue.js 3 - Progressive JavaScript framework
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- TipTap - Rich text editor
- Pinia - State management
- Vite - Fast build tooling
β Authentication & Security
- Smart mode with automatic admin setup
- Session-based authentication (30-day expiry)
- Password hashing with Web Crypto API
- HttpOnly, Secure, SameSite cookies
- Role-based access control (RBAC)
β Email Capabilities
- Send and receive emails
- Reply and reply-all functionality
- Forward emails to others
- Rich text HTML composition
- Email threading and conversation tracking
- Attachment handling
β User Management
- Admin panel for user creation
- Granular mailbox permissions (Owner, Admin, Write, Read)
- Multi-user support with isolation
- Access grant and revoke capabilities
β Organization
- Custom folder creation
- Contact management
- Full-text email search
- Email filtering and organization
Email Explorer includes comprehensive integration tests:
# Run all tests
pnpm --filter email-explorer test
# Run specific test suite
pnpm --filter email-explorer test auth
pnpm --filter email-explorer test endpoints
# Watch mode for development
pnpm --filter email-explorer test --watchTest Coverage:
- β Authentication flows (registration, login, sessions)
- β Admin operations (user management, access control)
- β Email operations (send, receive, folders)
- β Search and filtering
- β Contacts and attachments
- β Security validations
Planned features for future releases:
- Email templates for quick responses
- Two-factor authentication (2FA)
- Email drafts auto-save
- Conversation threading view
- Emoji picker in composer
- Table support in rich text editor
- Image uploads and inline images
- Email signatures
- Keyboard shortcuts
- Mobile app (React Native)
See ROADMAP.md for detailed planning and progress.
Current Limitations:
- No email draft auto-save (manual save only)
- Image uploads not yet supported (URLs work)
- Single mailbox per user account (multiple access supported)
Optional Features:
- Password reset via email requires
accountRecovery.fromEmailconfiguration
Browser Compatibility:
- Modern browsers required (Chrome 90+, Firefox 88+, Safari 14+)
- JavaScript must be enabled
- Cookies must be enabled for authentication
Please report any issues on our GitHub Issues page.
Email Explorer takes security seriously:
π Authentication Security
- Passwords hashed with Web Crypto API (SHA-256)
- HttpOnly, Secure, SameSite cookies prevent XSS/CSRF
- 30-day session expiry for automatic logout
- Session tokens use cryptographic randomness
π‘οΈ Data Protection
- All data stored in YOUR Cloudflare account
- Email content rendered in sandboxed iframes
- No third-party data sharing
- Role-based access control (RBAC)
π Best Practices
- Always use HTTPS (automatic with Cloudflare)
- Keep dependencies updated
- Regular security audits via GitHub Dependabot
- Comprehensive test coverage
- Use strong, unique passwords (8+ characters)
- Enable Cloudflare's security features
- Regularly review user access permissions
- Log out from shared devices
Report Security Issues: For security vulnerabilities, please email security issues privately rather than opening public issues.
We welcome contributions from the community! Here's how you can help:
π Bug Reports
- Use the GitHub Issues page
- Include reproduction steps
- Specify your environment (browser, Cloudflare setup)
β¨ Feature Requests
- Check existing issues first
- Explain the use case and benefit
- Consider submitting a PR if you can implement it
π» Code Contributions
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes with tests
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π Documentation
- Help improve user guides
- Fix typos or clarify instructions
- Add examples and use cases
Development Setup:
# Clone the repository
git clone https://github.com/G4brym/email-explorer.git
cd email-explorer
# Install dependencies
pnpm install
# Run tests
pnpm --filter email-explorer test
# Start development
pnpm --filter email-explorer dev
pnpm --filter dashboard dev- π Documentation: Check docs/features/ for user guides
- π¬ Discussions: Use GitHub Discussions for questions
- π Issues: Report bugs via GitHub Issues
- π§ Email: For security issues only
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ for the self-hosted community
If you find Email Explorer useful, please consider giving it a β on GitHub!

