Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Frontend News Feed with Offline Virtualization

Design the client architecture for a rich social feed with cursor pagination, hover cards, offline reads, and a virtualized list.

Problem statement

Design a rich social-feed frontend with mention and hashtag hover cards, API and local data models, pagination, offline behavior, virtualization, component boundaries, and explicit performance goals.

For this exercise, assume cursor pagination, stable feed-item IDs, optimistic local reads, idempotent page merges, and recovery from a bounded offline interval.

What to build

  1. Render cursor-paginated feed items without duplicates or visible reordering during normal scrolling.
  2. Render sanitized rich text whose mention and hashtag tokens open accessible hover cards.
  3. Show a bounded cached snapshot offline and reconcile it when connectivity returns.
  4. Keep scrolling responsive by virtualizing items with dynamic measured heights.

At scalePractice assumption

  • One session may traverse 10,000 heterogeneous items while keeping no more than roughly 40 mounted item shells.
  • Pages contain 25 stable item IDs and are merged idempotently by item version.
  • The offline cache retains the most recent 500 items for up to 24 hours.
  • Initial cached content should paint within 500 ms and scrolling should avoid long main-thread tasks over 50 ms.