← Questions

Design opt-in template updates for presentations

0
FigmaSystem designLast asked Oct 2021

A system design interview question asked in Figma's system design round, last asked Oct 2021. It tests versioning, notifications and data modeling.

Template authors publish versions of presentation templates, and each version is immutable. A user creates a presentation from one version and then customizes slide content and some style fields. When the author publishes a newer version, everyone whose presentation is affected learns about it, can preview what would change, and then accepts or dismisses the update. Design the services, data model, APIs, event flow and recovery for this journey.

Requirements

  • Functional: create a presentation from a chosen template version; publish a new version and make the update offer reach every owner whose presentation is still affected, even when notifications are delayed; preview one presentation's update (inherited changes, kept customizations, conflicts) without changing anything; accept an update atomically, or dismiss that version while still being offered later ones.
  • Accepting keeps every compatible customization and reports conflicts instead of silently dropping them.
  • Accept must be safe to retry: a retried accept applies the update once.
  • Non-functional: one popular template can back a very large number of presentations, so publishing must not do work proportional to all of them in the request path. Previews should be fast enough to show interactively.

Clarifying questions

  • Which fields can a user customize: slide text only, or also layout and styles? Can they add and delete slides?
  • What counts as a conflict: the user and the author both changed the same field, or the author removed something the user edited?
  • Must the user take versions in order, or can they jump from version 2 to version 5?
  • Who sees the update offer for a shared presentation: the owner only, or every editor?
  • Is the notification in-app, by email, or both?

What a strong answer covers

  • A data model that keeps inherited template values and user overrides apart: the presentation stores its base version and a set of overrides keyed by stable element and field IDs, never a full copy of the template.
  • A three-way comparison (old version, new version, user overrides) that produces the preview: changes that flow in, overrides kept, and conflicts listed with both values.
  • Finding affected presentations: an index from template to presentations and their base version, and an asynchronous fan-out after publish that writes durable "update available" records, so a lost notification never hides an offer.
  • An accept API that takes the version previewed and an idempotency key, applies the merge in one transaction, and rejects the request if the presentation or the offer changed since the preview.
  • Dismiss as per-version state, so the next version is still offered.
  • Recovery: a reconciler that re-derives missing offers from the index, retries for the fan-out, and what happens when a user edits during an accept.

Follow-ups

  • The author publishes three versions before a user opens the offer. Do you show one combined update or three?
  • How does the user resolve a conflict, and where is that choice stored?
  • How would you let a user roll back an accepted update?
  • How does the design change if presentations are edited live by several people?

Where it's asked

What it tests

versioning · notifications · data modeling

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing