Skip to content

v1.0.0 — Initial stable release

Choose a tag to compare

@jakub-lipinski jakub-lipinski released this 02 Mar 14:44

Lens for Laravel v1.0.0

A plug-and-play accessibility auditor for Laravel. Drop it into any Laravel project, run one command, and get a full WCAG diagnostic report with AI-powered fix suggestions.

Features

CLI Audit Command

  • php artisan lens:audit — scan your app with zero configuration (defaults to APP_URL)
  • Three scan modes: single URL, multiple URLs, whole-website crawl
  • WCAG level filtering: --a, --aa, --all
  • CI/CD quality gate via --threshold=N (exits with code 1 when violations exceed the limit)
  • Verbose output with -v to inspect full failing HTML nodes
  • Aggregated crawl report grouped by rule ID

Dashboard

  • Visual audit interface at /lens-for-laravel/dashboard
  • Single URL, Multiple URLs, and Whole Website scan modes
  • Violation explorer with WCAG-level filtering and summary cards
  • One-click element preview (highlights the failing element in a screenshot)
  • PDF report export

AI Fix Engine

  • Powered by laravel/ai — supports Google Gemini, OpenAI, and Anthropic
  • Reads ±20 lines of Blade context around each violation; automatically expands the window to include the matching closing tag for large elements
  • Returns structured fixedCode + explanation for side-by-side review
  • Applies fixes directly to Blade files with path validation, RCE pattern blocking, and atomic writes

Security

  • Domain-locked scanning (only your own APP_URL domain)
  • HTTP/HTTPS scheme enforcement
  • Path traversal and PHP open tag injection guards
  • Prompt injection delimiters in AI prompts
  • Rate limiting on all scan and fix endpoints

Requirements

  • PHP 8.2+
  • Laravel 10, 11, or 12
  • Node.js 18+ and Puppeteer 21+ (for Browsershot)
  • laravel/ai + provider API key (for AI Fix Engine only)

Installation

composer require webcrafts-studio/lens-for-laravel
php artisan vendor:publish --tag=lens-for-laravel-config