Repository & Data Layer

ARCHITECTURE › Patterns

How repositories become the single source of truth abstracting network, cache, and database.

The data layer is a near-guaranteed interview topic because it tests whether you can keep business logic and data access out of UI and ViewModels. Interviewers probe how repositories abstract data sources, why they expose immutable Flows, where caching and conflict resolution live, and how you map DTOs to domain models. Strong answers distinguish one-shot from streaming APIs and explain main-safety and single source of truth.

What this covers

Study this topic

Further reading