Looking to hire Laravel developers? Try LaraJobs

laravel-execution-monitor maintained by lorapok

Description
Zero-configuration performance monitoring for Laravel applications with real-time alerts and beautiful UI
Last update
2026/01/13 16:50 (dev-main)
License
Links
Downloads
2

Comments
comments powered by Disqus

🚀 Lorapok - Laravel Execution Monitor

Zero-configuration performance monitoring for Laravel applications

#MaJHiBhai - Your friendly Laravel performance companion 🐛

Explore DocumentationView ChangelogDownload

Lorapok Marketing

✨ Features

Core Monitoring

  • 🎯 Zero Configuration - Works out of the box with sensible defaults
  • 🤖 Smart Auto-Detection - Automatically enables in dev/local/staging, disables in production
  • 🎨 Beautiful Floating Widget - Real-time metrics in a sleek, animated UI with dev profile
  • Performance Tracking - Routes, queries, functions, memory usage, timers
  • 📊 Real-Time Dashboard - Interactive modal with tabs for overview, routes, and queries
  • 💾 Memory Profiling - Current and peak memory usage tracking
  • ⏱️ Execution Timing - Precise request execution and function timing measurements

Query Management

  • 📋 Clipboard Integration - Copy queries with one click from the widget
  • ⌨️ Keyboard Shortcuts - Press Ctrl+Shift+C (or Cmd+Shift+C on Mac) to copy selected query
  • 🗂️ Clipboard History - Automatic storage of last 20 copied queries in browser localStorage
  • 🔍 Query Selection - Click to select queries with visual highlighting
  • ⏱️ Query Timing - See execution time for each database query

CLI Tools & Auditing

  • 📋 Performance Audit - php artisan monitor:audit for security and performance health checks
  • 🔥 Heatmap Visualization - php artisan monitor:heatmap to see which routes are consistently slow
  • 🏆 Achievement System - Earn badges for performance optimizations (Memory Master, Query Slayer)
  • 📊 Status Check - Quick view of monitoring state and environment

Changelog

v1.3.6 (2026-01-10)

  • UI/UX: Premium Optimization Quests redesign with glassmorphism and animated decorative larvae (🦋).
  • Settings: Fully restored SMTP configuration fields for granular email notification control.
  • Logs: Centered navigation tabs and middle-aligned controls for a standard professional layout.
  • Stability: Fixed Alpine.js undefined errors and stabilized monitor modal positioning.

v1.3.0 (2026-01-10)

  • UI/UX: Unique, professional identities for header action buttons (Quests, Dev, Settings).
  • CI/CD Fix: Resolved BindingResolutionException and workflow path drift in GitHub Actions.
  • Navigation: Quests integrated into the top header for a cleaner main layout.
  • Navigation: Added floating Home button to all test lab pages for easier navigation.
  • System Info: Added PHP and Database (driver + version) information to monitor footer.
  • Timeline Complete: Added missing queries and controller segments to Larvae Trail.
  • Fixed N/A Data: Updated middleware to ensure request metrics (method, path, status) are captured.
  • Isolation: Added timeline reset to prevent data pollution between requests.

v1.2.4 (2026-01-09)

  • UI Fix: Resolved [object Object] rendering in performance alerts modal.
  • CI/CD: Improved reliability of automated builds.

v1.2.0 (2026-01-09)

  • 🚀 Major Refactoring: PSR-4 compliant structure (Reporters/Services)
  • 🏆 Achievement System: Persistent performance milestones
  • 🔥 Performance Heatmap: New monitor:heatmap visualization
  • 🔒 Security Audit: New monitor:audit command
  • Bug Fixes: Class loading, Dashboard sync, UI feedback

v1.1.1 (2026-01-09)

v1.1.0 (2026-01-08)

  • ✅ Enhanced Developer Profile with photo
  • ✅ Redesigned Settings Modal
  • ✅ Professional marketing assets integrated

v1.0.0 (2026-01-06)

  • ✅ Initial release with core monitoring features
  • ✅ Query tracking and history
  • ✅ Multi-channel notifications

📦 Installation

composer require lorapok/laravel-execution-monitor

🔔 Discord integration

Discord Integration

To enable Discord notifications, add the following to your application's .env (or set via your deployment configuration):

MONITOR_DISCORD_WEBHOOK=https://discordapp.com/api/webhooks/your_webhook_id/your_webhook_token
MONITOR_DISCORD_ENABLED=true

For local development you can also open the Lorapok widget and save a local developer webhook under Settings (stored in browser localStorage) — this is intended for developer convenience only. For production, prefer the .env approach.

To test sending an on-demand alert from the application, run:

php tools/trigger_discord_test.php

A GitHub Actions workflow is provided at .github/workflows/phpunit.yml that runs composer install and phpunit on push and pull requests.

That's it! The package automatically enables in local/dev/staging and disables in production.

Optional: Full Installation

php artisan monitor:install

🚀 Quick Start

use Lorapok\ExecutionMonitor\Facades\Monitor;

// Track execution time
Monitor::start('expensive-operation');
// ... your code
Monitor::end('expensive-operation');

// Or use a closure
$result = monitor('api-call', function() {
    return Http::get('https://api.example.com/data');
});

🎨 The Widget

A beautiful floating button appears in your application. Click it to see:

  • 📊 Overview - Performance metrics at a glance
  • 🛣️ Routes - All tracked routes with execution times
  • 🗄️ Queries - Database queries with timing and copy-to-clipboard
  • ⚡ Functions - Custom tracked functions
  • 💾 Memory - Memory usage statistics

Clipboard Features

  • Click Copy Button - Each query has a copy button; click to copy SQL to clipboard and see "Copied!" feedback
  • Keyboard Shortcut - Press Ctrl+Shift+C (or Cmd+Shift+C on Mac) to copy the selected query (or first if none selected)
  • Clipboard History - All copied queries are stored in browser localStorage (max 20 entries) for easy access

🖼️ Gallery

Core Monitoring Dashboard

Real-Time OverviewMonitor Dashboard Timeline VisualizationTimeline
Routes AnalysisRoutes Query IntelligenceQueries
Middleware StackMiddleware Cache ROICache
Log ViewerLogs Activity MonitorActivity

Developer Productivity

Developer Profile (#MaJHiBhai)Profile In-Browser TerminalTerminal
API PlaygroundAPI Playground Usage GuideGuide
Optimization QuestsQuests

Settings & Configuration

Advanced ConfigAdvanced
Alert ThresholdsAlerts Email NotificationsEmail
Discord IntegrationDiscord Slack IntegrationSlack

Brand Assets

Larvae MascotMascot

📊 Check Status

# Check if monitoring is active
php artisan monitor:status

# Force enable
php artisan monitor:enable

# Disable monitoring
php artisan monitor:disable

⚙️ Configuration

Publish config (optional):

php artisan vendor:publish --tag=lorapok-config

Edit config/execution-monitor.php:

return [
    'auto_detect' => true,  // Smart environment detection
    'features' => [
        'widget' => true,
        'routes' => true,
        'queries' => true,
        'functions' => true,
    ],
    'thresholds' => [
        'route' => 1000,   // ms
        'query' => 100,    // ms
    ],
];

🎭 Environment Modes

Mode Local Staging Production
local-only (default)
non-production
custom Config Config Config

📢 Broadcasting & Real-Time Alerts

Lorapok integrates with Laravel Broadcasting to send real-time performance alerts to your team:

# Configure Pusher in .env
BROADCAST_DRIVER=pusher
PUSHER_APP_ID=your_app_id
PUSHER_APP_KEY=your_app_key
PUSHER_APP_SECRET=your_secret
PUSHER_APP_CLUSTER=ap2

When thresholds are exceeded, performance alerts are:

  • 📬 Broadcast to all connected clients in real-time
  • 🔔 Sent to configured notification channels (Slack, Discord, Email)
  • 💾 Optionally stored in database for audit trail

🎤 Notifications

Configure multiple notification channels in config/execution-monitor.php:

'notifications' => [
    'slack' => [
        'enabled' => true,
        'webhook_url' => env('MONITOR_SLACK_WEBHOOK'),
        'channel' => '#monitoring',
    ],
    'discord' => [
        'enabled' => true,
        'webhook_url' => env('MONITOR_DISCORD_WEBHOOK'),
    ],
    'mail' => [
        'enabled' => true,
        'to' => env('MONITOR_MAIL_TO', 'admin@example.com'),
    ],
],
'rate_limiting' => [
    'enabled' => true,
    'max_per_hour' => 10,
],

📚 Advanced Usage

In Controllers

use Lorapok\ExecutionMonitor\Traits\TracksExecutionTime;

class UserController extends Controller
{
    use TracksExecutionTime;

    public function index()
    {
        $this->startTimer('user-fetch');
        $users = User::paginate(20);
        $this->endTimer('user-fetch');

        return view('users.index', compact('users'));
    }
}

Helper Functions

// Quick tracking
monitor()->start('task');
// ...
monitor()->end('task');

// With closure
$data = monitor('fetch-data', fn() => $this->getData());

// Check if enabled
if (execution_monitor_enabled()) {
    // monitoring code
}

🤝 Contributing

Contributions welcome! Please see CONTRIBUTING.md.

📄 License

MIT License - see LICENSE file.

🐛 About Lorapok

Lorapok (inspired by Black Soldier Fly Larvae) is a lightweight, zero-config performance monitoring package for Laravel. Like its namesake insect, Lorapok works quietly in the background to identify and eliminate performance bottlenecks, helping your Laravel application become more efficient and fast.

Lorapok makes it easy for developers to:

  • 🔍 Identify slow queries and routes
  • 📊 Monitor memory usage in real-time
  • 🚨 Set up automatic performance alerts
  • 📋 Copy and analyze database queries
  • 🏃 Track custom code execution

👨‍💻 About the Creator


🕒 Recent Activity

Last updated on: 2026-01-09 - Finalized stable release v1.2.8 🚀

Lorapok is developed and maintained by Mohammad Maizied Hasan Majumder

📧 Email: mdshuvo40@gmail.com 🔗 LinkedIn: linkedin.com/in/maizied 🐙 GitHub: @Maijied

Made with ❤️ for the Laravel community by @Maijied