Now with Sequelize v6 & v7 support

Powerful RBAC for Sequelize.js

Role-Based Access Control
Made Simple & Fast

A fluent, high-performance authorization library for Sequelize
that brings Laravel-style permissions to Node.js
with caching, events, and zero dependencies.

Core Features

The Authorization Toolkit You Need

Role & Permission Based

Implement fine-grained access control by easily assigning multiple roles and specific permissions to your users.

Super-Fast Caching

Leverage a built-in, highly optimized caching layer for near-instant permission resolution, minimizing database lookups.

Fluent Semantic API

Check permissions using a simple, readable API: `user.can('action resource')`. Authorization is straightforward and intuitive.

Seamless Sequelize Integration

A native, lightweight extension for Sequelize, ensuring zero friction with your existing Node.js and ORM setup.

Usage

Start guarding your API in Minutes

Define Permissions Like a Pro

// Using Guard-Control builderguard.init()  .allow('admin')  .to(['view', 'edit', 'delete'])  .on('blog')  .commit();// Or one-linerguard.allow('editor', ['view', 'edit'], 'post');

Authorize in Style

// Permission checksuser.can('edit blog');user.can('* blog');     // all actions on bloguser.can('view *');     // view everythinguser.can('*');          // superadmin// Role checksuser.isA('admin');user.isAnyOf(['admin', 'editor']);
Feels like Laravel Permission — but for Node.js

Ready to Level Up Your Auth?

yarn add sequelize-guard
Plug-n-Play Full TypeScript Support Event-Driven