As Laravel developers, we often focus on delivering features fast — but keeping your code secure, clean, and efficient can become a real challenge over time.
That’s exactly why I built CodeSnoutr — a Laravel package that automatically scans your codebase for security risks, performance bottlenecks, and code quality issues, all presented beautifully through a modern dashboard. And yes, it even includes AI-powered auto-fixes. 🤖
Available on Packagist: rafaelogic/codesnoutr
🚀 What Is CodeSnoutr?
CodeSnoutr is your Laravel project’s personal code guardian. It helps you spot potential issues in your codebase before they cause real problems in production.
It scans your application to find:
- 🛡️ Security vulnerabilities — like SQL injection, XSS, or hardcoded secrets
- ⚡ Performance bottlenecks — such as N+1 queries or inefficient loops
- 🧩 Code quality issues — including unused code, poor naming, or high complexity
- 🎨 Laravel best practice violations — in Blade templates, Eloquent relationships, and controllers
Everything is presented inside a beautiful Livewire + Tailwind dashboard where you can filter, explore, and manage your scan results in seconds.
🧠 How It Works
CodeSnoutr runs directly in your Laravel app — no external API calls required.
Once installed, you can trigger scans using simple Artisan commands:
composer require rafaelogic/codesnoutr
php artisan codesnoutr:install
php artisan codesnoutr:scan
The scanner then analyzes your codebase for risky patterns, complex functions, or Laravel-specific misconfigurations. Once it’s done, you’ll get a detailed report in your local dashboard — complete with issue categories, severity levels, and actionable suggestions.
And here’s the best part:
You can connect your OpenAI API key to automatically fix issues or get AI-suggested refactors directly in the dashboard.
CodeSnoutr doesn’t just point out problems — it helps you solve them.
🧩 Key Features (Based on the Latest Changelog)
✅ 1. Laravel Code Scanning Engine
Detects vulnerabilities, inefficiencies, and code quality problems across your entire codebase.
💻 2. Modern Web Dashboard
Built with Livewire and Tailwind CSS, the dashboard provides a clean, interactive interface for exploring and filtering scan results.
⚙️ 3. Artisan Commands
Quick setup and usage with:
php artisan codesnoutr:install
php artisan codesnoutr:scan
You can scan your full project, or target specific directories or files.
🤖 4. AI-Powered Auto-Fix
Optionally connect OpenAI to automatically fix issues or suggest refactors.
No more manually rewriting repetitive patterns — AI handles it for you.
🧱 5. Laravel-Native Integration
Works seamlessly with Laravel 10, 11, and 12 on PHP 8.1+, following Laravel’s conventions for installation, configuration, and artisan usage.
🧭 Why You’ll Love Using CodeSnoutr
- Find hidden security issues before they cause damage
- Identify performance bottlenecks early
- Simplify refactors and reviews
- Get smarter, AI-driven suggestions
- Keep your Laravel projects maintainable and future-proof
In short — it’s like having an extra team member who reviews your code 24/7.
💡 Example Use Case
Let’s say you’re working on a large Laravel application with multiple developers.
Over time, the codebase starts to grow messy — some queries are inefficient, some methods too complex, and a few Blade templates have outdated logic.
By installing CodeSnoutr, you can quickly scan your app and surface:
- Functions with unnecessary loops
- Models with unoptimized relationships
- Controllers with potential security risks
- Files with unused or legacy code
You review them visually in the dashboard, fix what’s needed — or let AI do it for you. It’s that simple.
🧰 Getting Started in Seconds
composer require rafaelogic/codesnoutr
php artisan codesnoutr:install
php artisan codesnoutr:scan
Then visit the dashboard URL printed in your terminal — and start exploring your first scan.
(Optional) Connect OpenAI in your .env
file for AI auto-fix:
OPENAI_API_KEY=your_api_key_here
💻 Contribute & Collaborate
CodeSnoutr is open source and constantly evolving.
You can help make it even better by contributing to:
- New rule definitions
- UI improvements
- Documentation and examples
- Bug reports or performance optimizations
Join us on GitHub 👇
🔗 github.com/rafaelogic/codesnoutr
🧩 Final Thoughts
CodeSnoutr is built to help Laravel developers write better, safer, and more efficient code — without slowing you down.
It’s still early in its journey, but the goal is clear:
To become a trusted code companion that makes every Laravel project cleaner and more reliable.
Try it out today, share your feedback, and let’s make Laravel development smarter — together. 💪
Top comments (0)