Hacker News new | ask | show | jobs
by whodev 927 days ago
I answered this before on a pretty similar question a few days ago, but my go to stack for my small SaaS "startup" has been the HAG (HTMX, AlpineJs, Go) stack.

With this you stack you have a dead simple web application that can be completely self contained in the executable with `go:embed`. That makes deployment an absolute breeze. Since I also attempt to use as few third party packages as possible and the ones I do use are pure Go, I can containerize my app and deploy it with Google's distroless base image. That helps in reducing my attack surface.

And while my app is a monolith using an embedded LibSQL database (SQlite), I can easily change my app configurations via environment variables to use a remote LibSQL server and then scale my app behind a load balancer with more servers.

It's honestly such a simple yet effective stack for development. My one web app handles both the api and web requests, I can easily scale, and building my app is fast.

Edit: I should also preface, that all the HTML/CSS/JS used by my website are (mostly) vanilla and developed by myself. So no use of a CSS library like Bootstrap, Bulma, or Tailwind. And also no use of JS libraries like JQuery. I do use HTMX and Alpine, but they are both being embedded into the executable like I stated above.