Overview
Proton Drive is a secure cloud storage application providing end-to-end encrypted file storage, sharing, and collaboration. It features advanced file management, photos backup, and real-time sync capabilities.Package name:
proton-drive | Version: 5.2.0 | License: GPL-3.0Features
Encrypted Storage
End-to-end encrypted file and folder storage
File Sharing
Secure link sharing with password protection
Photos Backup
Automatic photo backup and organization
Document Preview
In-browser preview for various file types
Version History
File revision tracking and restoration
Offline Access
Download manager with offline capabilities
Encrypted Search
Client-side encrypted file search
Web Streams
Streaming upload/download for large files
Architecture
Directory Structure
State Management
Proton Drive uses a hybrid state management approach:- Redux Toolkit (
@reduxjs/toolkit) for global app state - Zustand v4 for local component state
- IndexedDB (via
idbandidb-keyval) for offline storage
Key Dependencies
Notable Libraries
- web-streams-polyfill - Web Streams API for browsers
- @openpgp/web-stream-tools - Streaming encryption/decryption
- client-zip - Client-side ZIP creation
- idb - IndexedDB wrapper for offline storage
- exifreader - EXIF metadata extraction from photos
- heic-to - HEIC/HEIF image conversion
- comlink - Web Worker communication
- @tanstack/react-virtual - Virtual scrolling for large lists
NPM Scripts
Development
Build
Build flags:
--handleSupportAndErrors --optimizeAssets --noLogicalScssTesting
Code Quality
Internationalization
Store Modules
Proton Drive has 24 Redux store modules (prefixed with_):
| Module | Purpose |
|---|---|
_actions | Action creators |
_links | Share link management |
_shares | Shared drive spaces |
_volumes | Storage volumes |
_photos | Photo library management |
_documents | Document handling |
_downloads | Download queue and manager |
_uploads | Upload queue and manager |
_search | Encrypted search |
_crypto | Encryption/decryption |
_revisions | File version history |
_devices | Device management |
_bookmarks | Bookmarked files/folders |
_invitations | Share invitations |
_events | Event sourcing |
_settings | User preferences |
_user | User state |
_views | View configurations |
_transfer | Transfer management |
_sanitization | Content sanitization |
Special Features
Streaming Upload/Download
Drive uses Web Streams API for efficient file transfers:- Stream encryption/decryption on-the-fly
- Memory-efficient for large files
- Progress tracking
- Pause/resume capability
Photos App
Dedicated photos functionality:- EXIF metadata extraction
- Automatic photo organization
- HEIC/HEIF support
- Thumbnail generation
File Preview
In-browser file preview:- PDF rendering
- Image preview
- Video playback
- Document preview (via
preview-sandbox)
Version Control
File revision management via_revisions store:
- Track file changes
- Restore previous versions
- Version comparison
- History timeline
Offline Support
IndexedDB-based offline storage:- Cache file metadata
- Offline file access
- Sync on reconnection
Advanced Features
Web Workers
Uses Comlink for Web Worker communication:Virtual Scrolling
Efficient rendering of large file lists:Client-Side ZIP
Create ZIP files in-browser:Modals
Drive has 25+ modal dialogs:- File/folder creation
- Sharing modals
- Preview modals
- Settings dialogs
- Confirmation modals
Sections
Major application sections (15 total):- File browser
- Photos view
- Shared with me
- Trash
- Settings
- Device management
- etc.
Zustand Stores
Local state management with Zustand:See
zustand/README.md for store documentationURLs App
Separate entry point for shared links:Performance Optimizations
- Code Splitting - Dynamic imports for modals and sections
- Virtual Scrolling - Only render visible file list items
- Web Workers - Offload crypto and processing
- Streaming - Memory-efficient large file handling
- IndexedDB Caching - Offline-first architecture
- Asset Optimization -
--optimizeAssetsflag
Build Flags
Special build configuration:Related Applications
- docs - Proton Docs integration
- docs-editor - Document editing
- preview-sandbox - Sandboxed file preview
Development Notes
Local Development
- Start dev server:
yarn start - Access at
http://localhost:8080 - File operations are encrypted client-side
Architecture Documentation
Seestore/architecture.md for detailed store architecture documentation.