Ask HN: Htmx or SPA

6 points by besil ↗ HN
I'm a CTO & co-founder of an early stage fintech start-up (EU). We have to build our MVP for February and other founders. We have some funds (<1M).

Our product has very little interaction and reactiveness: it's primary a dashboard with a lot of backend logic (AI). I'm choosing the tech stack: Django will be the foundation, since I'm primary a django dev and other co-founders know python.

I'm in the middle of a front-end blues: should we go with a React SPA (+nextjs) or choose html + htmx?

I've read a lot on htmx and looks like a very good technology. I also used it in some hobby projects and fell in love. I have very poor React experience, but I know it's roaring in the FE market.

Just wondering if anyone used htmx as primary FE tech and want to share feedback. Thanks in advance folks!

8 comments

[ 2.9 ms ] story [ 27.1 ms ] thread
Since you mentioned little interaction and reactiveness, I would say go for htmx. At work, we have a large MPA in ASP.NET. If a page is simple enough, it is done in Htmx. If it requires lots of interactivity, we use Vue. But I tend to push the boundary on what counts as enough interactivity to warrant the use of Vue very far, and I prefer to do most stuff in htmx these days.
I helped scale a startup from less than 10 to 200 people as CTO, doesn't make me an expert but means I understand the pressure you are under. Time is your most precious resource.

  1. Just get it working without any js.
  2. Go back and sprinkle htmx for interactivity if you have time.
  3. Launch and start making money
  4. If you need even more bling - hire some FE devs and go to town (only *after* your product has revenue to support it)
Our stack is that Django + htmx + Alpine. I wouldn’t say htmx an unalloyed joy to use. However, it’s very good at what it does and stable.

Also, will you need to support an API product or a mobile frontend? Either of those could change the calculus in favor of React or something similar.

I wish there were a more stable frontend framework that didn’t require constant maintenance.

Thank you! In the long run, we may have some integrations with 3rd parties using API, but it's not sure. We won't have a mobile app. For these reasons I was thinking not to use React and, whenever we will have 3rd party integration API, we will then create ad hoc REST API for them
I'm a fan of Remix Run - full stack js framework based on React
If I were you I wouldn't build the frontend from scratch. There are like a million drop in dashboards that you can buy for like $100 that can be easily hooked up to your backend. Stuff like MUI and probably a bazillion others. Just change the styling a bit if you need to. But that's way less work than trying to build and maintain a bespoke system.
Yeah, agree! I'm planning to use a dashboard theme, there are bilions from bootstrap or tailwind. What's your favourite?
I wouldn't just use a CSS theme, but something with bolts included (navigation, state, charts, UI widgets, animations, etc.). In other words, something with styling AND interactivity code already built in.

For work, we're moving an existing homebrewed system to one of these: https://mui.com/store/#populars

It builds on top of MUI, which is a collection of ready-to-use React UI widgets that are pretty well designed (based on Material) and implemented in terms of UX/UI details. If you're not familiar with those nuances, MUI gives you a very good starting point that will meet 90% of needs out of the box, but is still very extensible if you ever do need to customize something. The one downside is that your dashboard can end up looking a bit generic, "Material" style, but that's easily fixed with some CSS tweaks here and there. The reverse, starting from a CSS-only theme and building up around it, is much harder.

Then the dashboard templates build further on top of that to give you ready to use data widgets that you can just hook up to your backend. I think using something like this can save you hundreds of hours from not having to reinvent frontend basics for a basic dashboard. Just my 2¢.