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

Privacy Filter Laravel Package

directorytree/privacy-filter

Laravel wrapper around the privacy-filter.cpp binary that installs the compiled executable and GGUF model, then detects private entities in text through a small PHP API.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy vs. self-host for PII detection. This package is the cheapest credible "self-host" option on the table: an MIT-licensed Laravel wrapper that installs a precompiled binary plus a GGUF model and exposes one PHP method. It turns a "do we build an ML pipeline?" conversation into a "do we spend a day proving out a dependency?" conversation.
  • Data residency and egress posture. Classification runs in-process against a local binary and a locally stored model. No text leaves your VPC, no third-party DPA, no subprocessor added to the privacy policy. For teams whose legal review blocks sending customer content to AWS Comprehend, Google DLP, or a vendor API, this is the decision-changing property — not accuracy.
  • Roadmap sequencing for redaction. The realistic first release is not customer-facing redaction; it is scrubbing log payloads, error-tracker context, support-ticket bodies, call transcripts, and AI prompt/completion stores. That work has no latency budget, no UX surface, and no un-redaction requirement, so it can ship behind a flag with a measured false-positive rate. Customer-facing redaction is a later, separate bet.
  • Precision/recall as a product knob, not an engineering detail. The API returns a per-entity confidence score and accepts a runtime threshold (default 0.5). That means a PM can make an explicit call — "for transcripts shown to agents, bias to over-redaction; for analytics export, bias to under-redaction" — and it is one config value, not a model retrain. Get that policy written down before engineering starts tuning.
  • Unit economics of compliance. Per-request DLP APIs are a variable cost that scales with traffic and shows up in gross margin. This is a fixed infrastructure cost instead: roughly model-size RAM per concurrent worker (~3 GB for the default f16 build, per the README). That flips the cost question from "cost per document" to "do we have a box with enough RAM" — usually a much easier approval.
  • Make-vs-buy reversibility. Because the surface is one method returning a small value object, wrapping it behind an app-owned Redactor interface keeps the option to swap in Presidio or a hosted DLP later as a one-class rewrite. That makes this a genuinely low-regret bet rather than a lock-in.

When to Consider This Package

Adopt when most of these are true:

  • You are on Laravel/PHP and already run a queue with bounded workers (Horizon/Redis). The package's own guidance is explicit that classification should not run on the web request path.
  • The workload is asynchronous and batchy — nightly log scrubbing, transcript processing, backfills, export pipelines. Default process timeout is 60s and each concurrent classification loads its own copy of the model.
  • You can provision memory. The default model is multi-gigabyte on disk and roughly 3 GB resident per worker. Two workers plus PHP, Redis, and your database is a real capacity plan, not a footnote.
  • Data cannot leave your infrastructure, or the per-request cost of a hosted DLP is material at your volume.
  • You accept the support profile. Zero dependents, a single-maintainer release history (v1.0.0 → v1.1.0), and a versioned binary/model download from GitHub releases and Hugging Face as a deploy step. You need a deploy story that pins PRIVACY_FILTER_BINARY_VERSION, vendors or mirrors the artifacts, and does not depend on GitHub or Hugging Face being reachable during a release.

Look elsewhere when:

  • You need inline redaction on a request path with a tight latency budget. Sub-100 ms per document is not what a native process loading a GGUF model delivers.
  • You need a contractual SLA, security review, or indemnity. There is no vendor here — just a repo and a model license to check separately from the package license.
  • Entity coverage or language support is a hard requirement. The EntityType enum is a fixed vocabulary and unknown types return null. Validate against your actual data before committing; the model is English-centric by provenance.
  • You have no queue infrastructure or no ability to run dedicated workers. Memory will become an incident.
  • Your stack is not Laravel/PHP. The wrapper is the whole value here; the underlying binary is callable from anywhere but you would be writing the integration yourself.

How to Pitch It (Stakeholders)

For executives: This is a free, self-hosted PII detector that keeps customer text inside our infrastructure. It installs in about ten minutes and replaces a per-request API bill with a fixed amount of server memory. The trade is that it is an early-stage open-source package from a single maintainer, so we should time-box a two-week spike against our own data — measure the catch rate and the false-positive rate on real transcripts and logs — before it touches anything customer-facing. Worst case we spend two weeks and learn what our PII actually looks like.

For engineering: Treat the install as a deploy concern, not a local convenience. privacy-filter:install pulls an OS-matched binary and a multi-gigabyte GGUF model into storage/app/privacy-filter/; pin the release version, mirror the artifacts, and skip the installer on every boot. Put classification on a dedicated queue with a hard worker count sized to available RAM. Wrap the facade behind an app-owned Redactor interface on day one, redact by byte offset in reverse order rather than the README's str_replace demo, and use PrivacyFilter::fake() from the first test. First deliverable is a log-scrubbing service — no latency budget, highest regulatory exposure removed per engineering hour.

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
adachsoft/php-code-style