Overview
Proton Mail is the flagship email application providing secure, encrypted email communication. It features a modern React-based interface with comprehensive email management capabilities.Package name:
proton-mail | License: GPL-3.0Features
Encrypted Messaging
End-to-end encrypted emails with PGP/MIME support
Conversations
Threaded conversation view with message grouping
Composer
Rich text editor with attachments and scheduling
Encrypted Search
Client-side encrypted search functionality
Labels & Folders
Flexible organization with labels and folders
Snooze & Schedule
Snooze messages and schedule send times
Encrypted Outside
Password-protected emails to non-Proton users (EO)
AI Assistant
Composer assistant with LLM integration
Architecture
Directory Structure
State Management
Proton Mail uses Redux Toolkit for state management with the following key slices:- messages - Individual message state
- conversations - Conversation threads
- composers - Draft composition state
- attachments - File attachment handling
- contacts - Contact information
- elements - Generic list elements (messages/conversations)
- layout - UI layout state
- snooze - Snoozed message management
Key Dependencies
NPM Scripts
Development
Testing
Build & Deploy
Code Quality
Internationalization
Constants
Key constants defined inconstants.ts:
Special Features
Encrypted Outside (EO)
Proton Mail supports sending encrypted emails to non-Proton users:- Password-protected message access
- Reply capability (up to 5 replies)
- Separate routing:
/eo/messageand/eo/reply - Secure token storage
AI Composer Assistant
Integrated LLM-powered writing assistant:Encrypted Search
Client-side encrypted search using@proton/encrypted-search:
- Index messages locally
- Search without server-side decryption
- Privacy-preserving search functionality
Integration Points
Calendar Integration
Mail integrates with Proton Calendar for:- Meeting invitations
- Calendar event creation from emails
- Event attachments
Pass Integration
Integration with Proton Pass (@proton/pass):
- Autofill credentials
- Save passwords from emails
Account Integration
Uses@proton/account for:
- User authentication
- Account settings
- Session management
Error Codes
Performance Optimizations
- Lazy Loading - Code splitting for optimal bundle size
- Virtual Scrolling - Efficient rendering of large message lists
- Message Caching - Redux-based caching layer
- Retry Logic - Automatic retry for failed operations (3 attempts, 3s delay)
Related Applications
- inbox-desktop - Desktop version using Electron
- proton-calendar - Integrated calendar functionality
- proton-account - Account management
Development Notes
Local Development
- Start the dev server:
yarn start - Access at
http://localhost:8080 - Uses standalone auth by default
Testing Strategy
- Unit tests with Jest
- Component tests with React Testing Library
- Mock service worker (MSW) for API mocking
- Coverage tracking with
--coverageflag