I was nursing a hangover from last night’s Valley pitch fest, thumbing through GitHub notifications, when this popped up: a repo by a 12-year-old named permzplus, touting itself as a 2KB assassin for CASL.
permzplus. Yeah, that’s the hook right there—a zero-dependency auth engine that swaps recursive nightmares for a slick one-pass scan, caching everything into O(1) lookups. The kid’s not messing around; he’s got a 100/100 Bundlephobia score, meaning your bundle stays lean while handling complex role inheritance like it’s no big deal.
Remember When Tiny Libs Ruled?
Back in 2012, when jQuery was king but folks were sick of its kitchen-sink bloat, out came Zepto—a 10KB firecracker that did 80% of the job. permzplus feels like that moment reborn for authorization. CASL? Solid, sure, but 100KB? That’s a Cadillac when you need a scooter. This kid’s project strips it to policy.ts essentials: line 111 hides the magic, turning graphs into flat caches. No recursion rabbit holes.
I built permzplus, a 2KB auth engine with 0 dependencies and a 100/100 Socket quality score. It replaces recursive graph-walking with a one-pass linear scan to turn complex role-inheritance into $O(1)$ cached lookups.
That’s the creator’s pitch, straight from the README. Emojis and all (:D), but the code? Clean. Brutally efficient.
And here’s my unique cynicism: this isn’t just kid genius—it’s a shot across the bow for npm’s obesity epidemic. We’ve let libs balloon while perf tanks; permzplus predicts a micro-lib rebellion, like how Svelte gutted React’s virtual DOM worship. Who profits? Not the VC-backed bundle monsters. Indie devs shipping tight apps, that’s who.
Can PermzPlus Really Handle Real ABAC?
ABAC—Attribute-Based Access Control—for the uninitiated, it’s rules on steroids: ‘Can user X with role Y tweak resource Z if condition W holds?’ CASL does it recursively, walking inheritance trees that explode in size. Slow. Memory hog.
permzplus? One linear pass. Builds a flat map once, caches it. Lookup? Constant time. Benchmarks aren’t out yet (kid’s 12, cut him slack), but math doesn’t lie—O(n) build beats O(n depth) queries every time for deep hierarchies.
Test it yourself. Clone the repo (https://github.com/PermzPlus/Permzplus), fire up a Node REPL. Define policies like:
const policy = new PermzPlus({
roles: { admin: ['user', 'editor'], editor: ['viewer'] },
resources: { post: { create: 'editor', update: 'admin' } }
});
Boom. policy.can('admin', 'post', 'update') flies.
Skeptical me wonders: edge cases? Nested attrs? The code’s young—11 stars now—but Socket.dev’s perfect score screams quality. No deps means no supply-chain hacks either.
Short para: Impressed.
Now, the sprawl: CASL’s fans will scoff—‘It’s battle-tested!’ Fine. But who’s using CASL in a 2024 SPA where every KB kills Lighthouse scores? Mobile? Forget it. permzplus slots into Deno, Bun, even browsers sans bundler drama. And that policy.ts? 200 lines of TypeScript poetry—no abstractions for abstraction’s sake.
Why a 12-Year-Old Beats Silicon Valley Vets
Kid’s bio: self-taught, probably glued to YouTube and LeetCode. No CS degree, no YC demo day. Just pure, unfiltered code.
We’ve got PhDs at FAANG shipping 1MB ‘solutions’ riddled with lodash imports. permzplus? 2KB gzipped. That’s the real flex.
Corporate spin? None here. No landing page begging for your email. Just GitHub, stars, and a plea: “drop a star if you want high-performance ABAC without the 100KB library bloat.”
My bold prediction: forks incoming. Someone’ll wrap it in React hooks. Another for GraphQL. By 2025, it’ll underpin half the indie SaaS auth stacks—because who pays for bloat when free genius exists?
But caveats. Production? Audit it. Kid’s smart, but not Google-hardened. Still, for prototypes, side projects? Gold.
One sentence: Star it.
Is This the End of Bloated Auth Libs?
Nah. Auth’s sticky—compliance, audits, all that jazz. CASL survives enterprise. But for the 90%? permzplus shifts the Overton window. Devs, ask: do you need recursion, or just fast ‘yes/no’?
Unique insight time: echoes Preact vs React. Both work. Tiny wins mobile/web perf wars. permzplus forces CASL to slim down—or die.
🧬 Related Insights
- Read more: Cloudflare’s Programmable Flow Protection: Customers Finally Script Their Own DDoS Defenses
- Read more: Local LLMs Are Eating Your Hardware Alive: Track Costs and Rate Limit Before It’s Too Late
Frequently Asked Questions
What is PermzPlus? Tiny 2KB library for role-based and ABAC authorization, zero deps, O(1) lookups via caching.
How does PermzPlus compare to CASL? CASL: 100KB, recursive. PermzPlus: 2KB, linear scan + cache. Faster for complex roles, lighter everywhere.
Is PermzPlus ready for production? Promising for small/medium apps; audit for enterprise. Stars growing fast—watch it.