Skip to content

tkachenko0/RoleBaker

RoleBaker

I’ve spent countless hours digging through code, tracing permissions, and trying to figure out who can do what, only to end up frustrated. That’s why I built this library, to take the guesswork out of access control by providing a structured way to define and enforce permissions while automatically generating clear documentation for role-based rules.

RoleBaker is a flexible library for handling Attribute-Based Access Control (ABAC) with type safety in a framework-agnostic way. It simplifies managing user permissions and generating automatic documentation, providing a clear and structured approach to handling user roles and resource actions.

Pros

  • ** Type-Safe Access Control** – Prevent runtime errors with strongly typed roles and actions.
  • ** Auto-Generated Documentation** – Easily generate clear documentation for roles and permissions.
  • ** Framework-Agnostic** – Works seamlessly with any JavaScript/TypeScript framework.
  • ** Single & Multi-Role Support** – Supports both single-role users and multi-role configurations.
  • ** Attribute-Based Access Control (ABAC)** – Define permissions based on roles and dynamic attributes.
  • ** Flexible Permission Logic** – Supports both simple boolean checks and complex function-based rules.
  • ** Highly Tested** – Ensures reliability and stability with comprehensive test coverage.

Installation

To install RoleBaker, you can use npm or yarn:

npm install rolebaker

or

yarn add rolebaker

** Usage & Documentation**

Find usage examples for single-role and multi-role models in the official documentation:

RoleBaker Documentation

Doc Image

Framework-Specific Guides

About

TypeScript-safe and framework-agnostic, Attribute-Based Access Control library for managing permissions with effortless documentation generation.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors