AbsoluteJS

Admin

@absolutejs/adminv0.2.0betaPlatform & Infra

Framework-neutral roles, capabilities, navigation, and security read models for AbsoluteJS project administration.

#Installation

BASH
bun add @absolutejs/admin

#Runnable Admin policy check

Runnable

Run the framework-neutral policy locally. The exported authorizeSiteAdmin identifier is aliased to the current Admin terminology until the compatibility API can be retired.

bun add @absolutejs/admin
TS
import {
  authorizeSiteAdmin as authorizeAdmin,
  capabilitiesForRole,
  navigationForCapabilities
} from '@absolutejs/admin';

const capabilities = capabilitiesForRole('developer');
authorizeAdmin('developer', 'site.deploy');

console.log(navigationForCapabilities(capabilities));
Proof of success
The developer role passes the deployment capability check and produces capability-filtered navigation. Changing the role to viewer makes the authorization call fail.

#Capabilities

Overview

Framework-neutral contracts and policy for a standard AbsoluteJS project administration portal.

The package defines:

project roles and their exact capabilities;

Show 5 more

fail-closed authorization helpers;

capability-filtered portal navigation;

public, project-scoped security snapshot contracts;

deterministic security posture summaries.

It deliberately does not provide authentication, persistence, or a platform-wide operator console. A host application supplies those adapters and enforces authorization before querying project data.

Roles

Role — Intended access

owner — Every project operation, including team management and deletion

administrator — Every project operation except deletion

Show 5 more

security — Read posture, acknowledge incidents, and manage remediation

developer — Deploy, configure, inspect data, and read security posture

viewer — Read-only overview, data posture, and security posture

The package and product surface are named Admin. The exported SiteAdmin and authorizeSiteAdmin identifiers are compatibility APIs from the earlier package name; new navigation, prose, and integrations should use Admin terminology.

Authorization must be enforced on the server. Navigation filtering is a presentation aid, not a security boundary.

#Role and capability model

Authorization belongs on the server. The UI may hide unavailable actions, but every mutation must enforce the same capability contract again.

OptionViewerOperatorAdministrator
View operational stateYesYesYes
Run bounded operationsNoYesYes
Change access policyNoNoYes

Outcomes

What you can build

Overview

Framework-neutral contracts and policy for a standard AbsoluteJS project administration portal.

Roles

Role — Intended access

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/admin version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Trace from the first failed boundary
Reproduce the smallest canonical @absolutejs/admin example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#Roles

Partial snippet

Role — Intended access

TS
import {
  authorizeSiteAdmin,
  capabilitiesForRole,
  navigationForCapabilities,
} from "@absolutejs/admin";

authorizeSiteAdmin("security", "site.security.respond");

const navigation = navigationForCapabilities(capabilitiesForRole("developer"));

#Public entry points

Supported entry points declared by this project’s package manifest. Internal dist paths are not part of the package contract.

Public package entry point declared in package.json.

@absolutejs/admin@absolutejs/admin/manifest@absolutejs/admin/manifest.json

#Package commands

Scripts declared by this project’s package manifest.

bun run buildrm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @sinclair/typebox && tsc -p tsconfig.build.json && absolute-manifest emit
bun run check:packagebun run format && bun run typecheck && bun run test && bun run build
bun run formatprettier --write "./**/*.{ts,json,md}"
bun run testbun test
bun run typechecktsc --noEmit
Compatibility naming
The package and repository are named Admin. Exported SiteAdmin and authorizeSiteAdmin identifiers are compatibility APIs from the earlier name; use the Admin terminology for new product and documentation surfaces.

#API reference

Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.

29 symbols
SITE_ADMIN_ROLESvaluePermalink
TS
const SITE_ADMIN_ROLES: readonly ["owner", "administrator", "security", "developer", "viewer"];
Exported from @absolutejs/admin
Use this API in an outcome:Ship a SaaS platform

Continue toward an outcome

These playbooks show where this package fits, how to verify the combined system, and what changes before production.