The Backends for Frontends pattern helps us to create separate backend services for all, or for specific, frontend applications (user interfaces), with the user interfaces sending a request to their specific backend services. This pattern is useful if you want to avoid having a multi-interface customization for a single backend.
The following diagram depicts what we are trying to achieve:
The preceding diagram tells us that we have two API Gateway blocks. One is Mobile - Product, which provides the endpoints of Product Service to the clients of mobile devices, and the other is Web-Vendor, which provides the endpoints of Vendor Service to all the web clients.
We have created two new projects for this: FlixOne.BookStore.Web.ApiGateway and FlixOne.BookStore.Mobile.ApiGateway.
Consider the following code of the apiroute.json file...