Installation
Learn how to install and configure ABAC packages for your project.
Two Separate Packages
abac-engine is for policy evaluation (PDP), while @devcraft-ts/abac-admin packages are for policy administration (PAP). Install based on your needs.
Installing abac-engine
Use this package when you need to evaluate policies and make authorization decisions in your application.
npm install abac-engine
Installing @devcraft-ts/abac-admin
Install the appropriate packages based on your stack. These packages help you build policy management UIs.
Core Package (Framework Agnostic)
npm install @devcraft-ts/abac-admin-core zod
~15 KB • Use for Node.js, vanilla JS, or any JavaScript environment
React Hooks (Headless)
npm install @devcraft-ts/abac-admin-react
~30 KB • Headless React hooks for building custom UIs
Next.js Utilities
npm install @devcraft-ts/abac-admin-nextjs
~10 KB • Server utilities and API route helpers for Next.js
Pre-built UI Components (Optional)
npm install @devcraft-ts/abac-admin-react-ui
~130 KB • Complete UI built with Radix UI and Tailwind CSS
Common Setups
Full Stack (Next.js + Evaluation)
Policy management UI + backend evaluation
npm install abac-engine \ @devcraft-ts/abac-admin-react \ @devcraft-ts/abac-admin-nextjs
Backend Only (Policy Evaluation)
Just evaluate policies in your Node.js backend
npm install abac-engine
Admin UI Only (React)
Build policy management UI with custom components
npm install @devcraft-ts/abac-admin-react
Complete Admin UI (Pre-built)
Ready-to-use policy management interface
npm install @devcraft-ts/abac-admin-react-ui
Requirements
Node.js Version
Node.js 18.0.0 or higher is required for all packages.
node --versionPeer Dependencies
Some packages require peer dependencies:
- • React 18+ (for React packages)
- • Zod 3+ (for core package)
Next Steps
Now that you have the packages installed, follow our Quick Start guide to begin using them.
Quick Start Guide