# seeden/rbac

Hierarchical Role Based Access Control for NodeJS

Repository: https://github.com/seeden/rbac
Canonical: https://ross.abutalabs.com/products/rbac
Language: JavaScript
License: MIT
License Family: permissive
Topics: rbac, role-based-access-control, role, permissions, authentication, auth, authorization, javascript
Last push: 2026-03-28T19:49:59+00:00

## Health v2 (maintenance only)
Score: 69/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 74, release rhythm 45, longevity 100
- inputs: {"age_days": 4530, "days_push": 158, "days_rel": 158, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1005, forks 102 (observed 2026-09-03T02:15:17.760485+00:00)

## What it is
A Node.js library implementing hierarchical role-based access control (RBAC) with roles, permissions, and grant inheritance. It supports in-memory storage by default and custom storage backends via an extensible Storage class.

## Use cases
- implement role-based access control in a nodejs app
- check if a user role can perform an action
- define hierarchical roles with inherited permissions
- manage user permissions and roles in an api
- add authorization middleware to express routes
- store rbac roles and grants in a custom database

## When to choose
- you need hierarchical role inheritance in a Node.js application
- you want a lightweight, dependency-free RBAC library with pluggable storage
- you need simple permission checks like can(role, action, resource)

## When to avoid
- you need attribute-based or policy-based access control (ABAC/ReBAC)
- you are not using Node.js or JavaScript
- you need built-in database adapters rather than writing your own storage layer

## Facets
- artifact type: library
- maturity: active
- function: authorization, auth, middleware
- domain: security, backend, web-development, developer-tools
- platform: -
- tags: rbac, role-based-access-control, permissions, hierarchical-roles, access-control, nodejs, javascript

## Member repositories
- seeden/rbac (main) score 69

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:17.760485+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:13:40.035407+00:00, confidence not recorded.
  - readme: https://github.com/seeden/rbac (fetched 2026-09-03T02:15:17.760485+00:00, sha 6424a3324499)
  - registry_npm: https://registry.npmjs.org/rbac (fetched 2026-08-29T13:13:23.087232+00:00, sha 8b2332e2bf93)
- Data as of 2026-08-30T08:39:29.467469+00:00.
