Skip to content

Cap Bundle

Cap, the self-hosted proof-of-work CAPTCHA, in your Symfony forms. A form type, a validator constraint and a widget that keeps working across Turbo visits — the KarserRecaptcha3Bundle way, without Google.
Terminal window
composer require silarhi/cap-bundle

One form field

CapType renders the widget and validates the token on submit, with the Cap constraint.

Checkbox or invisible

Cap’s widget, or nothing at all: the challenge is solved while the visitor fills the form.

SPA ready

Turbo Drive, Turbo Frames, the Turbo cache, the back-forward cache and forms you submit with fetch().

Stimulus or not

A controller StimulusBundle registers for you, or a script the form renders, with no build step.

Self-hosted end to end

Your Cap server, and the widget script and its WebAssembly solver from your domain if you like.

Any payload

The #[Cap] constraint and CapVerifierInterface protect JSON endpoints too.