Laravel Vitals v1.0
Star 1 Install
Documentation

Everything you need to instrument Laravel.

The package ships with a single config file and one artisan command. Most teams are running their first audit within five minutes of composer require.

Quick install Β· PHP 8.2+ Β· Laravel 11 / 12 / 13
What is Laravel Vitals

Lighthouse, plus the server context that produced the score.

Laravel Vitals runs Google Lighthouse against your own pages, captures what your server was doing at that exact moment β€” queries, memory, N+1 problems β€” and points directly at the lines of code responsible. Everything lands in a dashboard at /vitals that any team member can read and act on. Your data stays in your own database β€” no SaaS, no per-seat billing.

Lighthouse audits β€” 4 drivers
Backend telemetry per audit
file:line attribution
Real User Monitoring
Quick start

Install, declare a URL, run an audit.

Install bash
composer require corentinbtmps/laravel-vitals
php artisan vendor:publish --tag=vitals-config
php artisan migrate
php artisan vitals:install
Add RUM in your layout blade
<head>
    <meta charset="utf-8">
    @vitalsRum
</head>
Declare a URL (config/vitals.php) php
'urls' => ['home' => '/'],
Run your first audit bash
php artisan vitals:audit home --sync

Open /vitals β€” Lighthouse score, backend telemetry, and recommendations with file:line references.

Architecture

How an audit actually runs.

  1. 1

    Declare URLs

    config/vitals.php holds your URLs as label => /path pairs. Run vitals:audit manually, on a schedule, or from CI.

  2. 2

    Audit starts

    The package signs an X-Vitals-Audit-Id header with your APP_KEY and spawns Lighthouse (local Node, Playwright, or Google PageSpeed API depending on your driver).

  3. 3

    Backend telemetry

    While Lighthouse loads the page, your own middleware detects the signed header and records query count, query time, N+1 suspicion, peak memory, views, jobs, cache hits/misses.

  4. 4

    Lighthouse result

    Scores arrive (0-100) alongside raw metric values: LCP, INP, CLS, TTFB, FCP, TBT, Speed Index.

  5. 5

    Code analysis

    Static analyzers scan your Blade views, Vite config, and composer.json to attach exact file:line references to each Lighthouse finding. Everything is stored and surfaced at /vitals.

Learn knowledge base

Plain-language explanations of every metric.

Each Lighthouse metric β€” LCP, INP, CLS, TTFB β€” has a "Learn" page that explains it in three sentences, shows the threshold, and links the Web Vitals reference. Useful for onboarding new engineers.

Browse

Full reference on GitHub.

The complete README covers every Artisan command, the JSON API endpoints, the configuration surface (~30 env-overridable knobs), privacy guarantees, troubleshooting, and contribution guidelines.

View README on GitHub