rpillz/laravel-visitor
rpillz/laravel-visitor is a Laravel package for lightweight visitor tracking. It records page views, unique visitors, and visit details through middleware, storing data in your database so you can build simple in-app traffic and engagement insights without an external analytics service.
Architecture fit: The package is a middleware-layer bot classification and blocking service for Laravel, with a Filament admin surface for reporting and manual actioning. Release 1.1 moves it from a passive classifier (identify bots) to an active enforcement component (recognize and block probing/scraping behavior automatically). That is an architectural shift worth noting: the package now sits in the request path as a gatekeeper, not just an observer. Any application where request-path latency, false-positive blocking, or edge-proxy conflicts matter should re-evaluate fit on this basis rather than on the 1.0 "analytics" framing.
Integration feasibility: Integration remains conventional Laravel — package install, published config, migration, and a Filament panel resource. The new capability set (automatic behavioral blocking, button-press agent blocking from Filament) does not appear to introduce new external infrastructure dependencies, which keeps the integration surface small. The migration change is the one item requiring deliberate handling: it alters the visit schema to better distinguish bots, blocked, and verified traffic, which implies existing rows have an ambiguous classification state.
Technical risk:
Key questions:
Stack fit: Standard Laravel + Filament fit, no new runtime services assumed. The package now occupies the request middleware path in an enforcing role, so it should be sequenced alongside existing middleware (auth, rate limiting, throttling, trusted proxies) and validated for ordering. Where an application already runs an edge WAF or CDN bot management, confirm the two do not duplicate or contradict — double blocking produces confusing diagnostics, and the package's view of "blocked" will undercount traffic the edge already dropped.
Migration path: Treat this as a two-phase rollout rather than a single deploy.
Backfill any historical rows into the new classification scheme if reporting on pre-upgrade periods is expected to remain comparable — otherwise state explicitly that the reporting baseline resets at the upgrade date.
Compatibility: Confirm PHP and Laravel version support matches the application's current runtime (including the Filament major version — Filament reporting improvements imply a specific Filament major, and a mismatch is a hard blocker). Verify the migration against the target database engine, not just SQLite in CI. Check that the new automatic-blocking behavior is governed by publishable config so it can be disabled per environment without a code change.
Sequencing:
^1.1 until the migration behavior is understood.Maintenance: Two ongoing burdens. First, the allowlist/denylist becomes a living operational artifact — it needs an owner, a review cadence, and a fast path to unblock a legitimate client. Second, detection heuristics drift as scrapers adapt; expect periodic accuracy regressions and re-tuning after package updates. Budget for this as recurring work, not a one-time setup. Filament reporting improvements also mean new UI surface the team should be trained on rather than left to discover.
Support: New class of tickets: "I've been blocked." Support needs a runbook — how to identify the blocking reason from the Filament reporting, how to verify and unblock, and how to escalate a suspected false positive. Without this, every block becomes an engineering escalation. The button-press blocking action is a support-facing privilege and should be permission-gated and logged; an undocumented manual block on a partner integration is a business-impacting mistake that is hard to trace after the fact.
Scaling: The schema change lands on what is plausibly the highest-write-volume table in the app. Confirm index strategy for the new classification columns before enabling richer Filament reporting — improved reporting often means new aggregate queries against the visit table, and unindexed groupings will degrade the admin panel first and the app second. Automatic blocking adds per-request classification work on every inbound request; measure the added latency under peak load. If blocking is enforced in-line (rather than via edge rules), throughput under bot-heavy traffic becomes a capacity question.
Failure modes:
Ramp-up: Modest technical ramp-up (config, Filament panel, one migration) but meaningful operational ramp-up. Estimate roughly: half a day to read the changelog/config and pin the version; one to two days to rehearse the migration and validate reporting; one day to draft the allowlist and support runbook with security/support; then a canary observation window of at least a week before broad enforcement. The gating dependency is not engineering effort — it is agreement on who owns the allowlist and who is authorized to block, which should be settled before Phase 2, not after the first incident.
How can I help you explore Laravel packages today?