Daily iOS
iOS system design

Mobile feature blueprint

You're explaining a card freeze feature for a banking app in a one-hour system design session. What interfaces would you use to separate the screen, the domain use case, the API, and analytics?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Cut it into four protocols: use case, Repository, ViewModel, and Analytics. The use case calls the API through a CardRepository protocol and returns a domain value, and the ViewModel knows only the use case and builds screen state. Analytics events go through an analytics protocol fed by the use case's result, so the screen knows neither the API nor the analytics SDK.

Share a question