Skip to content

This repo is a complement to my Medium article where I show how I approach FastAPI Jinja2 templates as a hypermedia-driven application using HTMX and Tailwind CSS.

Notifications You must be signed in to change notification settings

ricardomrcruz/FastAPI_Jinja2_HTMX-Login_Form_Dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

FastAPI Jinja2 Templates with HTMX - Login Form & SaaS Dashboard

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.



FastAPI-Jinja2-HTMX-Server-Architecture

About

This repo is a complement to my Medium article where I show how I approach FastAPI Jinja2 templates as a hypermedia-driven application using HTMX and Tailwind CSS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published