PHPackages                             padosoft/laravel-pii-redactor-admin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. padosoft/laravel-pii-redactor-admin

ActiveLibrary[Admin Panels](/categories/admin)

padosoft/laravel-pii-redactor-admin
===================================

Installable Laravel admin console for padosoft/laravel-pii-redactor.

v1.0.2(1mo ago)03.6k↓100%[6 PRs](https://github.com/padosoft/laravel-pii-redactor-admin/pulls)Apache-2.0PHPPHP ^8.3CI passing

Since May 6Pushed 1w agoCompare

[ Source](https://github.com/padosoft/laravel-pii-redactor-admin)[ Packagist](https://packagist.org/packages/padosoft/laravel-pii-redactor-admin)[ Docs](https://github.com/padosoft/laravel-pii-redactor-admin)[ RSS](/packages/padosoft-laravel-pii-redactor-admin/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (7)Versions (17)Used By (0)

Laravel PII Redactor Admin
==========================

[](#laravel-pii-redactor-admin)

> A secure, batteries-included **admin console** for [`padosoft/laravel-pii-redactor`](https://github.com/padosoft/laravel-pii-redactor) — built with Laravel 13, React 19, Vite and Tailwind v4.

 [![CI](https://github.com/padosoft/laravel-pii-redactor-admin/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/padosoft/laravel-pii-redactor-admin/actions/workflows/ci.yml) [![Latest Version](https://camo.githubusercontent.com/985164b8451ab996d65a6d47e30c14d4556e4779d7ba371f7676a162f83571d8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061646f736f66742f6c61726176656c2d7069692d7265646163746f722d61646d696e2e7376673f6c6162656c3d7061636b6167697374)](https://packagist.org/packages/padosoft/laravel-pii-redactor-admin) [![Total Downloads](https://camo.githubusercontent.com/37e59cff2ea4d81136a16c1bb3c8b28c31e7ce817295390dd7b380fe265711a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7061646f736f66742f6c61726176656c2d7069692d7265646163746f722d61646d696e2e737667)](https://packagist.org/packages/padosoft/laravel-pii-redactor-admin) [![License](https://camo.githubusercontent.com/2577c74c874632d0a0cc836f4a5aa715c137d722695f8f413920831ec3e0bc38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7061646f736f66742f6c61726176656c2d7069692d7265646163746f722d61646d696e2e737667)](https://github.com/padosoft/laravel-pii-redactor-admin/blob/main/LICENSE) [![PHP](https://camo.githubusercontent.com/e69fc10ad0d3845d44d08b0eeedd6dd7a5bfa4ab872e68e26b131554122d35d5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e332d626c75652e737667)](https://camo.githubusercontent.com/e69fc10ad0d3845d44d08b0eeedd6dd7a5bfa4ab872e68e26b131554122d35d5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e332d626c75652e737667) [![Laravel](https://camo.githubusercontent.com/b595ffc2800505797c7cccd6ad553c2ac96091009c9c98fbe4a5ca707dbd1367/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d25354531332e302d7265642e737667)](https://camo.githubusercontent.com/b595ffc2800505797c7cccd6ad553c2ac96091009c9c98fbe4a5ca707dbd1367/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d25354531332e302d7265642e737667) [![Node](https://camo.githubusercontent.com/ce031295a5a292906deb2a9299efc0d7907effee8388f5504db8775040b0cd70/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6e6f64652d25334525334432342d627269676874677265656e2e737667)](https://camo.githubusercontent.com/ce031295a5a292906deb2a9299efc0d7907effee8388f5504db8775040b0cd70/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6e6f64652d25334525334432342d627269676874677265656e2e737667) [![React](https://camo.githubusercontent.com/e25a4bb1e6c4ab75d4c8596d4d28e6b9c98f8bf1d837ef26afb326f098215faf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656163742d31392d3631646166622e737667)](https://camo.githubusercontent.com/e25a4bb1e6c4ab75d4c8596d4d28e6b9c98f8bf1d837ef26afb326f098215faf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656163742d31392d3631646166622e737667) [![Tailwind](https://camo.githubusercontent.com/e9238ae702d6d0b68db86241427dd9c063a828ac5e5d520ed4e85c11c9b3f8b3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7461696c77696e642d76342d3338626466382e737667)](https://camo.githubusercontent.com/e9238ae702d6d0b68db86241427dd9c063a828ac5e5d520ed4e85c11c9b3f8b3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7461696c77696e642d76342d3338626466382e737667)

 [![Dashboard preview](resources/screenshots/Laravel-pii-redactor-admin-dashboard.png)](resources/screenshots/Laravel-pii-redactor-admin-dashboard.png)

---

Table Of Contents
-----------------

[](#table-of-contents)

- [Why this package?](#why-this-package)
- [Features](#features)
- [Screenshots](#screenshots)
- [Requirements](#requirements)
- [Quick Start (5 minutes, junior-dev friendly)](#quick-start-5-minutes-junior-dev-friendly)
    - [1. Install the package](#1-install-the-package)
    - [2. Publish config &amp; migrations](#2-publish-config--migrations)
    - [3. Enable the admin in `.env`](#3-enable-the-admin-in-env)
    - [4. Wire the authorization gates](#4-wire-the-authorization-gates)
    - [5. Open the console](#5-open-the-console)
- [Installation Variants](#installation-variants)
    - [Both packages on Packagist](#both-packages-on-packagist)
    - [Only this package on Packagist](#only-this-package-on-packagist)
    - [Neither package on Packagist](#neither-package-on-packagist)
    - [Local development from a checkout](#local-development-from-a-checkout)
- [Configuration](#configuration)
- [Authorization](#authorization)
- [Security Model](#security-model)
- [Demo Fixtures](#demo-fixtures)
- [Verification](#verification)
- [Troubleshooting](#troubleshooting)
- [Contributing](#contributing)
- [Release](#release)
- [License](#license)
- [Credits](#credits)

---

Why this package?
-----------------

[](#why-this-package)

GDPR-grade PII redaction is only half the story — operators still need a **safe** way to:

- inspect what was redacted,
- detokenise on demand with a paper trail,
- tune detectors and custom rules,
- and share design-time examples with the team.

`laravel-pii-redactor-admin` ships that admin surface as a **drop-in Laravel package**: zero config in your host app, **disabled by default**, and locked down behind explicit Gates. No raw PII ever leaves the database.

Features
--------

[](#features)

DashboardKPI cards (events, tokens, detokenises, errors) with light &amp; dark themesPlaygroundPaste text, run a redaction, inspect tokens — without persisting raw inputToken mapBrowse stored tokens (originals never selected nor serialized)DetokeniseJustification-gated, throttled, audited reverse lookupAudit logsRead-only timeline of every redact/detokenise eventDetectorsView built-in detectors and their patternsCustom rulesManage host-defined rules from the UIDisabled by defaultOne env flag turns the whole console on or offPre-built assetsReact/Tailwind compiled in-package; no host Vite config requiredScreenshots
-----------

[](#screenshots)

> Design references live in [`resources/screenshots`](resources/screenshots).

PagePreview**Dashboard**[![Dashboard](resources/screenshots/Laravel-pii-redactor-admin-dashboard.png)](resources/screenshots/Laravel-pii-redactor-admin-dashboard.png)**Dashboard (dark)**[![Dark dashboard](resources/screenshots/Laravel-pii-redactor-admin-dashboard-dark.png)](resources/screenshots/Laravel-pii-redactor-admin-dashboard-dark.png)**Playground**[![Playground](resources/screenshots/Laravel-pii-redactor-admin-playground.png)](resources/screenshots/Laravel-pii-redactor-admin-playground.png)**Token map**[![Token map](resources/screenshots/Laravel-pii-redactor-admin-tokenmap.png)](resources/screenshots/Laravel-pii-redactor-admin-tokenmap.png)**Audit logs**[![Audit logs](resources/screenshots/Laravel-pii-redactor-admin-logs.png)](resources/screenshots/Laravel-pii-redactor-admin-logs.png)**Detokenise**[![Detokenise](resources/screenshots/Laravel-pii-redactor-admin-detokenize.png)](resources/screenshots/Laravel-pii-redactor-admin-detokenize.png)**Detectors**[![Detectors](resources/screenshots/Laravel-pii-redactor-admin-detectors.png)](resources/screenshots/Laravel-pii-redactor-admin-detectors.png)**Custom rules**[![Custom rules](resources/screenshots/Laravel-pii-redactor-admin-custom-rules.png)](resources/screenshots/Laravel-pii-redactor-admin-custom-rules.png)Requirements
------------

[](#requirements)

ToolVersionPHP`^8.3`Laravel`^13.0`Composer`^2.7`Node.js`>=24` (only needed if you want to rebuild assets)DatabaseAnything Laravel supports (MySQL, PostgreSQL, SQLite…)> The compiled JS/CSS is shipped inside the package, so a host app **does not need Node** to run the console — only to develop it.

---

Quick Start (5 minutes, junior-dev friendly)
--------------------------------------------

[](#quick-start-5-minutes-junior-dev-friendly)

> Follow these steps top-to-bottom on a Laravel 13 app where [`padosoft/laravel-pii-redactor`](https://github.com/padosoft/laravel-pii-redactor) is already installed and migrated.

### 1. Install the package

[](#1-install-the-package)

```
composer require padosoft/laravel-pii-redactor-admin
```

> **Both packages are not on Packagist yet?** Jump to [Installation Variants](#installation-variants) and come back here.

### 2. Publish config &amp; migrations

[](#2-publish-config--migrations)

```
php artisan vendor:publish --tag=pii-redactor-admin-config
php artisan vendor:publish --tag=pii-redactor-admin-migrations
php artisan migrate
```

What this does:

- copies `config/pii-redactor-admin.php` into your app so you can tweak it,
- adds the audit table migration that records every detokenise event,
- runs the migration so the table exists.

### 3. Enable the admin in `.env`

[](#3-enable-the-admin-in-env)

The console is **disabled by default**. Turn it on only in environments where you trust the audience (typically staging / a protected admin host):

```
PII_REDACTOR_ADMIN_ENABLED=true
PII_REDACTOR_ADMIN_ROUTE_PREFIX=pii-redactor-admin
PII_REDACTOR_ADMIN_API_PREFIX=pii-redactor-admin/api
```

### 4. Wire the authorization gates

[](#4-wire-the-authorization-gates)

Add the three Gates somewhere they get registered (e.g. `app/Providers/AuthServiceProvider.php` `boot()`):

```
use Illuminate\Support\Facades\Gate;

Gate::define('viewPiiRedactorAdmin', fn ($user) => $user->can('manage-pii-redactor'));
Gate::define('detokenisePiiRedactor', fn ($user) => $user->can('detokenise-pii'));
Gate::define('viewPiiRedactorRawSamples', fn ($user) => $user->can('view-raw-pii-samples'));
```

Tweak the inner `->can(...)` to match your existing permission system (Spatie, custom roles, hardcoded `$user->is_admin`, etc.). The package only **asks** these Gates — it never defines who passes them.

### 5. Open the console

[](#5-open-the-console)

Visit:

```
https://your-app.test/pii-redactor-admin

```

Logged in as a user that satisfies `viewPiiRedactorAdmin`, you should land on the dashboard. If you get a 403, your Gate returned `false`. If you get a 404, double-check `PII_REDACTOR_ADMIN_ENABLED=true` and that the config is cached (`php artisan config:clear`).

---

Installation Variants
---------------------

[](#installation-variants)

### Both packages on Packagist

[](#both-packages-on-packagist)

```
composer require padosoft/laravel-pii-redactor-admin
```

### Only this package on Packagist

[](#only-this-package-on-packagist)

Add the **core package** repository in the host app first:

```
composer config repositories.pii-redactor vcs https://github.com/padosoft/laravel-pii-redactor
composer require padosoft/laravel-pii-redactor-admin
```

### Neither package on Packagist

[](#neither-package-on-packagist)

Add both repositories before requiring the admin package:

```
composer config repositories.pii-redactor vcs https://github.com/padosoft/laravel-pii-redactor
composer config repositories.pii-redactor-admin vcs https://github.com/padosoft/laravel-pii-redactor-admin
composer require padosoft/laravel-pii-redactor-admin
```

### Local development from a checkout

[](#local-development-from-a-checkout)

```
composer config repositories.pii-redactor vcs https://github.com/padosoft/laravel-pii-redactor
composer config repositories.pii-redactor-admin path /absolute/path/to/laravel-pii-redactor-admin
composer require padosoft/laravel-pii-redactor-admin:@dev
php artisan vendor:publish --tag=pii-redactor-admin-config
php artisan vendor:publish --tag=pii-redactor-admin-migrations
php artisan migrate
```

> Composer ignores repositories declared **inside** a dependency, so you must declare the core package repository in the **host app** if it isn't on Packagist.

Configuration
-------------

[](#configuration)

`config/pii-redactor-admin.php` exposes:

KeyEnvDefaultPurpose`enabled``PII_REDACTOR_ADMIN_ENABLED``false`Master switch — when `false`, **no** routes are registered.`route_prefix``PII_REDACTOR_ADMIN_ROUTE_PREFIX``pii-redactor-admin`UI mount path.`api_prefix``PII_REDACTOR_ADMIN_API_PREFIX``pii-redactor-admin/api`JSON API mount path used by the React app.`middleware`—`['web', 'auth']`Adjust to your auth stack (Sanctum, custom guards, etc.).> Always keep `web,auth` (or stricter) on **both** the UI and the API prefix.

Authorization
-------------

[](#authorization)

AbilityRequired for`viewPiiRedactorAdmin`Loading any admin page`detokenisePiiRedactor`Submitting the detokenise form`viewPiiRedactorRawSamples`Showing raw scan samples in detector outputDetokenise additionally requires:

- a token-shaped input (validated server-side),
- a justification of **at least 10 characters**,
- UI confirmation,
- per-user/per-route throttling,
- an audit row written **before** the result is returned.

Security Model
--------------

[](#security-model)

- Token-map listing **never** selects or serializes token originals.
- Detokenise requires authorization, justification, token validation, throttling, and an audit row.
- Raw scan samples require a dedicated ability.
- Audit rows store metadata, counts, target hashes, status, and justification only — **no** raw text, redacted output, detokenised output, salts, API keys, or token originals.

Demo Fixtures
-------------

[](#demo-fixtures)

Safe demo payloads live in [`resources/demo/admin-api-fixtures.json`](resources/demo/admin-api-fixtures.json) and are reused by Playwright. They intentionally omit token originals, raw samples, redacted output, salts, and API keys.

Verification
------------

[](#verification)

Frontend development and CI use Node.js 24 or newer.

Every task must keep these gates green locally and in GitHub Actions:

```
composer validate --strict
vendor/bin/phpunit
npm run typecheck
npm run test
npm run build
npm run e2e
```

Fresh host install verification can be run from the package root (PowerShell):

```
./scripts/verify-fresh-laravel-host.ps1
```

Release readiness notes live in [`docs/RELEASE.md`](docs/RELEASE.md).

Troubleshooting
---------------

[](#troubleshooting)

**404 on `/pii-redactor-admin`**- Confirm `PII_REDACTOR_ADMIN_ENABLED=true` is loaded (`php artisan config:clear`, then `php artisan tinker` → `config('pii-redactor-admin.enabled')`).
- Confirm the service provider is auto-discovered (it's listed in `composer.json` `extra.laravel.providers`). If you have `dont-discover` in your host `composer.json`, add it manually.
- Run `php artisan route:list | grep pii-redactor-admin`.

**403 once logged in**- The `viewPiiRedactorAdmin` Gate returned `false`. Check the closure you wrote in step 4 of the Quick Start.
- Verify the Gate is actually registered: `Gate::abilities()` should include the three keys.

**Blank page / missing styles**- Make sure `resources/dist` is present in the package (it's committed). If you cloned without `npm run build`, run it once.
- Confirm your host app isn't overriding the asset routes. The package serves its own JS/CSS via the admin route prefix.

**Migration error: table already exists**- You probably ran the publish command twice. Remove the duplicate file from `database/migrations` and re-run `php artisan migrate`.

**Detokenise returns 422**- Justification must be ≥ 10 characters.
- Token must match the format produced by the core redactor.
- Check the latest row in the audit table — it records the validation failure reason.

Contributing
------------

[](#contributing)

Pull requests are welcome! Before opening one:

1. Read [`AGENTS.md`](AGENTS.md), [`docs/LESSON.md`](docs/LESSON.md), and [`docs/PROGRESS.md`](docs/PROGRESS.md).
2. Keep PRs small and focused.
3. Run all gates from the [Verification](#verification) section.
4. Every PR goes through the [Copilot review loop](skills/copilot-pr-review-loop/SKILL.md).

Bug reports and feature ideas: [open an issue](https://github.com/padosoft/laravel-pii-redactor-admin/issues).

Release
-------

[](#release)

Current runtime release: [`v1.0.1`](https://github.com/padosoft/laravel-pii-redactor-admin/releases/tag/v1.0.1).

`v1.0.2` is reserved for the final docs/test-hardening ledger after `v1.0.1`. See [`docs/RELEASE.md`](docs/RELEASE.md) for the full release procedure.

License
-------

[](#license)

Released under the [Apache-2.0 License](LICENSE). © [Padosoft](https://github.com/padosoft).

Credits
-------

[](#credits)

- Built on top of [`padosoft/laravel-pii-redactor`](https://github.com/padosoft/laravel-pii-redactor).
- UI powered by [React 19](https://react.dev/), [Vite](https://vitejs.dev/), [Tailwind CSS v4](https://tailwindcss.com/), and [Lucide](https://lucide.dev/) icons.
- Tested with [PHPUnit](https://phpunit.de/), [Vitest](https://vitest.dev/), and [Playwright](https://playwright.dev/).

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance96

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

34d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10467699?v=4)[Lorenzo](/maintainers/lopadova)[@lopadova](https://github.com/lopadova)

---

Top Contributors

[![lopadova](https://avatars.githubusercontent.com/u/10467699?v=4)](https://github.com/lopadova "lopadova (9 commits)")

---

Tags

laraveladminredactiongdprpii

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/padosoft-laravel-pii-redactor-admin/health.svg)

```
[![Health](https://phpackages.com/badges/padosoft-laravel-pii-redactor-admin/health.svg)](https://phpackages.com/packages/padosoft-laravel-pii-redactor-admin)
```

###  Alternatives

[jeroennoten/laravel-adminlte

Easy AdminLTE integration with Laravel

4.0k5.0M43](/packages/jeroennoten-laravel-adminlte)[dcat-plus/laravel-admin

dcat-plus admin

1433.7k9](/packages/dcat-plus-laravel-admin)[guanguans/dcat-login-captcha

Dcat admin login captcha. - Dcat admin 登录验证码。

40112.4k](/packages/guanguans-dcat-login-captcha)[arbory/arbory

Administration interface for Laravel

4853.9k3](/packages/arbory-arbory)[printnow/laravel-admin

Dcat admin 永久分叉版 / 支持 Laravel 10-13, PHP 版本限制 &gt;= 8.1（支持 PHP 8.5）

472.4k](/packages/printnow-laravel-admin)[conedevelopment/root

Root is an admin package for Laravel applications.

3813.3k2](/packages/conedevelopment-root)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
