Skip to content

SentinelAuthorization for TypeScript SaaS

Type-safe policies, multi-tenant roles, and explainable decisions — zero dependencies.

npm install @siremzam/sentinelInstallation guide →

What it looks like in code

Full quickstart →
evaluate.ts
1const engine = new AccessEngine({ schema });
2
3await engine.can({ subject, action: "invoice:approve", resource });
4// allow · admin matched · tenant:acme
allowadmin → invoice:approve → tenant:acme

Where do you want to start?

  • Type-safe schemaTypos fail at compile time, not in production.
  • Multi-tenant by defaultRoles and context scoped per tenant.
  • explain() when it breaksReplay every rule that fired — or didn't.

Framework middleware

Sentinel ships middleware for your stack — not a DIY AuthZ layer you have to build yourself. Import the guard for your framework, pass the engine and options, and protect routes in a few lines.

FrameworkGuide
ExpressExpress middleware
FastifyFastify middleware
HonoHono middleware
NestJSNestJS guards
Polyglot / HTTPServer mode

Middleware reference for all option types and exports.


Documentation map

I want to…Start here
Understand what Sentinel isWhat is Sentinel?
Install and evaluate in five minutesQuickstart
Protect routes with Express, Fastify, Hono, or NestJSFramework middleware
Learn how decisions are madeHow evaluation works
Compare with CASL, Casbin, or accesscontrolFeature comparison

Full index: documentation hub.

Released under the MIT License.