maba/gentle-force
maba/gentle-force is a Laravel package for defending authentication against brute-force attacks. It gradually throttles repeated failed login attempts with configurable delays, helping slow attackers while keeping legitimate users unaffected. Simple middleware integration and cache-backed attempt tr...
Architecture fit. maba/gentle-force slots into the Laravel HTTP kernel as middleware, with service-provider registration and publishable config. It targets the classic Laravel request lifecycle (global/route middleware, cache-backed counters, exception handling on failed responses), which is a proven pattern for brute-force and error-throttling. It is adjacent to — not built on — Laravel's native RateLimiter/throttle middleware, so it occupies a niche rather than composing cleanly with the framework's first-party primitives.
Integration feasibility. Mechanically straightforward: composer require, register middleware, publish config, choose a cache store. The real feasibility question is version support. The last release is August 2021 (Laravel 8 era, PHP 7.x/8.0-era constraints). Whether it runs unmodified on Laravel 9/10/11 and PHP 8.2+ is unverified and should be treated as a spike, not an assumption. Dependents = 0 and 43 stars mean essentially no external production validation.
Technical risk. High relative to the value delivered:
RateLimiter + throttle middleware now covers most of this, so the package adds a second limiting mechanism that can conflict or double-count.Key questions. Which Laravel/PHP versions are actually supported and tested? Does it coexist with native throttle without double-counting? What are the cache-key and TTL semantics across multiple app nodes? Fail-open vs. fail-closed when the cache is unavailable? Are 429 responses and Retry-After headers standard-compliant? Is there a test suite and CI, or only README-level guidance?
Stack fit. Best fit is a Laravel 7/8-era monolith or small service where teams want config-driven brute-force protection without writing custom middleware. Poor fit for Laravel 10/11 greenfield where native RateLimiter is the idiomatic choice, and poor fit for polyglot or non-Laravel services.
Migration path. There is no clean upgrade path from this package to native Laravel limiting because the abstractions differ (attempt tracking and error/response inspection vs. request-key token buckets). Plan it as a thin wrapper or fork: expose one internal RateLimitService interface, back it with gentle-force initially, and be able to swap to native RateLimiter or a custom implementation without touching call sites. If already on native limiting, do not adopt this package to "add" brute force — extend the native limiter instead.
Compatibility. Gate on a compatibility spike: install against the exact target Laravel/PHP matrix, run auth/login routes through middleware, and verify behavior with Redis and with the database cache driver. Check composer.json constraints and CI status; if the package is not installable on the target framework, budget for a fork.
Sequencing.
Maintenance. This is the dominant concern. With no release since 2021 and zero dependents, expect to own the code. Pin the version, vendor/fork if adopted, and treat upgrades as a deliberate engineering task rather than a composer bump. Budget ongoing effort for security review, especially around cache failures and lockout bypass.
Support. Community support is minimal — GitHub issues only, low visibility. Internal documentation and runbooks are mandatory; do not assume upstream fixes.
Scaling. Counter state lives in the cache, so multi-node deployments require a shared, high-throughput store (Redis) with atomic increments. Database-backed counters will become a write hotspot and skew thresholds under load. Lockout state is only as consistent as the cache; regional deployments need a shared region or accept per-region limits. Native Laravel limiter has the same shape, so this is not unique to the package but must be designed for.
Failure modes.
throttle produces confusing, compounding limits.Ramp-up. Low for Laravel developers familiar with middleware and cache: config is declarative and the mental model (attempts + time window + block) is simple. Higher for operators who must understand cache topology, fail-open/closed semantics, and threshold tuning. Expect ~1–2 days for a developer to integrate and ~1 sprint to establish monitoring, alerting on block rates, and an incident playbook before production enforcement.
How can I help you explore Laravel packages today?