npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-access-engine-devtools

v1.0.0

Published

DevTools overlay for react-access-engine — inspect RBAC, ABAC, feature flags, A/B experiments, policies, and access decisions in real time. Zero-config debug panel for React.

Readme

react-access-engine-devtools

Development-only debugging overlay for react-access-engine. Visualize RBAC, ABAC, feature flags, A/B experiments, policies, and access decisions in real time. Zero-config debug panel for React and Next.js.

Documentation · Playground · GitHub

Installation

pnpm add -D react-access-engine-devtools

Quick Start

import { AccessProvider, defineAccess } from 'react-access-engine';
import { AccessDevtools } from 'react-access-engine-devtools';

const config = defineAccess({
  roles: ['admin', 'editor', 'viewer'] as const,
  permissions: {
    admin: ['*'] as const,
    editor: ['articles:read', 'articles:write'] as const,
    viewer: ['articles:read'] as const,
  },
  features: {
    'dark-mode': { enabled: true },
    'new-editor': { rolloutPercentage: 50 },
  },
  debug: true, // Required for event recording
});

function App() {
  return (
    <AccessProvider config={config} user={user}>
      <YourApp />
      {/* Only renders in development — zero cost in production */}
      <AccessDevtools />
    </AccessProvider>
  );
}

Features

Live Dashboard

The devtools overlay shows:

| Tab | What it shows | | --------------- | -------------------------------------------------------------- | | Overview | User ID, roles, permissions, plan, feature/experiment counts | | Access | Permission checks with granted/denied status and reasons | | Features | All feature flags with enabled/disabled state and reason codes | | Policies | Policy evaluations with matched rules and effect | | Experiments | Active experiments with assigned variants | | Event Log | Combined chronological log of all events |

Keyboard Shortcut

Toggle the panel with Ctrl+Shift+A (or Cmd+Shift+A on Mac).

// Disable the shortcut
<AccessDevtools disableShortcut />

Positioning

<AccessDevtools position="bottom-left" />
<AccessDevtools position="top-right" />
<AccessDevtools position="top-left" />
<AccessDevtools position="bottom-right" /> {/* default */}

Filtering

Every tab (except Overview) has a filter bar. Type to search by permission name, feature name, or reason code. The Event Log tab also has type filters (All / Access / Feature / Policy).

Component Labels

Use DebugLabel to tag sections of your component tree. This makes devtools log entries easier to trace back to specific UI areas:

import { DebugLabel } from 'react-access-engine-devtools';

function Sidebar() {
  return (
    <DebugLabel name="Sidebar">
      <Can perform="settings:view">
        <SettingsLink />
      </Can>
      <Can perform="admin:access">
        <AdminLink />
      </Can>
    </DebugLabel>
  );
}

Programmatic Control

import { enableDebug, disableDebug, isDebugEnabled } from 'react-access-engine-devtools';

// Toggle debug collection at runtime
disableDebug(); // pause collection
enableDebug(); // resume collection
isDebugEnabled(); // check status

Props

| Prop | Type | Default | Description | | ----------------- | -------------------------------------------------------------- | ---------------- | ------------------------------------- | | position | 'bottom-right' \| 'bottom-left' \| 'top-right' \| 'top-left' | 'bottom-right' | Panel position | | defaultOpen | boolean | false | Start with panel open | | shortcut | string | — | Reserved for custom shortcut (future) | | disableShortcut | boolean | false | Disable keyboard toggle |

How It Works

  1. The core react-access-engine package has a DebugEngine that records access checks, feature evaluations, and policy evaluations when debug: true is set.

  2. The devtools package subscribes to the DebugEngine's event stream via subscribe() — a push-based listener API that delivers events in real time.

  3. Events are converted into structured DevtoolsLogEntry objects and rendered in the overlay UI.

  4. The overlay reads AccessContext directly (exported from the core package) to show the current user state, computed permissions, feature results, and experiment assignments.

  5. In production, AccessDevtools renders null — it's completely tree-shaken.

License

MIT © Abhishek Verma

Architecture

┌──────────────────────────────────────────────┐
│  Your App                                    │
│  ┌────────────────────────────────────────┐  │
│  │ <AccessProvider config={...} user={…}> │  │
│  │    ┌──────────────┐                    │  │
│  │    │  DebugEngine │◄─── records events │  │
│  │    │  PluginEngine│                    │  │
│  │    └──────┬───────┘                    │  │
│  │           │ subscribe()                │  │
│  │    ┌──────▼───────────────────┐        │  │
│  │    │  <AccessDevtools />      │        │  │
│  │    │  ├─ useDevtoolsContext() │        │  │
│  │    │  ├─ useDebugLog()        │        │  │
│  │    │  ├─ useDevtoolsSnapshot()│        │  │
│  │    │  └─ Panel UI             │        │  │
│  │    └──────────────────────────┘        │  │
│  └────────────────────────────────────────┘  │
└──────────────────────────────────────────────┘

Development

pnpm --filter react-access-engine-devtools build
pnpm --filter react-access-engine-devtools typecheck