Why We Use HTMX to Build Simpler Web Applications

At RemarQable, we use HTMX to build interactive web applications without unnecessary frontend complexity. Here's how server-rendered HTML, reusable partials, and a consistent engineering approach help us keep our applications maintainable.

At RemarQable, we use HTMX across our applications because we want to build interactive software without making the frontend more complicated than it needs to be.

There are plenty of tools for building modern web interfaces. JavaScript frameworks can be excellent for applications that need extensive client-side state and complex interactions. But for the kinds of applications we build, introducing a full frontend framework can mean adding another layer of architecture, dependencies, and code to maintain when a simpler approach would do the job.

Our preference is to start with server-rendered HTML and use HTMX to handle interactions that would otherwise require custom JavaScript. If HTMX can do what we need, that's generally the approach we'll take.

It's a straightforward principle, but it influences how we structure our applications and how we approach new features.

Build Around the Server

A core part of our approach is keeping the server responsible for application logic and rendering the interface.

With HTMX, HTML elements can trigger HTTP requests and specify where the server's response should appear on the page. Instead of writing JavaScript to send a request, process a response, and manually update the DOM, we can often let the server handle the operation and return the HTML we want the user to see.

Consider a user editing a setting or updating a profile. We don't necessarily need a client-side framework to manage that interaction. The server can validate the input, save the change, and return an updated section of the page. HTMX swaps that response into place without requiring a full page reload.

The same approach works for things like search and filtering, inline editing, pagination, notifications, and forms with validation feedback.

This keeps the implementation close to the application logic that already exists. We aren't automatically creating a separate frontend layer to manage data and reproduce decisions that the backend can already make.

Why We Use Partials

One of the most useful parts of this approach is how we structure our templates.

Rather than treating the entire page as one thing that needs to be re-rendered, we break the interface into smaller, reusable sections. These are commonly called partials: template fragments responsible for rendering a particular part of the interface.

When an interaction occurs, the server can return the relevant partial, and HTMX can replace just that section. The rest of the page stays where it is.

For example, updating a profile field doesn't need to mean rebuilding the whole page or writing custom JavaScript to manage the transition between display and edit modes. We can render the editable form, submit it to the server, and replace it with the updated display once the change succeeds.

This gives us a clear way to build interactive interfaces out of smaller pieces. It also makes individual features easier to change because we can work on the relevant template and its server-side behavior instead of untangling a larger client-side implementation.

We've documented these patterns in our engineering blueprints so the approach stays consistent across projects. Our Python blueprint's HTMX patterns cover things like inline editing, search, loading additional content, form handling, and returning partial templates. Our Go blueprint's HTMX patterns follow the same general philosophy, using server-rendered templates and Gin handlers to return either a full page or the relevant HTML fragment.

The implementation details differ between languages, but the underlying idea stays the same: let the server render the interface, and use HTMX to update the parts that need to change.

JavaScript When It Actually Helps

Our preference for HTMX doesn't mean we avoid JavaScript entirely. It means we don't want to write custom JavaScript for interactions that HTMX already handles well.

Some behavior belongs in the browser. Opening and closing a dropdown, managing a modal's open state, or handling other local interface behavior may not need a server request at all. For those cases, a small amount of client-side JavaScript can be the right tool. In our Go blueprint, for example, HTMX handles server interactions while Alpine.js handles lightweight client-side behavior.

The distinction is important. We want the tools in our frontend to have clear responsibilities instead of building overlapping systems that all try to manage the same interaction.

We also recognize that HTMX isn't the right answer for everything. Applications that depend on extensive client-side state, offline functionality, or complex real-time interactions may need a different architecture. The point isn't to force every problem into one tool. It's to avoid introducing complexity before the application actually calls for it.

A Consistent Approach Across Applications

Using HTMX is one part of a broader engineering principle at RemarQable: we want the software we build to remain understandable and maintainable as it grows.

Every additional framework, abstraction, and dependency creates something that developers need to learn, maintain, debug, and eventually update. Sometimes that cost is justified. When it isn't, we're better off keeping the implementation simple.

Our engineering blueprints help turn that preference into a repeatable approach. Rather than leaving frontend architecture entirely up to individual implementation decisions, we document the patterns we want our applications to follow. That gives us a shared starting point when building new features and reviewing existing code.

We apply the same kind of reasoning to other engineering decisions, too. As we discussed in How I Use AI to Develop Software Without Giving Up Engineering Judgment, having a powerful tool available doesn't automatically make it the right choice. What matters is understanding the problem and choosing an approach that solves it without unnecessary trade-offs.

For us, HTMX strikes that balance. It gives us a practical way to build interactive web applications while keeping the frontend relatively small, the server-side logic central, and individual interface components easy to replace.

We're not trying to use the fewest tools possible just for the sake of it. We're trying to build software that does what it needs to do without making the next feature harder to maintain than it needs to be.

Think your business fits?

We buy established B2B SaaS businesses and run them for the long term. Conversations are confidential, and we’ll tell you plainly whether it’s a fit.