view model
Data shaped exactly for one screen, with the field names and values the frontend needs and nothing else.
In more detail
Instead of passing an internal service record such as raw_user_id and email_addr to the browser, the BFF maps it to id, email and avatarUrl. This hides internal details and lets the backend change without breaking the UI.
Related terms
- Backend for Frontend — A small backend service built for one specific frontend, which gathers data from other services and shapes it exactly for that frontend’s screens.
- DTO — A plain object whose only job is to carry data across a boundary, such as the body of an API request or response.
Taught in
- API Gateway & BFF Patterns: Backend-for-Frontend — Production Full-Stack Engineering