Product Decisions This Supports
- Developer Experience (DX) Enhancement: Accelerates internal tooling development by reducing friction for engineers accessing admin/debug routes (e.g., Filament panels, API endpoints, or custom dashboards). Eliminates the need to manage per-user credentials or complex auth flows for dev-only routes.
- Security Hardening: Provides a lightweight, maintainable way to protect sensitive routes (e.g.,
/filament, /admin, or custom debug tools) without bloating the auth system. Aligns with "defense in depth" by adding an extra layer for internal routes.
- Build vs. Buy: Buy for teams already using Filament or Laravel and needing a quick, low-overhead solution. Avoid reinventing middleware-based auth for dev-only routes. Build only if requiring dynamic password rotation, multi-factor auth, or integration with existing SSO.
- Roadmap Prioritization: Ideal for teams adopting Filament or expanding internal tooling. Prioritize if:
- Onboarding new engineers to admin panels is a bottleneck.
- Debugging live environments requires frequent route access.
- Security teams mandate additional protection for dev routes.
- Framework Upgrade Planning (v5.0.0): v5 supports Filament v5 and Laravel 12 / 13, so this package is no longer a blocker on a Laravel 12/13 or Filament v5 upgrade path. Conversely, teams on Filament v4 must pin to the maintained
v4 branch — factor this into the upgrade backlog as a paired dependency, not an independent one.
- Unlock Flow Polish (v5.0.0): The redirected gate page now uses the correct config key and falls back to the configured redirect when there is no previous page. This removes a known rough edge in the unlock UX — fewer "it sent me somewhere weird" support pings, and the config is now trustworthy enough to document as a standard setting.
- Risk Reduction via Test Coverage (v5.0.0): A new test suite covers the gate page, middleware, logout action, and install command. This materially lowers regression risk for a package that sits in front of internal routes — raising confidence for adoption in security-adjacent tooling and reducing the "who maintains this?" objection.
- Use Cases:
- Filament Admin Panels: Secure
/filament routes during development/staging.
- API Sandboxes: Protect
/api/sandbox or /graphql endpoints for internal testing.
- Custom Dashboards: Gate access to internal analytics or monitoring tools.
- Legacy Systems: Quickly secure routes in monolithic apps without refactoring auth.
When to Consider This Package
Adopt if:
- Your team uses Filament or Laravel and needs to secure dev-only routes with minimal effort.
- You are on Filament v5 / Laravel 12–13 (use v5) or Filament v4 (pin to the
v4 branch) — both lines are actively supported as of v5.0.0.
- You prioritize simplicity over granularity (e.g., static password is sufficient for your threat model).
- Routes are internal-facing and only require protection from accidental access (not external threats).
- You lack time/resources to integrate a full auth system (e.g., Sanctum, Passport) for dev routes.
- You want a test-covered dependency in front of internal routes rather than a hand-rolled middleware.
Look elsewhere if:
- You need dynamic password rotation or multi-factor authentication (consider Laravel Fortify or Sanctum).
- Routes require role-based access control (e.g., different teams need different permissions).
- Your organization mandates audit logs for all access attempts (this package lacks logging).
- You’re using non-Laravel/PHP stacks (e.g., Django, Rails, or Node.js).
- Security policies require SSO integration (e.g., Okta, Azure AD) for dev routes.
- You need long-term support on Filament v4 or Laravel ≤11 with a committed LTS/patch guarantee — the
v4 branch is maintained, but confirm its support window and patch cadence with the maintainer before making it load-bearing for many teams.
How to Pitch It (Stakeholders)
For Executives/Engineering Leadership:
"This package lets us instantly lock down developer-only routes in our Filament/Laravel apps with a single static password—no extra infrastructure or maintenance. For example, we can secure our /filament admin panel during development without adding complexity to our auth system. It’s a 10-minute setup that reduces support tickets from engineers accidentally exposing internal tools, while keeping our security posture strong. The v5.0.0 release is timely: it supports Filament v5 and Laravel 12/13, so it won’t hold back our framework upgrade, and it ships with a proper test suite—which means fewer surprises from a dependency sitting in front of our internal routes. The trade-off is minimal: we sacrifice dynamic passwords for simplicity, but gain speed and consistency across our dev environment."
Key Benefits:
- Time Savings: Deploy in <15 minutes vs. weeks for a custom solution.
- Cost Efficiency: Zero additional licensing or cloud costs.
- Risk Reduction: Prevents accidental data leaks via exposed dev routes; new automated tests in v5.0.0 reduce regression risk in the gate/middleware flow.
- Upgrade Unblocked: v5 supports Filament v5 and Laravel 12/13, so it aligns with (rather than delays) our platform roadmap.
- Scalability: Works seamlessly as we add more Filament panels or internal tools.
For Engineers:
*"This middleware replaces the hassle of managing .env files or temporary credentials for dev routes. Just slap it on any route (e.g., Route::middleware([DeveloperGate::class])->group(...)), and boom—only people with the password can access it. Perfect for:
- Filament panels during local/staging work.
- API sandboxes where you don’t want QA touching live endpoints.
- Debug routes that shouldn’t be public.
What changed in v5.0.0: Filament v5 and Laravel 12/13 support, a fix for the gate page redirect using the wrong config key, a sane fallback to the configured redirect when there’s no previous page, and a real test suite across the gate page, middleware, logout action, and install command. If you’re still on Filament v4, that line continues on the v4 branch—pin your constraint accordingly rather than mixing versions.
It’s MIT-licensed, actively maintained, and plays nice with Laravel’s middleware pipeline. No database setup, no migrations—just drop it in and go."*
Why Not DIY?
- Avoids reinventing password hashing, CSRF protection, or rate-limiting.
- The v5.0.0 test suite gives you regression coverage you would otherwise have to write and maintain yourself.
- Branch-based versioning (
v5 for Filament v5/Laravel 12–13, v4 for Filament v4) means upstream framework changes are handled for you rather than breaking your custom middleware.