PHPackages                             farukcoder/laravel-feature-heatmap - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. farukcoder/laravel-feature-heatmap

ActiveComposer-plugin[Logging &amp; Monitoring](/categories/logging)

farukcoder/laravel-feature-heatmap
==================================

Track which controllers/routes/features are used by which users, and visualize it as a heatmap.

v1.1.0(today)09↑2900%MITBladePHP ^8.1

Since Jul 23Pushed todayCompare

[ Source](https://github.com/Farukcoder/laravel-feature-usage)[ Packagist](https://packagist.org/packages/farukcoder/laravel-feature-heatmap)[ RSS](/packages/farukcoder-laravel-feature-heatmap/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

🔥 Laravel Feature Heatmap
=========================

[](#-laravel-feature-heatmap)

 [![Latest Version](https://camo.githubusercontent.com/efce47d994b50becae59567f0e7c1e8ca6d84b3a3c70f88cf7dabcf9dfc27f1a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666172756b636f6465722f6c61726176656c2d666561747572652d686561746d61703f7374796c653d666c61742d73717561726526636f6c6f723d303662366434)](https://camo.githubusercontent.com/efce47d994b50becae59567f0e7c1e8ca6d84b3a3c70f88cf7dabcf9dfc27f1a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666172756b636f6465722f6c61726176656c2d666561747572652d686561746d61703f7374796c653d666c61742d73717561726526636f6c6f723d303662366434) [![PHP Version](https://camo.githubusercontent.com/8cd9a40e3aafd6e7b047257b2d9c82c3155192a2284dc61094ab8e890a4acbde/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f666172756b636f6465722f6c61726176656c2d666561747572652d686561746d61703f7374796c653d666c61742d73717561726526636f6c6f723d373737424234)](https://camo.githubusercontent.com/8cd9a40e3aafd6e7b047257b2d9c82c3155192a2284dc61094ab8e890a4acbde/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f666172756b636f6465722f6c61726176656c2d666561747572652d686561746d61703f7374796c653d666c61742d73717561726526636f6c6f723d373737424234) [![License](https://camo.githubusercontent.com/c6fc04e4a7e520c0a8c51e3e3e5fee885cbba83ea889bceb99fc88d2b394e92a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f666172756b636f6465722f6c61726176656c2d666561747572652d686561746d61703f7374796c653d666c61742d73717561726526636f6c6f723d323263353565)](https://camo.githubusercontent.com/c6fc04e4a7e520c0a8c51e3e3e5fee885cbba83ea889bceb99fc88d2b394e92a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f666172756b636f6465722f6c61726176656c2d666561747572652d686561746d61703f7374796c653d666c61742d73717561726526636f6c6f723d323263353565) [![Downloads](https://camo.githubusercontent.com/980deb844183df32bc0ab9c3f76bf11dbfa9b193e2820d76f0cb545b509cf61e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666172756b636f6465722f6c61726176656c2d666561747572652d686561746d61703f7374796c653d666c61742d73717561726526636f6c6f723d663539653062)](https://camo.githubusercontent.com/980deb844183df32bc0ab9c3f76bf11dbfa9b193e2820d76f0cb545b509cf61e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666172756b636f6465722f6c61726176656c2d666561747572652d686561746d61703f7374796c653d666c61742d73717561726526636f6c6f723d663539653062)

 **A Powerful Laravel Feature Usage Tracking &amp; Heatmap Dashboard Package by Farukcoder**
 Track controllers, routes, users, and feature adoption in your Laravel application with zero configuration.

---

✨ Features
----------

[](#-features)

- ⚡ **Zero-Setup Global Tracking** — Automatically registers middleware to track all application routes with zero manual configuration in `web.php` or `Kernel.php`
- 🔥 **Interactive Heatmap Dashboard** — Visualise Feature × Date and Feature × User usage patterns with interactive ApexCharts
- 👤 **User-Wise Tracking &amp; Drill-Down** — Track individual user activity across modules and features with detailed modal drill-downs
- 📥 **CSV Activity Reports** — Export per-user feature interaction reports directly from the dashboard with a single click
- 💤 **Unused Feature Discovery** — Detect features dormant for 30+ days to clean up technical debt and refactor safely
- ⚡ **Non-Blocking Queue Logger** — Dispatches logging jobs asynchronously using Laravel queues to maintain ultra-fast HTTP responses
- 🧹 **Daily Summary &amp; Auto-Pruning** — Aggregates high-volume raw logs into lightweight daily summary records to keep your database fast and lean
- ⚙️ **Highly Configurable** — Easily exclude debug/admin routes, configure authorization gates, user models, and table schema mappings

---

📋 What It Tracks
----------------

[](#-what-it-tracks)

The package focuses on **code-level feature adoption** — identifying exactly which controllers, methods, and routes are used by whom.

Tracked DataSource / Description**Controller &amp; Action**e.g. `App\Http\Controllers\OrderController@store`**Route Name**e.g. `orders.store`**HTTP Method**`GET`, `POST`, `PUT`, `DELETE`, etc.**Request URI**Full endpoint URI path**User Identity**Authenticated `user_id`, resolved with User Name &amp; Email**Timestamps**High-precision hit timestamps &amp; daily usage frequency---

📦 Installation
--------------

[](#-installation)

```
composer require farukcoder/laravel-feature-heatmap
```

### 🖥️ CLI Output on Installation

[](#️-cli-output-on-installation)

```
  ███████╗ █████╗ ██████╗ ██╗  ██╗██╗  ██╗  ██████╗  ██████╗ ██████╗ ███████╗██████╗
  ██╔════╝██╔══██╗██╔══██╗██║  ██║██║ ██╔╝ ██╔════╝ ██╔═══██╗██╔══██╗██╔════╝██╔══██╗
  █████╗  ███████║██████╔╝██║  ██║█████╔╝  ██║      ██║   ██║██║  ██║█████╗  ██████╔╝
  ██╔══╝  ██╔══██╗██╔══██╗██║  ██║██╔═██╗  ██║      ██║   ██║██║  ██║██╔══╝  ██╔══██╗
  ██║     ██║  ██║██║  ██║╚██████╔╝██║  ██╗ ╚██████╗ ╚██████╔╝██████╔╝███████╗██║  ██║
  ╚═╝     ╚═╝  ╚═╝╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═╝  ╚═════╝  ╚═════╝ ╚═════╝ ╚══════╝╚═╝  ╚═╝

        Laravel Feature Heatmap — Route & Feature Usage Tracker
                  by Farukcoder | github.com/farukcoder

```

> **Note:** The package auto-discovers the service provider and middleware. No manual provider registration is needed for Laravel 10+.

### Publish Configuration (Optional)

[](#publish-configuration-optional)

```
php artisan vendor:publish --tag=feature-heatmap-config
```

### Run Migrations

[](#run-migrations)

```
php artisan migrate
```

This creates two optimized database tables:

- `feature_usage_logs`: Stores raw per-request interaction logs.
- `feature_usage_summaries`: Stores aggregated daily usage statistics for fast heatmap rendering.

---

🚀 Usage
-------

[](#-usage)

### Step 1 — Automatic Global Tracking (Zero Setup)

[](#step-1--automatic-global-tracking-zero-setup)

By default, the package **automatically registers and attaches** the tracking middleware to all `web` and `api` route groups inside the `FeatureHeatmapServiceProvider`.

**No manual edits to `web.php`, `api.php`, or `Kernel.php` are required!**

> **Optional Manual Mode:**If you prefer manual middleware control, set `'auto_track' => false` in `config/feature-heatmap.php` or `FEATURE_HEATMAP_AUTO_TRACK=false` in `.env`. You can then apply the named middleware `track.feature` to specific routes or groups:
>
> ```
> Route::middleware(['web', 'auth', 'track.feature'])->group(function () {
>     Route::get('/orders', [OrderController::class, 'index']);
> });
> ```

---

### Step 2 — Schedule Daily Aggregation &amp; Pruning

[](#step-2--schedule-daily-aggregation--pruning)

Raw request logs build up quickly on high-traffic sites. Schedule the built-in Artisan command to aggregate raw logs daily and prune old entries.

**Laravel 10 (`app/Console/Kernel.php`):**

```
protected function schedule(Schedule $schedule): void
{
    $schedule->command('feature-heatmap:aggregate --prune')->dailyAt('01:00');
}
```

**Laravel 11+ (`routes/console.php`):**

```
use Illuminate\Support\Facades\Schedule;

Schedule::command('feature-heatmap:aggregate --prune')->dailyAt('01:00');
```

---

### Step 3 — Access the Heatmap Dashboard

[](#step-3--access-the-heatmap-dashboard)

Navigate to the dashboard in your web browser:

```
http://your-domain.test/feature-heatmap

```

---

👤 User-Wise Tracking &amp; CSV Export
-------------------------------------

[](#-user-wise-tracking--csv-export)

The dashboard includes a dedicated **User-Wise Tracking Table**:

1. **User Summary Table**: Lists all active users, total interaction count, distinct features used, and last active date.
2. **Module Drill-Down**: Click on any user row to launch an interactive breakdown showing exact features accessed by that specific user across dates.
3. **CSV Export**: Click the **Download CSV Report** button on any user row to generate a complete report file (`heatmap-report-{username}-{date}.csv`).

---

⚙️ Configuration
----------------

[](#️-configuration)

After publishing, edit `config/feature-heatmap.php`:

```
return [
    // Enable or disable the package globally
    'enabled' => env('FEATURE_HEATMAP_ENABLED', true),

    // Automatically attach middleware to web/api routes
    'auto_track' => env('FEATURE_HEATMAP_AUTO_TRACK', true),

    // Use queues for non-blocking database writes
    'use_queue' => env('FEATURE_HEATMAP_USE_QUEUE', true),
    'queue_name' => env('FEATURE_HEATMAP_QUEUE', 'default'),

    // Retention period for raw interaction logs (in days)
    'raw_log_retention_days' => 14,

    // Excluded URIs (regex patterns)
    'excluded_patterns' => [
        '^_debugbar',
        '^horizon',
        '^telescope',
        '^feature-heatmap',
    ],

    // Dashboard route prefix & middleware
    'route_prefix' => 'feature-heatmap',
    'route_middleware' => ['web', 'auth'],

    // User model column resolution
    'user_name_column' => 'name',
    'user_email_column' => 'email',
];
```

### Environment Variables

[](#environment-variables)

Add these to your `.env` file to customize behavior:

```
FEATURE_HEATMAP_ENABLED=true
FEATURE_HEATMAP_AUTO_TRACK=true
FEATURE_HEATMAP_USE_QUEUE=false
FEATURE_HEATMAP_QUEUE=default

# Dashboard Login Authentication (Login Modal)
FEATURE_HEATMAP_AUTH_ENABLED=true
FEATURE_HEATMAP_USERNAME=admin
FEATURE_HEATMAP_PASSWORD=your_secure_password
```

---

🛠️ Artisan Commands
-------------------

[](#️-artisan-commands)

CommandDescription`php artisan feature-heatmap:aggregate`Aggregates raw logs into daily summary statistics`php artisan feature-heatmap:aggregate --prune`Aggregates raw logs and deletes entries older than `raw_log_retention_days`---

🌐 API Endpoints
---------------

[](#-api-endpoints)

The dashboard exposes internal JSON &amp; CSV endpoints under the configured route prefix (`/feature-heatmap`):

MethodURIDescription`GET``/feature-heatmap`Renders the HTML Dashboard UI`GET``/feature-heatmap/data`Returns global heatmap data for charts`GET``/feature-heatmap/users`Returns user summary table data`GET``/feature-heatmap/users/{userId}`Returns module-wise heatmap detail for a user`GET``/feature-heatmap/users/{userId}/report`Streams downloadable CSV activity report for a user---

🔧 Laravel &amp; PHP Compatibility
---------------------------------

[](#-laravel--php-compatibility)

Laravel VersionPHP VersionStatus10.x8.1+✅ Supported11.x8.2+✅ Supported12.x8.2+✅ Supported13.x8.3+✅ Supported---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please feel free to submit a Pull Request:

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

---

📝 Changelog
-----------

[](#-changelog)

### v1.0.0 (2026-07-23)

[](#v100-2026-07-23)

- 🎉 Initial release of `farukcoder/laravel-feature-heatmap`
- ⚡ Zero-setup automatic global route tracking
- 🔥 Interactive Feature × Date and Feature × User ApexCharts heatmaps
- 👤 User-wise tracking table with modal drill-downs
- 📥 Streamed CSV user activity report exporter
- 🧹 Automated log aggregation and pruning Artisan command
- 💤 Unused feature detection engine

---

🛡️ Security
-----------

[](#️-security)

If you discover any security-related issues, please report them directly to the author instead of using the public issue tracker.

---

📄 License
---------

[](#-license)

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

---

👨‍💻 Author
----------

[](#‍-author)

**Md. Omar Faruk** — Full Stack Software Engineer

- GitHub: [@farukcoder](https://github.com/farukcoder)

---

 Made with ❤️ by [Farukcoder](https://github.com/farukcoder)

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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

2

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/67540985?v=4)[Md Omar Faruk](/maintainers/Farukcoder)[@Farukcoder](https://github.com/Farukcoder)

---

Top Contributors

[![Farukcoder](https://avatars.githubusercontent.com/u/67540985?v=4)](https://github.com/Farukcoder "Farukcoder (7 commits)")[![203410005-farukdev](https://avatars.githubusercontent.com/u/227239220?v=4)](https://github.com/203410005-farukdev "203410005-farukdev (1 commits)")

---

Tags

analyticsdashboarddeveloper-toolsfeature-trackingheatmaplaravellaravel-packagemonitoringphpreportingstatisticsusage-tracking

### Embed Badge

![Health badge](/badges/farukcoder-laravel-feature-heatmap/health.svg)

```
[![Health](https://phpackages.com/badges/farukcoder-laravel-feature-heatmap/health.svg)](https://phpackages.com/packages/farukcoder-laravel-feature-heatmap)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[spatie/laravel-health

Monitor the health of a Laravel application

87912.0M177](/packages/spatie-laravel-health)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)

PHPackages © 2026

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