rolebaker v1.0.5
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: