blaspsoft/blasp
Advanced profanity filtering for Laravel with driver-based detection (regex/pattern/phonetic/pipeline), multi-language support, severity scoring (0–100), masking strategies, validation rules, middleware, Eloquent model integration, events, and test fakes.
regex + phonetic for high accuracy without performance hits.Blasp::in().CheckProfanity middleware).Blasp::mask('grawlix')).Profanity validation rule).Comment::body via Blaspable trait.ProfanityDetected events.regex for obfuscation, phonetic for sound-alikes) or masking (e.g., grawlix for humor).regex driver may be too slow for high-throughput systems (consider a dedicated API like blasp.app).For Executives: *"Blasp is a turnkey profanity filter for Laravel that saves us from building and maintaining a custom solution. It handles obfuscated slurs, multi-language content, and severity-based moderation—all while integrating seamlessly with our stack. For example:
fuck) but masks mild words (e.g., damn) to keep discussions civil.regex (for evasions like f*ck) and phonetic (for sound-alikes like phuck) without sacrificing performance.For Engineering: *"Blasp is a highly extensible profanity filter with:
regex (accurate but slower), pattern (fast exact matches), or phonetic (catches sound-alikes like sheit for shit). Chain them with the pipeline driver.mild/moderate/high/extreme, letting us set thresholds (e.g., reject only high severity).blasp:sanitize,mild).Blaspable trait to auto-sanitize model fields like Comment::body.Profanity::in('spanish')->maxScore(50) in form rules.@clean($comment->body) masks profanity in views.regex driver is CPU-intensive for high-volume traffic (monitor blasp logs).phonetic driver’s max_distance_ratio or adding words to false_positives.
Recommendation: Start with the pipeline driver (default: regex + phonetic) and adjust severity thresholds based on A/B tests. Use the middleware for API endpoints and Blaspable for Eloquent models."*How can I help you explore Laravel packages today?