https://github.com/tkachenko0/rolebaker
TypeScript-safe and framework-agnostic, Attribute-Based Access Control library for managing permissions with effortless documentation generation.
https://github.com/tkachenko0/rolebaker
abac access access-control auth authorization permissions rbac role-based-access-control
Last synced: 3 months ago
JSON representation
TypeScript-safe and framework-agnostic, Attribute-Based Access Control library for managing permissions with effortless documentation generation.
- Host: GitHub
- URL: https://github.com/tkachenko0/rolebaker
- Owner: tkachenko0
- License: mit
- Created: 2025-02-09T12:54:54.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-06-29T13:02:07.000Z (7 months ago)
- Last Synced: 2025-10-04T01:39:34.475Z (3 months ago)
- Topics: abac, access, access-control, auth, authorization, permissions, rbac, role-based-access-control
- Language: TypeScript
- Homepage: https://role-baker.vercel.app/
- Size: 388 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# 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:
```bash
npm install rolebaker
```
or
```bash
yarn add rolebaker
```
---
## **π Usage & Documentation**
Find usage examples for **single-role** and **multi-role** models in the official documentation:
π [RoleBaker Documentation](https://role-baker.vercel.app/)

### **π Framework-Specific Guides**
- **React** β [Guide](https://role-baker.vercel.app/frameworks/react)
- **Angular** β [Guide](https://role-baker.vercel.app/frameworks/angular)
- **Express** β [Guide](https://role-baker.vercel.app/frameworks/express)
- **Other frameworks** β [Guide](https://role-baker.vercel.app/frameworks/other)