# nestjsx/nest-access-control

Role and Attribute based Access Control for Nestjs 🔐

Repository: https://github.com/nestjsx/nest-access-control
Canonical: https://ross.abutalabs.com/products/nest-access-control
Language: TypeScript
License: MIT
License Family: permissive
Topics: nestjs, typescript, addon, helper, access-control, permissions
Last push: 2025-12-24T13:02:43+00:00

## Health v2 (maintenance only)
Score: 58/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 58, release rhythm 35, longevity 100
- inputs: {"age_days": 3026, "days_push": 252, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1158, forks 81 (observed 2026-08-28T04:03:48.385117+00:00)

## What it is
A NestJS module providing role- and attribute-based access control (RBAC/ABAC), built on top of onury's accesscontrol library. It offers decorator-based route guards, a RolesBuilder for defining grants, role inheritance, and attribute filtering.

## Use cases
- add role-based permissions to a NestJS API
- restrict route access with decorators and guards
- filter response data by allowed attributes per role
- define hierarchical roles with inherited permissions
- control access to own vs any resources
- load permission grants from a database

## When to choose
- you use NestJS and need fine-grained role/attribute authorization
- you want decorator-based guards with an ACGuard out of the box
- you need role inheritance and attribute-level filtering in-memory

## When to avoid
- you're not using the NestJS framework
- you need policy-as-code or external authorization services like OPA
- you need permissions persisted and evaluated at database level

## Facets
- artifact type: library
- maturity: active
- function: authorization, middleware
- domain: backend, web-development, security, developer-tools
- platform: -
- tags: nestjs, rbac, access-control, decorators, guards, permissions, nodejs, typescript

## Member repositories
- nestjsx/nest-access-control (main) score 58

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:48.385117+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-30T06:31:58.258105+00:00, confidence not recorded.
  - readme: https://github.com/nestjsx/nest-access-control (fetched 2026-08-28T04:03:48.385117+00:00, sha 9e944ce7fc2d)
  - registry_npm: https://registry.npmjs.org/nest-access-control (fetched 2026-08-29T12:37:08.577280+00:00, sha 0f3eced39c63)
- Data as of 2026-08-30T08:39:29.467469+00:00.
