Sparround

Mobile system design: the banking app case

The mobile system design interview ("design a mobile banking app") differs from backend system design — the framework expected of you:

1. Clarify requirements (5 min) — functional: which screens (login, accounts, transfer, history)? non-functional: offline support? security level? device spectrum? Skipping this step is the biggest mistake.

2. High-level architecture (10 min) — layers: UI (MVVM/MVI) → domain → data (repositories, Room as SSOT, Retrofit); modularization (feature + core); DI (Hilt).

3. Deep-dive critical flows (15 min) — detail the 1-2 flows the interviewer picks:

  • Login: the token pair, biometrics (CryptoObject), session locking
  • Transaction history: Paging + RemoteMediator, offline cache, staleness indicators
  • Transfer: idempotency keys, step-up auth, non-optimistic UI (server confirmation)

4. Cross-cutting concerns (10 min) — security (pinning, Keystore, hardening), performance (startup, baseline profiles), monitoring (crash, ANR, analytics), the test strategy.

At every step, voice the trade-offs: "we could build an offline queue here, but the double-charge risk rules it out for payments".

text
[Transfer ekranı]
   │ məbləğ + alıcı (client validasiya = yalnız UX)
   ▼
[ViewModel] ──── idempotencyKey = UUID yaradılır
   │
   ▼
[TransferRepository]
   │  POST /transfers  (Idempotency-Key: header)
   │  ├── timeout/şəbəkə xətası → EYNİ key ilə retry təklifi
   │  │     (server key-i tanıyır → əvvəlki nəticə, double-charge YOX)
   │  ├── 402 limit / 403 → error body-dən səbəb → UI
   │  └── step-up tələbi (böyük məbləğ) → biometrika/OTP → təkrar
   ▼
[Server təsdiqi gələnə qədər "İcra olunur..."]
   │  (optimistic "uğurlu" YOX — pul əməliyyatıdır)
   ▼
[Nəticə ekranı] → tarixçə cache-i invalidate → Room yenilənir → Flow UI-ı yeniləyir

The transfer flow design — what goes on the whiteboard

The evaluation criteria (on the interviewer's sheet): did they ask requirement questions? separate layers? consider offline/error cases? raise security unprompted (a bank!)? justify trade-offs? Communication matters as much as depth: think aloud, use the whiteboard, ask the interviewer for direction ("shall I go deep on login or the data layer?").

🛠 Practice task

Set a 45-minute timer and design a "mobile banking app" on paper.

  • Spend the first 5 minutes only on questions (ask and write them yourself).
  • Draw the layer diagram, then deep-dive the transfer flow (idempotency, step-up, server confirmation).
  • In the last 5 minutes, write down 3 weaknesses of your own design.

Done when: the sheet holds a diagram + 5 requirement questions + 3 trade-off notes.

📚 Sources and documentation