stalniy/casl
CASL is an isomorphic authorization JavaScript library which restricts what resources a given user is allowed to access observed · 2026-08-28
Health v2 · maintenance only
98/100
- Activity 99
- Release rhythm 96
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 0
- age_days: 3333
- days_rel: 25
- days_push: 8
- n_releases_24m: 40
Adoption not part of the score
7055 stars · 303 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
CASL is an isomorphic JavaScript authorization library that restricts what resources a user is allowed to access, using declarative rules that scale from simple claims to attribute-based access control. It integrates with major frontend frameworks (React, Angular, Vue) and backend ORMs (Mongoose, Prisma), letting permissions be shared across UI, API services, and database queries.
Use cases
- check if a user can perform an action on a resource in a Node.js API
- enforce role-based permissions in a React app UI
- filter database queries by user permissions with Mongoose or Prisma
- share authorization rules between frontend and backend
- implement attribute-based access control in a TypeScript app
- serialize permission rules across microservices
When to choose
- you need fine-grained, declarative authorization in JavaScript/TypeScript
- you want the same permission logic on both client and server
- you need to integrate permissions with ORMs like Mongoose or Prisma
- you want a small, tree-shakable, type-safe access control core
When to avoid
- you need authentication (identity verification) rather than authorization
- you want a fully managed, centralized policy service outside your app code
- your stack is not JavaScript/TypeScript
Facets
library · maturity stable
authorization security middleware security web-development developer-tools browser cross-platform acl permissions rbac abac isomorphic typescript access-control cancan nodejs javascript
3 sources
- readme: https://github.com/stalniy/casl · fetched 2026-08-28 · 9943b0fe70ce
- homepage: https://casl.js.org/ · fetched 2026-08-29 · a2a28afca8be
- registry_npm: https://registry.npmjs.org/casl · fetched 2026-08-29 · 6719b1b517b4
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| stalniy/casl | main | 98 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem