Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Developer Gate Laravel Package

tomatophp/filament-developer-gate

Filament plugin that protects selected routes, pages, and resources behind a static developer password using a simple middleware or trait. Includes login screens, logout actions and confirmation, plus an optional admin panel plugin.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Middleware-Based Security: The package leverages Laravel’s middleware system, which aligns well with Laravel’s built-in architecture. It provides a lightweight, modular way to secure routes without requiring complex authentication systems. v5.0.0 keeps this model unchanged, so no re-architecture is implied by the upgrade.
  • Filament Integration: Designed specifically for Filament (Laravel admin panel), it ensures compatibility with Filament’s routing and middleware stack. v5.0.0 adds explicit Filament v5 support, meaning the package now tracks the current Filament major rather than lagging behind it — a meaningful improvement over the previously assumed "recent Filament" support.
  • Current-Stack Alignment: With declared support for Laravel 12 / 13 and Filament v5, the package is now viable for teams on the newest Laravel baseline. Prior to this release, adoption on Filament v5 / Laravel 12+ would have been blocked or unsupported.
  • Static Password Approach: Unchanged. While simple, this approach may not fit teams requiring dynamic credentials (e.g., OAuth, SSO) or audit trails. Still ideal for rapid prototyping, internal developer-only routes, and staging gates.

Integration Feasibility

  • Low Coupling: The package remains self-contained and does not modify core Laravel/Filament logic, making it easy to add/remove without side effects. The new test suite covering the gate page, middleware, logout action, and install command further reduces the "unknown behavior" risk at integration time.
  • Version-Aware Installation (New): v5.0.0 introduces an explicit dual-line support model: the v5 line targets Filament v5, and the v4 branch continues the Filament v4 line. Integration feasibility therefore now depends on composer constraint discipline rather than a single floating version. Teams must pin deliberately.
  • Route-Specific Control: Unchanged — supports granular route protection (e.g., /admin/debug, /filament/pages).
  • Filament-Specific: Unchanged — if the project doesn’t use Filament, the package’s value diminishes, though the middleware concept could be adapted for generic Laravel routes.

Technical Risk

  • Dependency Risk (Materially Reduced): Previously flagged as "breaking changes in Filament could impact compatibility." v5.0.0 mitigates this with a maintained v4 branch, giving Filament v4 projects a supported path instead of being forced onto an incompatible major. Residual risk shifts from "package abandonment" to "patch parity between branches."
  • Branch Drift Risk (New): With two maintained lines, a fix landed on v5 may not be back-ported to v4. Security-relevant fixes (password comparison, redirect handling) should be verified on both branches.
  • Redirect Behavior Change (New): v5.0.0 fixes the gate page redirect that was using a wrong config key, and adds a fallback to the configured redirect when there is no previous page after unlocking. This is a bug fix, but it is a behavior change: environments that had accidentally relied on the broken redirect, or that have a stale/incorrect redirect config key in .env, will see different post-unlock navigation. Validate redirect config values before/after upgrade.
  • Static Password Vulnerabilities: Unchanged. Mitigation: use environment variables (e.g., .env) for the password and rotate regularly.
  • Limited Features: Unchanged — no MFA, IP whitelisting, or attempt logging out of the box.
  • Verification Gap: Release notes are self-reported; no dependency/audit metadata was supplied. Confirm composer.json constraints for Laravel 13 (whether GA or pre-release) before committing to it.

Key Questions

  1. Use Case Alignment: Is this for internal developer routes only, or could it replace/augment existing auth (e.g., for staging environments)?
  2. Password Management: How will the password be stored/distributed (e.g., .env, secrets manager)?
  3. Audit Requirements: Are there compliance needs (e.g., logging failed attempts) that this package doesn’t address?
  4. Filament Major (New): Are we on Filament v4 or v5? This now determines which package line (v4 branch vs. v5) we pin, and therefore our upgrade path.
  5. Laravel 13 Status (New): Is Laravel 13 in scope now, or are we standardizing on 12? Confirm the package's tested matrix rather than assuming both are equally validated.
  6. Redirect Configuration (New): What is our intended post-unlock destination, and is the config key correct in our environment? Do we want previous-page behavior or a fixed redirect?
  7. Scalability: Will this be used for high-traffic routes, or strictly for low-volume internal access?

Integration Approach

Stack Fit

  • Laravel 12 / Filament v5 Projects: First-class fit — this is the primary target of v5.0.0.
  • Laravel 12 / Filament v4 Projects: Supported via the v4 branch; requires an explicit non-default composer constraint.
  • Generic Laravel: Can still be adapted for non-Filament projects by manually registering the middleware in app/Http/Kernel.php, but this remains an unsupported path.
  • Tooling Compatibility: Works with Laravel’s existing auth scaffolding; the new test suite (gate page, middleware, logout action, install command) provides a reference implementation for teams extending the middleware.

Migration Path

  1. Confirm Filament Major — determine whether the target app is on Filament v4 or v5. This decision gates every step below.
  2. Installation (Filament v5 / Laravel 12–13):
    composer require tomatophp/filament-developer-gate:^5.0
    
  3. Installation (Filament v4 — retained line):
    composer require tomatophp/filament-developer-gate:"dev-v4"   # or the tagged 4.x release
    
    Pin explicitly and record the constraint in the repo; do not rely on a floating *.
  4. Configuration:
    • Publish the config (if available) or set the password in .env:
      DEVELOPER_GATE_PASSWORD=your_secure_password
      
    • Verify the redirect config key — v5.0.0 corrected the key used by the gate page redirect. Confirm the value in your published config/.env matches the current key name, and decide whether the intended destination is "previous page" or the configured fallback (which now applies when no previous page exists).
    • Register the middleware in app/Providers/FilamentServiceProvider.php (Filament) or app/Http/Kernel.php (generic Laravel):
      protected static string $developerGateMiddleware = \TomatoPHP\DeveloperGate\Middleware\DeveloperGateMiddleware::class;
      
  5. Route Protection:
    Route::middleware(['developer.gate'])->group(function () {
        // Protected routes here
    });
    
  6. Upgrading from a pre-v5 install: treat as a minor-but-attention-worthy upgrade — the API surface appears stable (middleware, route macro, config), but post-unlock navigation behavior changes. Re-run the unlock flow in staging before promoting.

Compatibility

  • Laravel Version: v5.0.0 declares Laravel 12 / 13. Anything below Laravel 12 should remain on the previous package major. Confirm the exact composer.json requirement — Laravel 13 support may be forward-looking.
  • Filament Version: v5 → v5 line; v4 → v4 branch. Mismatching the line to the installed Filament major is the single most likely integration failure now.
  • Custom Middleware: Still extensible by subclassing (e.g., add rate limiting or attempt logging); the new test suite gives a template for validating such extensions.

Sequencing

  1. Phase 0 (New): Inventory current Laravel and Filament majors across target apps; map each to the correct package line.
  2. Phase 1: Pilot on non-critical developer routes (e.g., /filament/pages/debug) on the Filament v5 line, including a deliberate check of the unlock → redirect flow.
  3. Phase 2: Expand to other internal routes if successful; confirm the configured redirect fallback behaves as intended on direct-entry (no previous page) visits.
  4. Phase 3: Customize middleware (e.g., add logging) if needed; mirror the pattern from the packaged test suite.
  5. Phase 4: Document password rotation, access policies, and the branch/pin policy so future upgrades don't silently jump lines.

Operational Impact

Maintenance

  • Low Overhead: Minimal maintenance required post-integration. Updates via Composer.
  • Two-Line Maintenance (New): The project now ships and maintains a v5 line and a v4 branch. Consumers must consciously track the correct line; a routine composer update will not move a Filament v4 app onto v5, which is good, but it also means v4 apps receive fixes only when they land on that branch. Budget a quarterly check for back-ports.
  • Password Rotation: Unchanged — manual (update .env, restart queues/workers if config caching is involved).
  • Dependency Updates: Still monitor Filament/Laravel releases, but the explicit branch separation and new test suite lower the cost of evaluating each major bump.

Support

  • Troubleshooting: Still a low-adoption package (previously ~11 stars, no dependents). However, the new test suite covering the gate page, middleware, logout action, and install command materially improves self-diagnosis — expected behavior is now codified and inspectable rather than inferred from docs.
  • Custom Extensions: Support team may still need to extend middleware for logging/MFA/IP restrictions.
  • Fallback: If the package fails, routes either return a generic 403 (default Laravel behavior) or require manual middleware bypass in app/Http/Kernel.php.

Scaling

  • Performance: Negligible impact — simple middleware check; unchanged by this release.
  • Concurrency: No bottlenecks expected; stateless password comparison.
  • High Traffic: Still not designed for public-facing routes; use Laravel's built-in auth there.

Failure Modes

Failure Scenario Impact Mitigation
Password leakage Unauthorized access Use .env / secrets manager, rotate passwords, restrict IP ranges.
Middleware misconfiguration Routes become inaccessible Test in staging; roll back if needed.
Filament/Laravel version conflict Package breaks Pin the correct line: ^5.0 for Filament v5, v4 branch for Filament v4.
Wrong line installed (new) Install succeeds but gate behaves inconsistently or breaks Encode the Filament major in the composer constraint and in a CI check.
Redirect misconfiguration (new) Post-unlock navigation lands on an unexpected page or loops Validate the corrected redirect config key; test both "has previous page" and "no previous page" paths.
Patch divergence between lines (new) v4 branch misses a v5 fix (or vice versa) Track upstream releases; verify critical fixes land on your line.
No logging/auditing Compliance violations Extend middleware to log attempts; reuse the packaged test patterns.

Ramp-Up

  • Developer Onboarding: Still ~15–30 minutes to install and protect a route, plus a few minutes to select the correct line for the project's Filament major.
  • Team Adoption: Requires communication on password-sharing policy (Slack/Confluence) and, newly, on which package line each project tracks.
  • Documentation: Upstream docs remain the weak point; maintain internal runbooks for:
    • Password rotation procedures.
    • Line selection and composer pinning policy (v5 vs. v4).
    • Redirect configuration and expected post-unlock behavior.
    • Custom extensions (e.g., rate limiting, attempt logging, MFA).
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
roundly-consulting/kubernetes-api-for-laravel
roundly-consulting/plausible-for-laravel
gvp/gvp-laravel-template
metasyncsite/laravel-metasync-client
roundly-consulting/onboarding-for-laravel
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo