This is a bit of a sidenote, but I hadn't personally been aware of Next.JS's BFF (backend for frontend) approach before, and it looks pretty magical (I mean that in both good and bad ways):
function Page({ data }) {
// Render data...
}
// This gets called on every request
export async function getServerSideProps() {
// Fetch data from external API
const res = await fetch(`https://.../data`)
const data = await res.json()
// Pass data to the page via props
return { props: { data } }
}
export default Page
Docs: https://nextjs.org/docs/basic-features/data-fetching#getserv...I have a hard time imagining this kind of architecture scaling well to Real Production Applications, but for whipping something together it does seem incredibly easy.