kirschbaum-development/redactor-onnx
A Laravel package for redacting sensitive text using ONNX models, bringing local, privacy-friendly redaction to PHP apps so you can detect and mask data before storage or display.
onnx driver runs a token-classification model inside the PHP process via TransformersPHP, so we can offer "prose is classified and redacted before it leaves the app" without standing up or operating a Python inference sidecar. That removes an entire service from the architecture review, the on-call rotation, and the security questionnaire.BatchRecognizer, every prose value in a payload is classified in a single model call rather than one call per field. That is a direct input to pricing tiers, rate limits, and latency SLOs — we can model cost per request instead of per entity.redactor:onnx:warm means we can treat model download/load as part of the release pipeline rather than absorbing a cold-start penalty on the first production request.Adopt when most of the following hold:
Look elsewhere when:
For executives: this closes the gap that has been blocking our redaction-dependent roadmap — we can now mask prose PII inside the application with no new service to run, no third-party processor to onboard, and no customer data crossing our boundary. Commercially it converts a per-record vendor fee into infrastructure we already pay for, and it makes self-hosted/regulated deals sellable. The costs are real but bounded: model artifacts enter our release pipeline, inference memory becomes a capacity-planning input, and accuracy becomes our number to defend rather than a vendor's.
For engineering: it is a drop-in. The driver implements the existing BatchRecognizer contract, so it slots into the current redactor pipeline without touching call sites; the whole payload is classified in one model call, long texts are windowed at whitespace boundaries, and model labels are mapped to the profile names we already use. Add redactor:onnx:warm to the deploy pipeline to pay the download/load cost before traffic arrives. Two things to plan for: a golden corpus with expected entities so we can gate releases on precision/recall rather than vibes, and a load test under realistic PHP-FPM concurrency to establish the memory ceiling and the latency profile per payload size. Treat the pinned model version as a dependency we upgrade deliberately, not incidentally.
How can I help you explore Laravel packages today?