Overview
Proton Calendar is an encrypted calendar application that allows users to manage events, schedule meetings, and organize their time with end-to-end encryption.Package name:
proton-calendar | License: GPL-3.0Features
Event Management
Create, edit, and manage encrypted calendar events
Multiple Calendars
Support for multiple calendars with color coding
Event Sharing
Share events and calendars with other users
Timezone Support
Full timezone support for international scheduling
Recurring Events
Create repeating events with flexible patterns
Alarms & Notifications
Set reminders and receive notifications
Bookings
Meeting scheduling and booking functionality
Mail Integration
Integration with Proton Mail for event invitations
Architecture
Directory Structure
State Management
Proton Calendar uses Redux Toolkit with Zustand for some local state:- Redux for global app state
- Zustand for component-level state
- Shared Redux store integration via
@proton/react-redux-store
Key Dependencies
Notable Libraries
- date-fns - Date manipulation and formatting
- @protontech/interval-tree - Efficient event scheduling data structure
- tinycolor2 - Color manipulation for calendar theming
- zustand - Lightweight state management
NPM Scripts
Development
Testing
Tests run with
TZ=UTC to ensure consistent timezone behavior across environments.Build
Code Quality
Internationalization
Key Features
Calendar Views
Multiple view modes for displaying events:- Day View - Single day detailed view
- Week View - Week overview
- Month View - Monthly calendar grid
- Agenda View - List of upcoming events
Event Encryption
All calendar events are end-to-end encrypted:- Event titles and descriptions encrypted
- Participants and locations encrypted
- Only metadata visible to servers
Bookings System
Meeting scheduling functionality located inbookings/:
Alarms & Notifications
Robust alarm system:- Browser notifications
- Email reminders
- Multiple alarms per event
- Snooze functionality
Integration with Proton Meet
Calendar integrates with@proton/meet for:
- Video meeting creation
- Meeting links in events
- One-click join functionality
Container Components
Main container components:| Container | Purpose |
|---|---|
calendar/ | Core calendar views and event management |
alarms/ | Alarm and notification handling |
bookings/ | Meeting scheduling system |
settings/ | Calendar preferences and configuration |
setup/ | Initial calendar setup wizard |
GlobalModals/ | Application-wide modal dialogs |
Encrypted Search
Calendar includes encrypted search via@proton/encrypted-search:
- Search events without decrypting on server
- Client-side search index
- Privacy-preserving search
Color Management
Calendars support custom colors:Data Structures
Uses interval tree for efficient event querying:Activation Integration
Includes import functionality via@proton/activation:
- Import from other calendar services
- ICS file import
- Calendar migration tools
Performance Considerations
- Lazy Loading - Components loaded on demand
- Interval Tree - Efficient event range queries
- Virtualized Lists - Only render visible events
- Memoization - React.memo and useMemo for expensive computations
Testing
Test Environment
- Jest with custom environment (
@proton/jest-env) - React Testing Library for component tests
- React Hooks Testing for hook testing
- UTC timezone enforcement for consistency
Test Structure
Build Configuration
Build usesproton-pack with:
- SSO Mode -
--appMode=ssofor production - Standalone Mode -
--appMode=standalonefor development - TypeScript - Custom tsconfig at
../../tsconfig.webpack.json
Related Applications
- proton-mail - Email integration for event invitations
- proton-meet - Video meeting integration
- proton-account - Account and subscription management