When cards own fetch calls, every redesign becomes a data refactor. This case study shows a thin repository + service contract used across the portfolio.
Challenge
- UI components coupled to raw data shapes
- No clean path to swap mock for CMS
- Error handling scattered across screens
Approach
- UI → service → repository → data source
- Typed DTOs and normalized errors
- Mock repository first, same interfaces forever
- Never leak raw API shapes into presentational components
Results
Screens stay dumb and replaceable. Backend swaps no longer rewrite the visual system — only the repository implementation changes.
Topics: Architecture, TypeScript, API
All case studies