Skip to content

Documentation hub

@siremzam/sentinel is a TypeScript-first authorization engine for SaaS applications.

Web site: vegtelenseg.github.io/sentinel (search, sidebar, dark mode). This page mirrors the site for browsing in the repo.

Use the sections below or the sidebar to find what you need.


Start here

I want to…Go to
Understand what Sentinel is and whether it fits my appWhat is Sentinel?
Install and run my first evaluation in five minutesQuickstart
See why teams pick Sentinel over scattered if (role) checksWhy Sentinel?
Try policies in the browser without installing anythingInteractive playground
Upgrade between versionsUpgrading
Wire Sentinel into Express, Fastify, Hono, or NestJSFrameworks below

Getting started

  1. Installation — add the package, understand exports and bundle size
  2. Quickstart — schema, policies, evaluation, and tenant context in one walkthrough

After the quickstart, read How evaluation works before diving into advanced features.


Core concepts

ConceptWhat you will learn
The schemaHow one TypeScript interface drives autocomplete and compile-time safety across the entire API
Subjects and rolesWho is asking for access, how roles are assigned, and global vs tenant-scoped roles
Actions and resourcesDomain verbs (invoice:approve) instead of CRUD, and why that matters
Policy rulesThe atomic unit of authorization — allow, deny, conditions, priority
How evaluation worksThe full decision pipeline: role resolution, matching, sorting, first-match-wins
MultitenancyPer-tenant roles, strict mode, and preventing cross-tenant leaks
Conditions (ABAC)Attribute-based rules, sync vs async, fail-closed semantics
Role hierarchyInheritance, expansion at evaluation time, cycle detection
Priority and deny resolutionWhy deny wins at equal priority and how to override broad denies

Guides

Writing and managing policies

Observability and UX

Frameworks

Ready-made middleware and guards — import for your stack instead of writing authorization middleware yourself.

Patterns


Comparisons and migration

FromGuide
CASLMigrating from CASL
CasbinMigrating from Casbin
accesscontrolMigrating from accesscontrol
All librariesFeature comparison

Reference


Other resources

Released under the MIT License.