A modern email client with a conversation-based interface, similar to Facebook's feed design.
Built with:
- Backend: Rust (Actix-web, SQLite, IMAP/SMTP)
- Frontend: Standalone HTML/JavaScript (no build tools required!)
Key Feature: The entire frontend is a single HTML file - no npm, no webpack, no build step. Just start the Rust backend and go!
📚 Quick Start Guide | 🎨 Frontend Architecture
- Conversation Threading: Emails grouped by conversation threads
- Inline Reply: Reply directly from the conversation view
- Multi-Account Support: Connect via IMAP/SMTP
- Real-time Updates: WebSocket support for instant notifications
- Search: Full-text search across emails
- Folder Management: Create and organize custom folders
- Bulk Operations: Select and manage multiple emails at once
- Feed-like Display: Conversations shown like social media posts
- Preview Messages: See the last 2-3 messages in each thread
- Expandable Threads: Click to view full conversation history
- Responsive Design: Works on desktop, tablet, and mobile
- Dark Mode Ready: Clean, modern interface
- Web Framework: Actix-web
- Database: SQLite with SQLx
- Email Protocols: IMAP for receiving, SMTP for sending
- Authentication: JWT tokens
- WebSocket: Real-time updates
- Standalone HTML: Single-file application with vanilla JavaScript
- No Build Required: Works directly without npm, webpack, or any build tools
- Modern UI: Clean, responsive design inspired by social media feeds
- Full Features: Reply, Forward, Search, Keyboard shortcuts, and more
- Rust (latest stable version)
- That's it! No Node.js, npm, or any other tools required.
- Navigate to the backend directory:
cd email-client/backend- Create the database and run migrations:
# Install SQLx CLI if not already installed
cargo install sqlx-cli --no-default-features --features sqlite
# Create database
sqlx database create
# Run migrations
sqlx migrate run- Configure environment variables:
# Copy the .env file and update with your settings
cp .env.example .env- Build and run the backend server:
./run.sh restartThe backend server will start on http://localhost:8080
Use the ./run.sh script rather than native cargo building, for logs, cleanup, restarts, it is very handy:
Commands:
start Start the backend server
stop Stop the backend server
restart Restart the backend server
status Show server status
logs Show and follow server logs
build Build the backend
kill Kill any process using port 8080
clean Stop server and clean up logs
help Show this help message
The frontend is a standalone HTML file that's automatically served by the Rust backend. No installation or build steps required!
Simply start the backend and access the app at http://localhost:8080
POST /api/auth/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "password",
"imap_host": "imap.gmail.com",
"imap_port": 993,
"smtp_host": "smtp.gmail.com",
"smtp_port": 587
}GET /api/conversations?folder_id={id}&limit=50&offset=0
Authorization: Bearer {token}GET /api/conversations/{thread_id}
Authorization: Bearer {token}POST /api/emails/send
Authorization: Bearer {token}
Content-Type: application/json
{
"to": ["recipient@example.com"],
"cc": ["cc@example.com"],
"subject": "Subject",
"body_text": "Email content"
}POST /api/emails/{id}/reply
Authorization: Bearer {token}
Content-Type: application/json
{
"email_id": "uuid",
"reply_all": false,
"body_text": "Reply content"
}Create a new migration:
sqlx migrate add <migration_name>cd backend
cargo watch -x run # Auto-reload on changes
cargo test # Run testscd email-client/backend
cargo testemail-client/
├── backend/
│ ├── src/
│ │ ├── handlers/ # HTTP request handlers
│ │ ├── services/ # Business logic
│ │ ├── models.rs # Data models
│ │ ├── error.rs # Error handling
│ │ └── main.rs # Application entry point
│ ├── migrations/ # Database migrations
│ └── Cargo.toml # Rust dependencies
├── frontend/
│ ├── app-working.html # Main application (standalone, no build required)
│ ├── src/ # TypeScript version (optional, not used by default)
│ └── package.json # Optional dependencies for TypeScript development
└── README.md
- Password Storage: User email passwords are currently stored encrypted but should use a key management service in production
- JWT Tokens: Change the JWT secret in production
- HTTPS: Always use HTTPS in production
- Rate Limiting: Implement rate limiting on API endpoints
- Input Validation: All user inputs are validated and sanitized
- XSS Protection: HTML content is sanitized using DOMPurify
- Database Indexing: Indexes on frequently queried columns
- Connection Pooling: Reuse IMAP/SMTP connections
- Caching: Cache recent emails locally
- Pagination: Load conversations in batches
- Lazy Loading: Load full conversation only when expanded
-
IMAP Connection Failed
- Check firewall settings
- Verify IMAP is enabled in email account
- Try using app-specific passwords
-
Database Errors
- Ensure migrations are run
- Check file permissions for SQLite database
-
Frontend Not Loading
- Clear browser cache
- Check console for errors
- Verify backend is running
The primary frontend is frontend/app-working.html - a standalone HTML file with embedded CSS and JavaScript.
To modify the frontend:
- Edit
frontend/app-working.htmldirectly - Refresh your browser to see changes
- No build step required!
Advantages:
- ✅ Zero build time - edit and refresh
- ✅ No npm dependencies to manage
- ✅ No version conflicts or security vulnerabilities
- ✅ Instant startup
- ✅ Easy to understand and modify
- ✅ Works offline
- ✅ Tiny file size (~32KB)
- ✅ Deploy anywhere
MIT License - See LICENSE file for details
- Conversation-based email interface
- Reply, Reply All, Forward functionality
- Quick reply from conversation view
- Search and filtering
- Keyboard shortcuts
- OAuth2 authentication (Gmail, Outlook)
- Email templates
- Multiple account support
- Dark mode theme
- Email encryption (PGP)
- Calendar integration
Frame Email Client embraces simplicity. We believe that modern web applications don't need complex build tools, hundreds of dependencies, or megabytes of JavaScript to be powerful and user-friendly.
Simple. Fast. Effective.