Building a Web App with Go and HTMX: My Experience
Explore the journey of building a web app using Go and HTMX, highlighting the simplicity, challenges, and key insights gained from the experience.
1 mars 2025
Published
Hugo Mufraggi
Author

Building a Web App with Go and HTMX
Today, I want to share my experience developing a small web app without TypeScript or JavaScript.
I don’t consider myself an actual full-stack developer. I struggle to choose between all the TypeScript frameworks available. Making a choice means renouncing the others, and that always frustrates me.
Project
Every day at work, I have to log what I did the previous day in a Slack bot. The problem? I forget half of what I do.
So, I decided to create a small web app with a few simple features:
- A login system for authentication.
- A form to submit what I did during the day.
- A calendar to select a date and retrieve all my saved tasks.
- A feature to clean and structure my daily summary using an LLM.
The Technical Stack
- Language: Golang. My favorite language for many reasons.
- Web framework: Echo — lightweight, efficient, and easy to use.
- Database: SQLite — perfect for quick prototyping.
- Frontend: HTMX, HTML, and Tailwind.
- Templating: Templ — allows embedding Go logic in HTML (loops, conditionals, etc.).
- LLM: Le Chat.
- Dev tools: Air for hot reloading (though I’m not a huge fan).
Feedback
I haven’t finished this project yet. The LLM integration is still missing; I don’t know when I’ll get around to it. But even in its incomplete state, I think my experience might be valuable to share.
Golang, Echo, and Templ
Golang offers a great developer experience. You install Go, and everything you need is included — linter, testing framework, and more. The type system is robust and allows for clean, maintainable code when combined with dependency injection and composition patterns.
Echo is one of the best Go frameworks. It’s stable, well-maintained, and easy to learn. It’s my go-to choice when starting a new API. I’ve had to switch frameworks mid-project at work due to poor maintenance, and I appreciate Echo’s reliability. (article)
Templ was the real surprise of this project. On paper, it’s just a templating engine that lets you embed Go logic in HTML. In practice, it’s a potent tool that deserves more recognition. The only downside? The JetBrains GoLand extension for Templ is terrible, which made development a bit annoying, but it wasn’t a dealbreaker.
HTMX for Large Projects?
I have trouble imagining using HTMX for a large-scale project, regardless of the backend language. It’s great for small projects or internal tools. However, as soon as the project grows, strict architectural conventions become necessary. Otherwise, the codebase quickly becomes messy.
I strongly recommend using dependency injection and composition patterns to keep things manageable.
In my case, I often found myself hacking solutions together. That’s not my preferred way of developing. You must introduce Alpine.js or another tool when components need more complex interactions. I initially hoped to avoid learning another front-end framework, but I still had to rewrite parts of my app to make everything work smoothly. It was an incredible learning experience, but I wouldn’t do it in a professional setting.
Conclusion
Building this small app was an interesting experiment. Would I use this stack again? Probably not.
I love Go and its ecosystem, but HTMX isn’t for me. I’d instead go with a meta-framework like Nuxt for a full-stack web app. That said, if you’re curious about HTMX, try it out! Your experience might be different from mine, and no matter what, you’ll learn something valuable.
And in case you’re wondering why I didn’t finish the project — I’m currently deep into learning CQRS and DDD with TypeScript and C#. In short, I have plenty to keep me busy. But if you want to experiment with HTMX, go for it. It’s worth it just for the learning experience!