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

Iconcaptcha Laravel Package

fabianwennink/iconcaptcha

IconCaptcha is a lightweight, self-hosted PHP captcha that replaces reCAPTCHA with a privacy-friendly icon-based challenge. No external services, no tracking, fully customizable, and easy to integrate—ideal for GDPR-conscious sites.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

IconCaptcha-PHP is a framework-agnostic PHP library, not a Laravel package. There is no service provider, facade, config file, publishable migration, or Blade directive — so integration is a wrapping exercise we own, not a composer require and go. The product is also two artifacts: this server-side PHP component (challenge generation, session-backed validation) and a separate IconCaptcha-JS client widget. Both must be versioned and kept in lockstep, and neither ships a Laravel-native contract.

Conceptually it fits cleanly as a validation layer alongside any existing captcha abstraction: one route to mint a challenge, one to validate a response, plus a custom validation rule. The genuine architectural friction is session coupling — challenge state lives in session, and Laravel owns and abstracts the session. If the library only supports native $_SESSION, it conflicts with Laravel's StartSession middleware and becomes a real blocker rather than a wiring task. Confirm early whether it exposes a storage/session interface we can implement against Illuminate\Session\Store.

The 184 stars / 0 Packagist dependents / 2.75 score reads as ecosystem immaturity, not code quality. Treat it as a small, credible, single-maintainer library — attractive for privacy-sensitive, self-hosted, no-third-party-call requirements — and price in the ownership accordingly.

Integration feasibility

A first working cut is realistically 1–2 engineer-weeks: composer install, a service provider, config, two routes (challenge + validate), a Blade/Vite-wrapped widget component, and a ValidatesIconCaptcha rule. The AJAX endpoints will need CSRF handling (token pass-through or exclusion) and the assets need a Vite pipeline entry.

Technical risk, ranked

  1. Session bridge incompatibility (highest). Two mitigations exist — implement the library's storage contract over Laravel's session repository, or run the captcha endpoints on a separate token-keyed path with our own server-side store. Both are custom code we permanently own.
  2. Bus factor. Single maintainer, no dependents, community-only support. MIT makes fork-and-maintain a viable, contained exit.
  3. PHP/JS version drift between the two halves producing silent validation failures.
  4. Accessibility. Icon-matching is inherently visual; screen-reader users need an alternative path that is likely not built in. Verify before committing to auth flows.
  5. Adversarial durability. A small icon-grid challenge space with no risk scoring or telemetry weakens over time versus Turnstile/reCAPTCHA v3. Acceptable as a layer, weak as a sole defense.

Key questions to answer in the spike

  • Does the PHP library expose a session/storage abstraction we can implement, or does it hard-bind to $_SESSION?
  • What is the exact validation contract we can call from a Laravel validator (return type, failure semantics, TTL/replay model)?
  • How does the JS widget authenticate its challenge request — cookie only, or a minted token?
  • Is there any accessibility fallback in the box? Any attribution requirement in the MIT/UI terms?
  • Does a community Laravel wrapper already exist (0 dependents suggests no)?

Integration Approach

Stack fit

PHP 8.x on Laravel 10–12; no database requirement, no schema changes. Front-end agnostic — the widget drops into Blade + Vite, Livewire, or an Inertia/Vue/React surface with equal effort. The standout fit is no outbound network calls: it works air-gapped, on-prem, and in GDPR/DPA-sensitive flows where shipping user data to Google is a non-starter.

Migration path

Do not rip out the incumbent captcha. Introduce IconCaptcha behind a per-form config flag and run it in parallel.

  • Phase 1 — Spike (1 week). Prove the session bridge and a full challenge→render→validate round trip on a throwaway route. This is the go/no-go gate; everything downstream is routine Laravel work.
  • Phase 2 — Internal package (1 week). Encapsulate as app/Captcha/IconCaptcha or a private Composer package exposing a stable Laravel API: service provider, config, routes, validation rule, Blade component, Vite assets. Other teams should never touch the vendor library directly.
  • Phase 3 — Pilot (1–2 weeks). One low-risk form (contact, newsletter). Instrument solve rate, abandonment, and error rate against baseline.
  • Phase 4 — Auth surfaces. Register and password-reset only after the pilot and after an accessibility fallback exists.

Compatibility notes

  • Session driver: file, redis, database are all fine once bridged. The cookie driver is a problem — payload size and server-side mutation semantics.
  • Behind a load balancer the challenge round-trip requires a shared session store (Redis) or sticky sessions. Plan this before pilot, not after.
  • CSP is actually easier than third-party captchas: you control the origin for script-src/style-src/img-src.

Sequencing rationale

Solve the session bridge first in isolation. If it fails, the whole evaluation collapses to a cheap "no" and you've spent a week, not a quarter. Everything after that gate is standard Laravel plumbing with predictable effort.

Operational Impact

Maintenance

We own the wrapper and, effectively, the upgrade path. Budget 1–2 engineer-days per quarter for dependency bumps, plus incident time. Pin exact versions of both the PHP and JS artifacts and bump them together. The codebase is small enough that a fork is a realistic contingency if upstream goes quiet — MIT makes that clean.

Support

No vendor, no SLA; GitHub issues only. That means an internal runbook is mandatory: how to disable the captcha, how to flip back to the incumbent provider, and who owns the session-bridge code. Captcha failures surface to users as "I can't log in" — treat this as a highest-severity, user-facing failure class in on-call routing.

Scaling

Compute cost is negligible — icon selection, no proof-of-work, no ML scoring. State lives in session, so scaling is entirely a function of your existing shared session store; no new datastore. The challenge endpoint is hit roughly once per form impression, so capacity tracks form traffic, and the static assets are edge-cacheable.

Failure modes

  • Session mismatch / expiry → users trapped in a retry loop. Mitigate with generous TTL and an explicit "try again" UX rather than a silent failure.
  • Endpoint 5xx or JS blocked (ad blockers, privacy extensions, strict CSP) → the form becomes unusable. Decide the policy deliberately: fail-open (skip captcha, rely on rate limiting as backstop) for low-risk forms, fail-closed only where abuse cost is high. Default to fail-open; a broken login page costs more than a bot.
  • Upstream abandonment → fork and maintain; contained by small surface area and MIT.
  • Challenge decay → bot solve rates creep up over time. Review solve-rate and abuse metrics quarterly and be prepared to layer it with rate limiting or a second signal.

Ramp-up

Engineers reach productivity in ~2–3 days once the session bridge exists; the surface is small. The risk is concentrated knowledge — one engineer will understand the bridge, and that is the piece most likely to break on a Laravel upgrade. Document it explicitly and add a test that exercises the full round trip. Product/design needs two decisions up front: the accessibility fallback and whether the icon set is customized for brand. Total team ramp is low; ongoing ownership cost is the real line item.

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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast