PHPackages                             dennisbusk/debug-notary - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. dennisbusk/debug-notary

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

dennisbusk/debug-notary
=======================

A Laravel package for debug notarization.

v1.0.11(1mo ago)024MITPHPPHP ^8.2

Since Jun 5Pushed 3w agoCompare

[ Source](https://github.com/dennisbusk/debug-notary)[ Packagist](https://packagist.org/packages/dennisbusk/debug-notary)[ RSS](/packages/dennisbusk-debug-notary/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (13)Used By (0)

🐞 Debug Notary
==============

[](#-debug-notary)

[![Debug Notary Demo](https://raw.githubusercontent.com/dennisbusk/debug-notary/main/art/demo.gif)](https://raw.githubusercontent.com/dennisbusk/debug-notary/main/art/demo.gif)

> **Point-and-click bug reporting:** See how users can annotate screenshots and submit bugs directly from your application.

[![Latest Version on Packagist](https://camo.githubusercontent.com/93a2ad0930cc94b8b86c1683d168efdce31e9e8fa435336fa52e59c7702addb9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656e6e69736275736b2f64656275672d6e6f746172792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dennisbusk/debug-notary)[![Total Downloads](https://camo.githubusercontent.com/3b791b03f7d78231e7235f422ce4b2534f9d7c3598c48059732b784d23a601fb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64656e6e69736275736b2f64656275672d6e6f746172792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dennisbusk/debug-notary)[![License](https://camo.githubusercontent.com/ee0dfeb128787c62379c06f6d24e16d4b2c9763725fcf9c251c59317c4b126f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f64656e6e69736275736b2f64656275672d6e6f746172792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dennisbusk/debug-notary)

`Debug Notary` is a powerful Laravel package designed to make debugging and user reporting effortless. It automatically captures system logs, tracks JavaScript errors, and provides a visual "Notary" button for users to report bugs with screenshots, annotations, and browser data directly from your application.

---

### ❓ Why Debug Notary?

[](#-why-debug-notary)

While tools like **Laravel Pulse** focus on *Application Performance Monitoring (APM)* (server health, slow queries, CPU usage), **Debug Notary** is a *Bug Reporting &amp; Error Tracking* tool. It bridges the gap between the user's visual experience and the developer's technical requirements.

FeatureDebug NotaryLaravel Pulse**User Interaction**✅ Point-and-click reporting❌ No manual reports**Visual Context**✅ Annotated Screenshots❌ No visuals**Frontend Monitoring**✅ JS Errors &amp; Console Logs❌ No**AI Integration**✅ LLM-optimized exports❌ No**System Metrics**❌ (CPU/RAM/SQL)✅ Yes---

### 🚀 Features

[](#-features)

- **Automatic Log Collection:** Listens to Laravel's log events and stores them in your database.
- **JavaScript Error Tracking:** Automatically captures frontend errors (`window.onerror`, `window.onunhandledrejection`) and console errors with full stack traces.
- **Smart De-duplication:** Automatically groups similar errors by normalizing messages (redacting IDs, UUIDs, etc.) before hashing.
- **Visual Notary Button:** A discrete button injected into your application, allowing users to submit bug reports with screenshots (using [marker.js](https://marker.js.com/)), notes, and attachments.
- **Intelligent Dashboard:** A comprehensive Livewire-powered dashboard with dark mode support, trend statistics, status management (Open, In Progress, Resolved), and advanced filtering.
- **GDPR Ready:** Built-in "Pixelate" tool for screenshots to blur sensitive data, plus advanced data masking for context logs.
- **Multi-Channel Notifications:** Get alerted via Slack or Email when new unique errors occur, featuring built-in rate limiting and queue support.
- **Screenshot &amp; File Management:** Support for storing screenshots and attachments as files on disk or as Base64 strings.
- **User &amp; Tenant Context:** Automatically associates logs with authenticated users and their roles (compatible with Spatie Permissions).
- **Markdown &amp; LLM Export:** Generate structured reports optimized for GitHub issues or AI analysis with a single click.
- **Auto-Cleanup:** Automatically prunes old logs using Laravel's `Prunable` trait, with configurable retention periods per log type.
- **Localization:** Built-in support for English and Danish.

---

### 📖 Recipes &amp; Best Practices

[](#-recipes--best-practices)

#### Log Cart Contents during Error

[](#log-cart-contents-during-error)

When an error occurs in your checkout flow, it's invaluable to see what was in the user's cart.

```
use Dennisbusk\DebugNotary\Facades\DebugNotary;

try {
    // Some logic that might fail
} catch (\Exception $e) {
    DebugNotary::error($e->getMessage(), [
        'cart' => $cart->toArray(),
        'checkout_step' => 'payment',
        'coupon_code' => $session->get('coupon')
    ]);
    throw $e;
}
```

#### Attach Debug Logs manually

[](#attach-debug-logs-manually)

If you have a log file or a JSON export of the current state, users can attach it directly via the Notary button in the frontend.

#### Capture Auth State

[](#capture-auth-state)

Capture the current user's permissions to see if a bug is related to access rights.

```
DebugNotary::info('User accessed premium feature', [
    'permissions' => auth()->user()->getAllPermissions()->pluck('name'),
    'active_plan' => $user->plan_id
]);
```

---

### 📋 Requirements

[](#-requirements)

- **PHP:** ^8.2
- **Laravel:** ^10.0, ^11.0, or ^12.0
- **Livewire:** ^3.0 or ^4.0

---

### 📦 Installation

[](#-installation)

Install the package via composer:

```
composer require dennisbusk/debug-notary
```

#### 1. Run Migrations

[](#1-run-migrations)

The package requires a table to store recorded bugs:

```
php artisan migrate
```

#### 2. Publish Configuration (Optional)

[](#2-publish-configuration-optional)

To customize the default settings, publish the configuration file:

```
php artisan vendor:publish --tag="debug-notary-config"
```

#### 3. Middleware

[](#3-middleware)

The package automatically injects the Notary button via a global middleware. If you've disabled automatic loading or need manual control, add the middleware to your `web` group:

```
// app/Http/Kernel.php or bootstrap/app.php (Laravel 11+)
'web' => [
    // ...
    \Dennisbusk\DebugNotary\Http\Middleware\InjectNotaryButton::class,
],
```

#### 4. Test Your Setup

[](#4-test-your-setup)

Verify that notifications and basic logging are working correctly:

```
php artisan debug-notary:test
```

---

### ⚙️ Configuration

[](#️-configuration)

The configuration file `config/debug-notary.php` allows you to fine-tune the package:

- `enabled`: Master toggle for the package.
- `debug_level`: Minimum log level to capture (default: `error`).
- `system_log`: Capture standard Laravel logs.
- `notary_log`: Enable/disable the manual reporting button.
- `console_log`: Automatically capture JS console errors.
- `access_gate`: Define a Gate to control who sees the button and dashboard.
- `notifications`: Configure Slack webhooks, Email recipients, and rate limiting.
- `masking.fields`: List of fields to redact from logs and context.

#### Access Control

[](#access-control)

To restrict access to the Debug Notary dashboard or button, define a gate in your `AuthServiceProvider`:

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

Gate::define('view-debug-notary', function ($user) {
    return $user->is_admin;
});
```

Then, update your `config/debug-notary.php`:

```
'access_gate' => 'view-debug-notary',
```

---

### 🛠 Usage

[](#-usage)

#### Manual Logging via Facade

[](#manual-logging-via-facade)

Capture specific events manually in your PHP code:

```
use Dennisbusk\DebugNotary\Facades\DebugNotary;

DebugNotary::warning('User attempted to access a locked resource', [
    'resource_id' => 123
]);
```

#### Dashboard

[](#dashboard)

Access the dashboard at `/laravel-debug-notary`.

The dashboard uses **Tailwind CSS**. If you are using a custom layout, ensure Tailwind is available. The default layout loads Tailwind via CDN for convenience.

#### Localization

[](#localization)

To customize the text or add new languages, publish the language files:

```
php artisan vendor:publish --tag="debug-notary-lang"
```

---

### 🖥 Advanced Route Registration

[](#-advanced-route-registration)

By default, routes are registered automatically. To manually control route registration (e.g., to apply specific middleware), disable automatic registration in `config/debug-notary.php`:

```
'register_routes' => false,
```

Then, register them in your `routes/web.php`:

```
use Dennisbusk\DebugNotary\DebugNotary;

Route::middleware(['auth', 'can:admin'])->group(function () {
    DebugNotary::routes();
});
```

---

### 🔒 Security &amp; GDPR

[](#-security--gdpr)

Debug Notary is built with data protection in mind. For a full overview, please see our [SECURITY.md](SECURITY.md) file.

- **Pixelate/Blur Tool:** Users can manually blur sensitive information on screenshots before submitting.
- **Data Masking:** Sensitive fields (passwords, tokens, etc.) are automatically redacted.
- **Auto-Pruning:** Configurable retention periods ensure you don't keep data longer than necessary.

---

### 📄 License

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

---

### 🤝 Contributing

[](#-contributing)

Suggestions for improvements or bug reports? Open an issue or submit a pull request!

---

*Created with ❤️ by [Dennis Busk](https://github.com/dennisbusk)*

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance94

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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 ~1 days

Total

12

Last Release

36d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21d4c666c694a122d15604cf9aeab6459d5f4ecb7b9712a52759dd90d65f1a9c?d=identicon)[dennisbusk](/maintainers/dennisbusk)

---

Top Contributors

[![dennisbusk](https://avatars.githubusercontent.com/u/9109360?v=4)](https://github.com/dennisbusk "dennisbusk (18 commits)")

### Embed Badge

![Health badge](/badges/dennisbusk-debug-notary/health.svg)

```
[![Health](https://phpackages.com/badges/dennisbusk-debug-notary/health.svg)](https://phpackages.com/packages/dennisbusk-debug-notary)
```

###  Alternatives

[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

728176.2k14](/packages/tallstackui-tallstackui)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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