Problem statement
Design the object model and public APIs for the core of a shared calendar and event-scheduling library: the class graph that stores events, expands recurring series, tracks who is invited and how they replied, and answers overlap and free/busy questions. This is the scheduling kernel a web UI, a mobile app, or a sync layer would drive, not those surfaces themselves.
Operating context. Many users, each owning one or more calendars, plus shared calendars a group can read or write. An event has an organizer, a set of invitees, a title, and a time interval anchored to a specific time zone. Some events recur ("every weekday", "the 2nd Tuesday monthly until December") and a single occurrence in a series can be edited or cancelled independently of the rest. Invitees accept, decline, or mark tentative; reminders fire at offsets before start. Reads (rendering a week, running a free/busy query) dominate writes. A single process serves the kernel; multiple threads may read and mutate a calendar concurrently.
Out of scope. Storage engine and query language (assume an in-memory repository behind an interface), the transport / REST layer, the reminder delivery channel itself (email, push — model only the scheduling of a reminder, not its sending), authn / access-control enforcement beyond a simple read/write capability check, and iCalendar (RFC 5545) file parsing (you may borrow its vocabulary, but do not design a parser).
What to produce. The class hierarchy (User, Calendar, Event, the recurrence-rule seam, Invitation/attendee status, Reminder, and the services that answer overlap and free/busy), the public API each class exposes, and the state transitions of an invitation and of an event occurrence. Be explicit about: how a recurrence rule expands to concrete occurrences within a queried window without materializing infinity, how one occurrence is overridden or cancelled without detaching the whole series, how times in different zones are compared correctly, and how overlap and free/busy are computed over one or many calendars.
Requirements
This assessment is a Premium feature.
The statement above is free to read. The functional and non-functional requirements, and the graded canvas that scores your design against them, come with Premium.
Topics
- System Design LLD
- Oop Solid
- Patterns Strategy
- Statemachine
- Testability Clock