Design a multi-device calendar application
Company: OpenAI
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Technical Screen
## System design prompt
Design a calendar application similar to Apple Calendar.
### Core features
- Users can **create, update, and delete events**.
- The UI must support **Day / Month / Year views** (i.e., the backend must efficiently fetch events for a given time range).
- **Multi-device support**: if a user creates/edits an event on one device, it should **sync to the user’s other devices**.
### Clarifications you should cover
- Assumptions about data scale (users, events per user, read/write QPS).
- Consistency expectations for cross-device sync (e.g., eventual vs “near real-time”).
- Handling tricky calendar cases (time zones, all-day events, recurring events, edits while offline, conflicts).
### Output expected from candidate
- High-level architecture (clients, APIs, storage, background jobs, push/sync).
- Data model and key indexes.
- Sync protocol and conflict-resolution strategy.
- How to serve Day/Month/Year queries efficiently.
- Key tradeoffs and failure/edge cases.
Quick Answer: This question evaluates system design competency in scalable backend architecture, data modeling for time-range queries, synchronization and conflict-resolution for multi-device state, and handling calendaring complexities such as time zones, recurring events, and offline edits.