Overview
Colimail is a cross-platform desktop email client that reimagines email management with modern technology. Built with Tauri 2, Rust, and SvelteKit (Svelte 5), it delivers unprecedented performance while integrating cutting-edge blockchain features for email verification and rewards.
Key Achievement: Processes 10 million emails in 23 seconds β 26,060 times faster than Thunderbird (7 days).
Technical Highlights
π Performance Engineering
- Ultra-fast Processing: 432,000 emails/second throughput using Rustβs zero-cost abstractions
- Optimized Database: SQLite with strategic indexing achieves sub-2-second queries on 10M records
- Efficient Memory: ~70MB idle memory footprint with incremental sync and lazy loading
- Cold Startup: β€1.5s application launch time through careful optimization
π Blockchain Integration
- CMVH Email Signing: Implemented EIP-712 cryptographic signatures for email authenticity verification
- WalletConnect Integration: QR code-based mobile wallet connection supporting MetaMask, Trust Wallet, Rainbow
- ENS Resolution: Built 3-layer caching architecture (Memory/SQLite/RPC) achieving 90%+ cache hit rate
- Reward Pool System: On-chain wACT crypto rewards with 30-day expiry and claiming mechanism
π Security & Privacy
- Zero-Knowledge Encryption: AES-256-GCM with Argon2 key derivation for local data protection
- Secure Credential Storage: OS Keyring integration (Windows Credential Manager, macOS Keychain, Linux Secret Service)
- Session Isolation: Keys stored in memory only, auto-locked on app close
- OAuth2 Flow: Secure deep link handling for Gmail/Outlook authentication
ποΈ Architecture & Design
Frontend (TypeScript/SvelteKit):
- Svelte 5 runes-based reactive state management
- Modular handler pattern for separation of concerns
- shadcn-svelte UI components with dark mode support
Backend (Rust/Tauri):
- Non-blocking I/O with tokio async runtime
spawn_blockingfor IMAP/SMTP to prevent executor saturation- Structured JSON logging with daily rotation
- IMAP IDLE real-time push notifications
Data Layer:
- SQLite with migration system and strategic indexing
- Incremental sync based on UIDVALIDITY tracking
- Draft management with auto-save (3s debounce)
- Attachment metadata separation for on-demand loading
Core Features
- β Multi-account IMAP/SMTP (OAuth2 + Basic Auth)
- β Offline-first with local SQLite cache
- β Real-time push (IMAP IDLE)
- β Cryptographic email signing (EIP-712)
- β Web3 wallet integration (WalletConnect)
- β Rich compose (Reply/Forward/Attachments)
- β Folder CRUD with capability detection
- β System tray integration
- β Cross-platform (Windows, macOS, Linux planned)
Technical Stack
- Frontend: TypeScript, Svelte 5, viem
- Backend: Rust, Tauri 2.x, tokio, lettre, imap, secp256k1
- Database: SQLite
- Blockchain: Arbitrum (Sepolia testnet), EIP-712, WalletConnect 2.0
- Security: AES-256-GCM, Argon2, keyring crate
Development Impact
- Designed and implemented full-stack architecture from scratch
- Optimized email parsing achieving O(n) linear complexity even at 10M scale
- Built robust error handling with retry logic and graceful degradation
- Created comprehensive testing suite with Criterion.rs benchmarks
- Authored detailed architectural documentation (1400+ lines)
- Open-sourced under MIT license with active community engagement
Performance Benchmarks
| Metric | Colimail | Thunderbird | Outlook |
|---|---|---|---|
| 10M emails processing | 23s | ~7 days | Cannot handle |
| Throughput | 432K/s | 16.5/s | N/A |
| Cold startup | β€1.5s | ~5-8s | ~3-5s |
| Idle memory | ~70MB | ~400MB | ~300MB |
| Query 50/10M emails | 1.48s | Minutes | Crashes |
Links
- π GitHub Repository
- π Architecture Documentation
- π Performance Comparison