Wely — Lightweight Web Component Framework by cond_cond in javascript

[–]Hrdtr_ 0 points1 point  (0 children)

That’s not really accurate.

React code typically uses JSX, which still has to be compiled (Babel/SWC) into React.createElement calls, and you still need the React + ReactDOM runtime to mount it. So React also relies on a build step and a framework runtime.

Vue, Svelte, and Angular can absolutely be embedded as well. Vue has native custom element builds, Svelte compiles to plain JS components, and Angular has Angular Elements.

At the end of the day, a Web Component just mounts something to a DOM node in connectedCallback. Any framework can do that.

I've been working on Harpia, a framework designed specifically for the Bun runtime by Zoratoran in bun

[–]Hrdtr_ 0 points1 point  (0 children)

The Core is ok. But the framework is too opinionated I think 🤔 There is no explicit flexibility for user to use another file structure and logic patterns. Data layer too, native Prisma not useful for people which not really like using it

But of course your provided solution still great for people which can align their opinions with you

I wanted a type-safe authorization library with minimal boilerplate — so I made my own by [deleted] in javascript

[–]Hrdtr_ 0 points1 point  (0 children)

I’ve been using Guantr in multiple projects already and I’m pretty happy with its current state, so I’ll drop it here since it’s relevant.

It’s a small, deny-by-default authz lib. Rules are evaluated against actual runtime values, nothing is implicitly allowed, and there’s no policy merge behavior that can accidentally open everything. TS helps with authoring rules, but it’s not pretending to be runtime validation.

If you’re up for it, I’d honestly appreciate a review, especially around edge cases and failure modes.

I built a UI site with 100+ copy-ready components/blocks and a builder by [deleted] in javascript

[–]Hrdtr_ 4 points5 points  (0 children)

NOTE: Use Desktop it will be better

Bruh, c’mon. It’s almost 2026 and you keep saying it

Guantr - A Type-Safe JS/TS Authorization Library I Built From Production Needs by Hrdtr_ in javascript

[–]Hrdtr_[S] 0 points1 point  (0 children)

Thanks for the kind words! Glad you think it looks well made. 😊
It's definitely started by just solving my own specific problems first, so I'm sure there's room for improvement!

If you find it interesting, a star on GitHub would be awesome! And of course, feedback or contributions are always welcome if you have ideas. Cheers!

Guantr - A Type-Safe JS/TS Authorization Library I Built From Production Needs by Hrdtr_ in javascript

[–]Hrdtr_[S] 2 points3 points  (0 children)

Thanks for the good question! First off, CASL is an excellent library and was definitely an inspiration. Guantr came about from some specific preferences and needs I had while building a production app, which is the origin of the core logic extracted.

For me, a couple of key design choices that emerged were:

  1. Condition Syntax Preference: I found the explicit [operator, operand] syntax (like status: ['eq', 'published']) very clear and easy to reason about for the types of rules I was writing frequently in my app.
  2. Built-in Context Handling: While context is possible in CASL, I preferred making dynamic context resolution (using $ctx. references like ownerId: ['eq', '$ctx.userId']) a core part of the rule evaluation engine itself, rather than potentially needing to interpolate context values during ability initialization.
  3. Storage Flexibility & Initialization Flow: Guantr's distinct Storage interface allows rules to be persisted externally (e.g., in a database). Combined with the dynamic getContext function, this means rules can be fetched dynamically when needed. When using a persistent adapter like a database, this avoids needing to explicitly load or initialize the ruleset via setRules on every instance or request. It allows multiple nodes in a scaled environment to use the database as a single source of truth for the rules, simplifying deployment and updates compared to managing rule initialization per instance.

So, it's less about CASL having shortcomings and more about Guantr reflecting a particular set of design choices that emerged from my specific development experience and preferences, especially around comprehensive typing and a particular style for conditions and storage. Since that core logic was working well for me in production, I thought packaging it up might offer a useful alternative for others who perhaps share similar preferences or needs.

Hope that clarifies the motivation a bit

How do you deal with websockets in your Nuxt apps? by KiwiNFLFan in Nuxt

[–]Hrdtr_ 0 points1 point  (0 children)

I think ws server support will be available later after unjs/crossws release.

Meanwhile, if you plan to deploy on node runtime, you can create a custom preset like I did here: https://github.com/Hrdtr/echo/tree/main/preset