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

Verbs Laravel Package

hirethunk/verbs

Verbs is a PHP event sourcing package for Laravel artisans. It delivers the benefits of event sourcing while minimizing boilerplate and jargon, making it simpler to model behavior and build systems by thinking in actions (verbs) instead of nouns.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Event-Driven Architecture (EDA) Adoption: Enables teams to transition from traditional CRUD-based systems to event-driven workflows, reducing coupling and improving scalability. Ideal for complex domains like SaaS platforms, gaming, or financial systems where state transitions are critical.
  • Roadmap for Auditability & Compliance: Supports regulatory requirements (e.g., GDPR, financial audits) by providing immutable event logs and state reconstruction. Justify investment in "self-healing" systems where historical data integrity is non-negotiable.
  • Build vs. Buy: Buy for teams lacking event-sourcing expertise or time to build from scratch. Build only if needing custom extensions beyond Verbs’ abstractions (e.g., multi-DB support, advanced projections).
  • Use Cases:
    • Stateful Workflows: Order processing, subscription management, or multi-step user journeys (e.g., onboarding flows).
    • Real-Time Systems: Chat apps, collaborative tools, or live dashboards where state changes must propagate instantly.
    • Data Reconciliation: Fixing data inconsistencies by replaying events to correct states (e.g., inventory systems).
    • Microservices: Decoupling services via events while maintaining shared state consistency.

When to Consider This Package

  • Avoid if:
    • Your system is simple CRUD with no need for audit trails or event replay (use Eloquent directly).
    • You require low-latency writes (event sourcing adds overhead for state reconstruction).
    • Your team lacks PHP/Laravel expertise or event-sourcing familiarity (steep learning curve).
    • You need multi-language support (Verbs is PHP-only; consider Axon Framework or EventStoreDB for polyglot persistence).
  • Look Elsewhere if:
    • You need advanced event versioning or conflict resolution (e.g., for distributed teams editing shared state).
    • Your events exceed 10K/day without optimization (Verbs may need tuning for scale).
    • You’re bound by vendor lock-in (Verbs is opinionated; alternatives like Prooph or CQRS libraries offer more flexibility).

How to Pitch It (Stakeholders)

For Executives:

*"Verbs lets us build resilient, auditable systems without the complexity of traditional event sourcing. Think of it as Git for your application state—every change is an event, and we can replay history to fix mistakes or analyze behavior. For example:

  • Reduce bugs: Catch edge cases by validating state transitions (e.g., prevent duplicate subscriptions).
  • Future-proof compliance: Immutable event logs simplify audits for GDPR or financial regulations.
  • Scale confidently: Decouple services via events while keeping data consistent. It’s like upgrading from spreadsheets to a database—more structure, less manual work. The upfront cost is minimal (a few dev days to learn), but the payoff is lower maintenance and higher trust in our systems."

For Engineering:

*"Verbs is a PHP-native event-sourcing library that trades jargon for pragmatism. Here’s why it’s a game-changer:

  • No boilerplate: Attributes like #[StateId] and #[AppliesToState] replace XML configs or annotations.
  • Laravel-native: Integrates with Eloquent, Artisan, and middleware (e.g., auto-inject metadata like user_id or ip_address).
  • Developer experience: Generate events/states with php artisan verbs:event, and handle side effects in handle() methods (like a simplified CQRS).
  • Production-ready: Used by HireThunk (check their case studies for real-world scale). Start small: Use it for a single critical workflow (e.g., payments or user onboarding) to prove the value before expanding. The learning curve is manageable—similar to writing Laravel models, but with superpowers for state management."*

Key Asks:

  • Execs: Budget for a 2-week spike to prototype a high-value use case (e.g., subscription management).
  • Engineering: Allocate 1 dev to learn Verbs and document patterns for the team. Prioritize this if you’re building a stateful SaaS product or need auditability.
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests