Weave Code
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

Blasp Laravel Package

blaspsoft/blasp

Advanced profanity filtering for Laravel with driver-based detection (regex/pattern/phonetic/pipeline), multi-language support, severity scoring, masking strategies, Eloquent trait, middleware and validation rules, events, and test fakes. Powers blasp.app API.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Compliance & Safety: Enables enforcement of community guidelines, legal requirements (e.g., GDPR, COPPA), or platform policies (e.g., "no hate speech") across user-generated content (UGC) like comments, posts, or reviews.
  • Multi-Language Scalability: Justifies expansion into Spanish, German, or French markets without building custom filters, reducing localization costs.
  • Severity-Based Moderation: Supports tiered moderation (e.g., auto-mask mild words, flag high-severity terms for review) to balance automation and human oversight.
  • Build vs. Buy: Avoids reinventing profanity detection (regex, phonetic, obfuscation handling) while offering more flexibility than off-the-shelf solutions like Akismet or PersistentData.
  • Developer Experience (DX): Reduces boilerplate for common use cases (Eloquent, middleware, validation) via traits, macros, and fluent APIs.
  • Data-Driven Moderation: Enables tracking profanity scores/severity to inform policy adjustments (e.g., "80% of high-severity terms come from X user group").
  • Testing & Debugging: Provides utilities (Blasp::fake(), events) to simulate and audit profanity detection in CI/CD pipelines.

When to Consider This Package

  • Avoid if:
    • Your app only needs basic keyword blocking (use Laravel’s Str::contains() + a static list).
    • You require real-time profanity detection (this is PHP-based; consider a microservice or API like Profanity Filter API).
    • Your use case involves images/videos (this is text-only).
    • You need custom ML models (e.g., fine-tuned BERT for context-aware filtering).
    • Your team lacks PHP/Laravel expertise (steep learning curve for advanced features like custom drivers).
  • Look elsewhere if:
    • You need multi-tenancy (e.g., per-tenant word lists); this package uses global config.
    • You require high-performance batch processing (e.g., filtering millions of records); consider a queue worker with bulk optimizations.
    • Your profanity rules are highly dynamic (e.g., crowd-sourced blacklists); this package favors static config.

How to Pitch It (Stakeholders)

For Executives:

"Blasp is a turnkey solution to automate profanity filtering across our Laravel apps, reducing manual moderation costs by 60%+ while improving compliance. It handles edge cases like obfuscated slurs (e.g., ‘fck’) and multi-language content without custom dev work. For $0 in licensing (MIT), we get:

  • Scalability: Supports English, Spanish, German, and French out of the box—critical for our [target markets].
  • Risk Mitigation: Severity scoring lets us auto-mask mild terms while flagging severe cases for review, aligning with our [community guidelines].
  • Developer Efficiency: Integrates seamlessly with Eloquent, validation, and middleware, cutting implementation time from weeks to days.
  • Data Insights: Tracks profanity trends (e.g., ‘high-severity terms spiked 30% in Q2’) to refine policies."*

Ask: "Should we prioritize this for [high-risk features, e.g., public forums, live chat]?"


For Engineering:

*"Blasp replaces ad-hoc regex filters with a maintainable, extensible system:

  • Driver Architecture: Swap between regex (catches obfuscation), phonetic (sounds-alike), or pipeline (combo) without rewriting logic.
  • Eloquent Integration: Add use Blaspable; to any model to auto-sanitize/reject profanity on save—no manual validation needed.
  • Performance: Caches results by default (TTL configurable) and supports batch checking.
  • Testing: Blasp::fake() lets us mock profanity detection in unit tests.
  • Customization: Need to block ‘company-specific slang’? Extend with a custom driver in <30 lines.

Trade-offs:

  • Complexity: Steeper learning curve than a simple keyword list, but pays off for non-trivial use cases.
  • PHP-Only: Not suitable for non-Laravel services (e.g., React Native apps).

Recommendation: Pilot in [high-impact module, e.g., comments system] to validate ROI before rolling out globally."*


Key Metric to Track: "% of profanity incidents auto-resolved vs. escalated to moderators."

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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope