This repo is a complement to my Medium article where I document how I approach FastAPI and its template engine Jinja2 to build hypermedia-driven applications using HTMX.
The brilliance of HATEOAS, as implemented here with htmx, lies in the fact that we always deal with an HTML response, rather than a typical JSON API response. This concept aligns closely with the original definition of REST, as coined in Roy Fielding’s doctoral dissertation, where he emphasized that any REST response should be self-contained and where client behavior should be guided by hypermedia controls. We avoid any client-side interpretation, routing or state management of the data returned to construct the DOM, in contrast to the traditional SPA models and consequent JSON APIs that are built on this interpretation. A true server-side rendering system. This is where the meme “REST: You’ve been doing it wrong all along” comes from in terms of traditional modern web app architecture.