Skip to content
Commitwise
Menu

Design the mobile client of a feed-based app (system design for mobile engineers).

System designSenior

In shortA layered client: an API layer with cursor pagination, a local database as the single source of truth for offline and instant start, repositories that sync in the background, an image pipeline with downsampling and caching, and UI that observes the database. Then cover performance, offline writes, push, analytics and rollout.

Model answer

Clarify: feed, post detail, like and comment, compose with media; offline reading; how fresh the feed must be; scale (millions of users, low-end devices); platforms.

Architecture:

  • Network layer: a typed API client with auth refresh, retries with backoff for idempotent calls, and cursor pagination.
  • Local database (Room, SwiftData/Core Data, SQLite) as the single source of truth: the UI observes it, so the app starts instantly from cache and works offline.
  • Repositories fetch pages, write them to the database, and expose streams. A paging component (Paging 3, or a custom one on iOS) loads more as the user scrolls.
  • Offline writes: likes and comments are applied locally at once and queued in an outbox table; a background worker (WorkManager, BGTaskScheduler) sends them with idempotency keys and reconciles conflicts.
  • Images: a pipeline that downsamples to display size, caches in memory and on disk, prefetches next items and cancels off-screen loads.
  • Real-time: push notifications for important events; a WebSocket or polling only while the feed is visible, for “new posts” banners.

Quality: performance budgets (startup, scroll jank), memory limits, accessibility, analytics with privacy in mind, crash reporting.

Delivery: modular codebase, feature flags for risky features, phased rollout with crash-rate gates, and backward-compatible APIs because old app versions stay installed for years.

What they're looking for

Requirements and constraints of mobile (network, battery, memory, app lifecycle), architecture layers, data flow, pagination and caching, offline-first writes with a sync queue, image loading, real-time updates, testing, feature flags and phased rollout.

Common mistakes

  • Jumping to screens without clarifying requirements and constraints.
  • Ignoring offline and flaky network behavior.
  • Loading full-resolution images into lists.

More system design questions

Esc

Type to search the whole site.