Building an internal tool with Laravel and HTMX
Not every web application needs to be a single-page app. For internal tools where the user count is small and the operation cost is real, HTMX has become our default frontend approach.
Why not Vue or React?
Sometimes we do reach for Vue or React. But for a CRUD-heavy line-of-business app where most interactions are "submit form, get table back," a full SPA is overkill. The build pipeline, the state management, the API surface area, all of it.
What HTMX gets right
HTMX leans into HTML over the wire. The server returns rendered fragments, HTMX swaps them into place, the page never reloads. The mental model maps cleanly onto how Laravel already works with Blade.
The pattern we use
Controller methods return one of two things: a full Blade view, or a partial. We detect the HTMX request via the HX-Request header and branch accordingly. Most actions become a single method that handles both cases.
When we still reach for Vue
Real-time collaborative editing. Heavy client-side state like canvas tools or design surfaces. Apps that should work offline. For everything else, HTMX is faster to build and easier to maintain.