Backend for frontend
BFF
A backend service built specifically to serve one frontend's needs, sitting between the browser and one or more downstream APIs.
A BFF gives the frontend the data shape and endpoints it needs, so it does not have to coordinate calls to several services or fetch fields it will not use. It's also the natural place to hold anything that shouldn't reach the browser: an API secret, a session cookie's server-side validation, a call to an internal service with no public-facing auth.
A React Router app running in framework mode with server-side loaders is effectively acting as its own BFF: the loader runs on the server, can hold secrets safely, and returns only the shaped data the page component needs, without a separate service to deploy and maintain.