Datastar: Lightweight Hypermedia Framework for Building Interactive Web Apps
Posted3 months agoActive3 months ago
data-star.devTechstoryHigh profile
heatedmixed
Debate
80/100
Web DevelopmentFrontend FrameworksDatastar
Key topics
Web Development
Frontend Frameworks
Datastar
The HN community discusses Datastar, a lightweight hypermedia framework for building interactive web apps, with some users praising its innovative approach and others criticizing its complexity and paid features.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
1h
Peak period
102
0-6h
Avg / period
14.5
Comment distribution160 data points
Loading chart...
Based on 160 loaded comments
Key moments
- 01Story posted
Oct 10, 2025 at 4:46 AM EDT
3 months ago
Step 01 - 02First comment
Oct 10, 2025 at 6:03 AM EDT
1h after posting
Step 02 - 03Peak activity
102 comments in 0-6h
Hottest window of the conversation
Step 03 - 04Latest activity
Oct 14, 2025 at 8:08 AM EDT
3 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45536618Type: storyLast synced: 11/20/2025, 8:23:06 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
Which is weird, because this is (was?) the predominant way to make websites for decades.
[Edit: this should've actually been attached to the GP comment. I agree with the parent.]
If you don't like the syntax, that's your preference. But I'm curious to hear why this is "wrong". Since that's a more objective thing, we can discuss it
You have a DSL based on data-* attributes
But then some attributes get this weird syntax-ish extension
Then some of those attributes accept a Datastar expressions DSL: https://data-star.dev/guide/datastar_expressions
So you can have
Which is just bad designSince they have a full "Datastar expression" language, I'd just expand that. Then you wouldn't need these weird constructs:
By expanding the "Datastar expression" language, do you mean a compiled language or moving all the expressions into JS files or something else?
Doesn't matter. They literally already have a Javascript-like DSL: https://data-star.dev/guide/datastar_expressions
But again, the API design woes are subjective and I think it's perfectly fine to iterate on getting this to a nicer state.
"Wrong" to me suggests a gap in the understanding of fundamentals or of how things work. If the ideas of Datastar are fine to all of us, and our issues with it are ergnomics, then that can be a more focused discussion.
They aren't. This is not good API design
> "Wrong" to me suggests a gap in the understanding of fundamentals or of how things work.Snide vaguely dismissive remarks don't make such remarks true.
> If the ideas of Datastar are fine to all of us
Who's us? Are these "us" in the room with us right now?
This wilful insanity is completely incomprehensible to me (HTMX and lit are also fully infected with it): "Oh no, we are just HTML, we can't do anything" while literally doing tons of things outside of HTML.
Why isn't it a good API design?
> Snide vaguely dismissive remarks don't make such remarks true.
Agreed! I don't believe I was doing anything of the sort.
> Who's us?
People on this thread.
To each their own I guess.
At least, that's my experience and I don't like it when people say that everyone must absolutely use TS when they don't know anything about your situation.
Also, unless I'm misunderstanding it, this revolves a lot around the backend returning HTML to do backend-as-frontend, which given my previous experiences with the concept, I wouldn't want to touch with a 10ft pole. When you consider users with extremely bad internet connections (there are still people on dsl/older satellite/2G), having to make more requests to the backend that return larger blobs of html (as opposed to fewer requests that return JSON when it is relevant) will result in a significantly more degraded user experience
Please don’t reinvent things.
Turns out brotli compression does wonders.
[1] https://checkboxes.andersmurphy.com
Because once that connection is primed you are off to the races.
→ This is the way the Web used to work in the era of 56kbps modems (also, with ten levels of "<TABLE>" for layout).
Some people write their own websites where they blog (where Wordpress would be enough), some build shops with mostly static content that has to load fast but has no real interactivity, others build full-fledged software like Figma/Discord and for the true masters, the DOM is a prison and only <canvas> coupled with GPU-accelerated computations will do.
Obviously htmx and it's siblings are nice for blogs, docs and shops. You don't build a "software" level website with it.
Though, it is certainly possible to cache pages since most sites do not need persistent state - it's just ephemeral things like toggling a button, linking an input box and another caption, etc...
Though you could run the datastar js sdk from a service worker and if you've synced necessary state to browser storage, you could have your backend there.
Also, for slow connections, compression is very powerful - especially over an sse stream where there's redundant info being sent. Another comment here has links to immense demos and the compression ratios are north of 90%.
Also, slow internet is often also associated with slow devices, which cannot handle the bloat of React, css-in-js etc
Datastar VASTLY simplifies everything while sacrificing essentially nothing in the way of functionality.
https://data-star.dev/reference/datastar_pro
Also, I can't see this approach working. Getting enterprise adoption of a front end framework is almost impossible outside of React, let alone paying for a niche one, and the "contact us" approach is a non-starter.
If the core of the framework fits what you need, you could write those additional plugins yourself, rather than relying on the official "pro" ones. My understanding so far is the plugin architecture is intentionally designed for this usecase, so you aren't beholden to the official maintainers to add/tweak features for your specific usecase.
This makes the investment in the tool a lot safer, because you can always swap out pieces that don't fit your usecase, rather than start from scratch with a new framework.
In an enterprise setting, I don't believe the cost alone will be the factor that drives the decision. It'd be weighing up the value of the framework (e.g., UI framework/programming language agnostic stack, simpler architectures, delivery speed, performance, cost of using the framework on users) against the license cost.
> Getting enterprise adoption of a front end framework is almost impossible outside of React, let alone paying for a niche one, and the "contact us" approach is a non-starter.
Two questions on this:
1. Why do you think it's impossible to get org buy-in? 2. Why do those same orgs pick frameworks like Next.js, whose full benefits can only be realized with sophisticated and paid infrastructure?
>> or just to support people who have invested many thousands of hours into making a genuinely innovative framework, and given it away
I've never seen a corporation do this even with projects that don't try and encourage like here.
If you're implying they'll only pay when they've seen the value of the product, then the non-pro part of the framework is incredibly feature-rich and can easily do that.
One time I had a couch delivered. Two guys show up to set it up. One guy says he needs a tool from the truck and walks off, and the other guy starts talking to our dog, and tells us how he used to train pit bulls, and starts doing some weird hand motions and yelling commands to our dog like he’s casting a spell or something.
I think the guy was probably just not all there mentally, like too much former drug use or something. But it was one of those surreal moments where red flags were going off in my head. I went to find the other guy just to make sure he wasn’t robbing us out the back. Because that’s what it felt like: misdirection, social engineering, a performance.
In hindsight, I don’t think there was anything suspicious going on. But the alarm bells in my head were still completely real.
When we see this “everything is an plugin” but “plugin details are internal-only” and “plugin detail is coming” and “1.0 is released” and “but we will have 40 more release candidates before 1.0 final” and “you could support us with pro” and “you dont need pro” and “we don’t recommend pro” and “you can build anything in pro yourself anyway” and “you shouldn’t use this pro feature anyway and should use CSS instead”, and then when people ask a question about any of this inconsistency, we get juvenile responses like “don’t use it then”, “don’t buy it then”, “fork it then”, “my time isn’t free”, and so on. Even though there is no scam, it’s surreal. Like, “is this really happening?” It sets off the same red flags in people’s minds, even when there is no scam.
Datastar seems very cool as a tool, and the developers seem very technically competent. The problems they face don’t seem to be technical problems.
[1] Time-stamped it for convenience: https://youtu.be/eMIB4Bkl08U?si=IfTslvZoGXVbou0w&t=1270
In the case of a web framework, that choice is a bit difficult. But if the software is fully functional for the large majority of users, then charging for niche features, or those that are actively discouraged, sounds like a fair approach to me.
And the framework and docs are so small and simple, that you can read the entire site in an hour or two, in which time you would have noticed the pro features and pricing many times.
I wasn't aware that they are a non-profit organization and agree that my remark doesn't necessarily apply to them since they're not a business. If the pro subscription helps them to maintain the open source project without making any profits, then that seems alright to me.
No matter how you look at it, though, any business model that enables users to use open source software is a much better option for users than any proprietary software. There's no comparison. Given the choice, I'd much rather use OSS that is eventually rugpulled or enshittified than proprietary software, which carries those same risks, while also restricting my freedoms from the get-go, and having additional risks I might not be aware of at all (exploiting my data, security issues, etc.).
Also, they intend for v1, which will be released soon-ish to be essentially the final version of Datastar. There wont be a need for much further development. So there's minimal risk of "rugpull" or even abandonment.
I do think that they should be paid for this work, and be able to sustain themselves from it. So I wouldn't be against it being a business, or the project having a subscription model. The idea of open source being gratis, and products in general being "free", has done enough harm to the world.
I'm sure it would be the same group complaining if it was GPL too.
My problem with this business model is that it has a chilling effect on open source contributions to the project, because it incentivizes the core maintainers to not accept community contributions that overlap with the paid features.
Moreover, ALL of the features are "plugins" - there's nothing stopping anyone from building and sharing their own. It is actually encouraged. In fact, in their next release they'll be releasing and documenting some sort of public API for plugins. Not sure exactly how it will differ from the current form though, since you can already make your own plugins.
They also intend to have some sort of free, open-source "marketplace" for community-built web components, based on their upcoming Rocket web component and Stellar css framework. You would just need to have the Datastar pro license to be able to use any of them.
I can see how this final part might be criticized, but it does seem quite fair to me. Sustainable open source is a big problem - in recent months ive had some important fully-open source dependencies disappear - even ones that were backed by well-funded companies. Moreover, Datastar is registered as a 501c3, and they really don't intend to "make money" from all of this. Its just to pay the bills, travel to conferences etc...
They're very reasonable people and open to all discussion in their discord. Im sure that whatever concerns you still have could be explained quickly if you went there.
In fact, i just posted there about this thread and how its overflowing with nonsensical complaints about how there's no link to or mention of Pro on the homepage - they said sure, we'll add a link.
This model of using deception to hide costs isn't exactly "exploring". It's tried and tested.
> plaster a big sign on the landing page stating that this framework ALSO contains pro features that you have to pay for?
Yes.
I for one don't enjoy being on the receiving end of these marketing dark patterns and manipulation tactics.
Yes!! That's table stakes. It's the bare minimum needed to not be considered malice.
Anyways, constructively, they should add a usual pricing page with a nav for that at the top of the landing page.
It makes it clear that something is priced, right on the landing page.
In the pricing page the cards better make the costs super clear.
It's weird to call them out as indecent and deceitful for not actively marketing features that they really don't think you need. Even when you think you need it, they've actively encouraged people to analyze their problems to identify if it's a real need or a gap in hypermedia fundamentals knowledge.
Also, the top nav has a Pro page that has what you're looking for.
It's only there for Pro users and people who want to support the project [1] and not normal use.
[1] https://data-star.dev/essays/greedy_developer
The common thing to do today is put a "pricing" menu item at the top right. That'd be fine.
Moreover, they actively dissuade people from even buying the pro license because they are quite emphatic that most people/sites do not need any of these features. If you do need them, then it's a small price to pay for the functionality, as well as to make a modest amount to cover costs for their non-profit org. God forbid someone optionally charge something for years of effort that they have given away for free...
It also comes with an immensely useful "Inspector" that shows all the signals, sse events etc, and will soon come with an immensely streamlined web component framework (Rocket) and css framework (Stellar).
I bought the pro license mostly just to support them, but the inspector is great and I look forward to checking out rocket and stellar.
Frankly your response seems very hostile and makes me wants to avoid them more.
Once again, they aren't charging anything. Pay them if you want some largely-unnecessary features, or if you just want to support years of hard work and innovation. That's what I did.
But you do you.
> But you do you.
- seems like a truism. I get the feeling it's meant to be read as "I give up. You can keep whatever wrong viewpoint you have".
I concede that my original comment here was somewhat hostile, but only really the first line. And it wasn't even all that hostile - especially when the rest of the comment was really just informative and positive about datastar.
And, moreover, is standing up to poor behaviour - even if done in a somewhat hostile/confrontational way - really such a bad thing? It seems quite clear to me that they were not communicating in good faith - they didnt come to discuss features, philosophy about open source sustainability, or actual reality of the messaging on the site and their discord server.
Instead THEY are explicitly saying that Datastar's devs are being dishonest in some way for having a pro license (which, again, they quite clearly say most people should not buy) as a way to bring a modicum of sustainability to something that theyve dedicated years to and given 99% of the value away for free.
They could have said "This looks interesting, but I noticed that there's a pro license if you want to get some features. Are these features necessary? Is this price reasonable? Should we be against there being a 501c3 behind this? etc..."
But they did none of that. I think that all that a reasonable person can really conclude is that they're either the disdainful sort of person who thinks all code should be free for everyone, or that they are just trolling, or perhaps even that they dont like how datastar is challenging the status quo of webdev.
Hence, "you do you" - you interpreted it exactly as I intended.
Plenty of other open source projects make money without attracting this kind of negative feedback. It's curious to me that you suggest everyone is intentionally being negative or malicious here, instead of looking at why the project caused such a response.
Moreover, it is quite common for there to be pro versions of libraries these days - tailwind, all sorts of component libraries, etc..
> Plenty of other open source projects make money without attracting this kind of negative feedback
We dont seem to be living in the same reality. In mine, maintaining open source projects is a nearly-completely thankless, profit-less endeavour. It is a rare exception that someone can earn a living from it. And datastar's devs have zero expectation that they'll do so, even with this model - hence it is registered as a 501c3, and the funds will cover things like travelling to conferences to talk about it.
Or if you want to be altruistic (as you keep referring to nonprofit) make it free and solicit donations/patreon.
The current approach is certainly a new one and I am interested to see if it pays off.
And they don't really care if it "pays off" - it's not meant to
299$ lifetime which includes future features seems like a steal. I bought it and don't use it, but I'm excited to see what comes next.
Even if I was paying for that, there's no comparison between AI and a web framework that has many free competitors.
Sad to see developers getting ripped off by AI. Copilot is junk. The whole AI bubble is just a tax powered by fear of missing out. Save yourself 20$ a month, learn to touch type, use snippets and download a local copy of the docs.
Using it for vibe coding where you pay for every token - and end up paying hundreds over dozens of iterations, when it would have been easier to write it yourself - is probably closer to what you're talking about. That's a totally different use case.
Developers are idiots (I include myself in that). The industry is myopic and completely driven by fashion.
Not sure how you can rug pull an open source project...
For now that's fine as it's mainly an on-ramp for Azure. But, if Windows is anything to go by, I imagine the enshitification of vscode is inevitable given enough time.
I guarantee the fact that I referred to a project with an anti Amazon clause as open source will piss some of the off so much that they’ll comment here about it.
you: "How dare you!!!!!"
The conversation on this post is now centered around the fact that they have some premium features for sale.
Edit: Now there’s another post on the front page of HN accusing the datastar team of being greedy.
https://news.ycombinator.com/item?id=45537372
Oh the horror!!!!!!
I mean it’s not war in Ukraine horrible but I think it’s awful that people expect you to work for them for free.
Really an insane thing to see a comment that informs you of pricing for their pro package and have a horde of people jump in with "How dare you!!!?!?!"
Did you forget one of those "full disclosure" thingies at the top of your comment?
In any case, I didn't see anything interesting about it, even less so after reading OP's useful comment on the pricing, but even if I did I would never intentionally use or give money to a company that does astroturfing campaigns.
And it's not a company, it's literally 3 guys who have a 501c3 non profit, and actively dissuade people from buying the pro license because YAGNI.
Hold up, so then why is pasting THEIR documentation into a comment weird?
lol. This is an absolutely insane response to someone simply informing the commentors that there is a price involved in the pro package.
I don't believe it is the right way to play. A Pro support would have been better. Plus the fact that the licensing prevent to use the Datastar Pro in any kind of open-source project. Very strange move.
Here's how you replace the URL without a page refresh:
Similar snippets for the other few and you have successfully avoided helping fund the framework!I hadn’t thought about it, but yes. I say this as someone who paid for Netscape Navigator.
Such a bad move. I told them they should charge more and actually have useful features in pro.
https://data-star.dev/star_federation#nonprofit-organization
Which is priced similar to Tailwind UI, which people are fine paying for.
https://news.ycombinator.com/item?id=45537335
These three demos each run on a 5$ VPS and don't use any of the PRO features. They have all survived the front page of HN. Datastar is a fantastic piece of engineering.
- https://checkboxes.andersmurphy.com/
- https://cells.andersmurphy.com/
- https://example.andersmurphy.com/ (game of life multiplayer)
On both the checkboxes/cells examples there's adaptive view rendering so you can zoom out a fair bit. There's also back pressure on the virtual scroll.
Right but this says “bring your own backend” in big letters on the splash page. So surviving HN isn’t really something Datastar is doing here.
He shared examples of some immensely dynamic apps that are running on a potato and survived HN, showing that this simplifies things greatly and can scale. Hypermedia-first is a very viable, and simplified, approach.
Surviving, or not surviving, a traffic influx is a backend restriction.
OP is a talented developer that wrote a backend capable of surviving a ton of traffic. Other developers on the internet have written backends that cannot sustain a ton of traffic.
The choice of frontend framework is separate from both. You can write a performant web app that uses React. I’m sure you can write one that falls over immediately with Datastar.
But I think that the real point that /u/andersmurphy was trying to convey was that hypermedia is VERY performant because immensely talented C++ engineers have optimized precisely this, for decades. The notion that "frontend" devs have that the DOM can and must be managed via JS is simply ridiculous, and is one of the primary things that datastar and hypermedia approaches in general are trying to combat.
In fact, he openly states elsewhere how the sites' backends are actually done in a deliberately dumb, unperformant way, where the backend streams the ENTIRE DOM with each sse message, which gets morphed into the DOM. He could have done something more granular, like streaming only the checkboxes that have changed, but it wasn't at all necessary because the dumb way worked well.
Moreover, the SSE streams benefit from immense compression ratios because somehow the compression window overlaps across messages. Something like 95+%, IIRC.
The idea that UI state should be managed locally is ridiculous now?
Anyway, browsers are built specifically to render HTML. And html/hypermedia is specifically meant to manage and transfer state. The web has lost its way. If you want to read more about this, this free book is a great start: https://hypermedia.systems/book/contents/
Or the essays at HTMX https://htmx.org/essays/
Good luck to you
I read about approaches like this and I still don’t see the reason to do them, beyond “because you can” and “JavaScript is bad”. The separation of data and display logic between server and client is a sensible separation of concerns. It’s the way any non-web solution does it and I don’t really see what would make the web so special that a different approach is worth it.
I think for me the key thing is Datastar lets me keep most of my state on the backend, which makes the backend much simpler to write. It also lets me do immediate mode streaming of the HTML, which again is non trivial in something like react without a lot of added complexity.
So it's an enabler in that sense. But, yes it's totally possible to write a backend that falls over with datastar like any technology.
I also agree, that Datastar does benefit from backend experience and if you don't have that experience it can to some extent feel like:
"Draw some circles. Now draw the rest of the Owl".
Please, I'm begging you to share this "well documented" fact that most frontend frameworks barely "handle" on the simplest of sites.
https://infrequently.org/2024/11/if-not-react-then-what/ (there's MUCH more at this site as well)
https://www.zachleat.com/web/react-criticism/
> Nothing that is visible "below the fold" should ever run or load until the page is scrolled down by the site visitor.
The commenter septupled down and eventually blamed trolls :D
1. https://news.ycombinator.com/item?id=42285326
Though, for the record, I agree with everything that person - and other sibling commenter - wrote. It is quite obvious the people were not reading and replying in good faith.
127 more comments available on Hacker News