call(back)

Design a Photo Sharing App (Front End)

Design the web client of a photo sharing app: an infinite feed of posts (photo, caption, likes, comments), a post detail view, a profile grid, and uploading a new photo with a caption. Focus on the client.

Cover the requirements, the component architecture, the data model and API for a paginated feed, feed rendering (infinite scroll, image loading, no layout shift, memory on long sessions), interactions (likes and comments), the upload flow, and performance, accessibility and privacy.

Hints

Hint 1

Page the feed with a cursor, not offsets: new posts arriving at the top shouldn't make the next page repeat or skip items.

Hint 2

Know every image's aspect ratio before it loads, from the API. Reserving the box is what prevents layout shift; srcset and lazy loading handle the bytes.

Hint 3

Treat upload as a pipeline: pick, preview, resize and strip metadata on the client, upload with progress and retry, then create the post.

Asked at