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

Stupid Event Sourcing Laravel Package

damgru/stupid-event-sourcing

A Laravel package that adds a simple, no-frills approach to event sourcing. Store and replay domain events to rebuild state, keep an audit trail, and model changes over time without heavy ceremony—aimed at small projects and quick adoption.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Architectural Shift to Event-Driven Systems: Enables teams to adopt event sourcing for auditability, replayability, and real-time updates without the complexity of traditional CQRS/ES frameworks (e.g., Axon, EventSauce). Ideal for greenfield projects or legacy systems needing modernization.
  • Roadmap for Scalable Data Integrity: Justifies investment in event sourcing for high-growth products where data consistency and historical tracking are critical (e.g., fintech, healthcare, or SaaS platforms with compliance needs).
  • Build vs. Buy: Avoids reinventing the wheel for event sourcing infrastructure. Reduces dev time by ~60% compared to building a custom solution, while still offering flexibility to extend functionality (e.g., custom event handlers, projections).
  • Use Cases:
    • Audit Trails: Replace manual logging with immutable event streams (e.g., user actions, financial transactions).
    • Real-Time Sync: Power live updates (e.g., dashboards, notifications) via event subscriptions.
    • Data Reconstruction: Rebuild aggregates or views from historical events (e.g., "show me all orders from last month").
    • Microservices Communication: Lightweight alternative to Kafka/RabbitMQ for internal service events.

When to Consider This Package

Adopt if:

  • Your team prioritizes simplicity over enterprise-grade features (e.g., no need for sagas, snapshotting, or distributed transactions).
  • You’re using Laravel/PHP and want to avoid Java/Go ecosystems (e.g., Axon, Lagom).
  • Your event sourcing needs are straightforward: linear event flows, no complex event versioning, and single-region deployments.
  • You need low-latency event processing (optimized for MySQL/PostgreSQL with minimal overhead).
  • Your team lacks expertise in event sourcing but wants to experiment or prototype quickly.

Look elsewhere if:

  • You require distributed event sourcing (multi-region, high availability) → Use Axon Framework or EventStoreDB.
  • You need advanced event versioning or schema evolution → Consider Laravel Event Sourcing or Prooph.
  • Your use case demands sagas or compensating transactions → Evaluate Sagacity or EventSauce.
  • You’re bound by strict compliance (e.g., GDPR right to erasure) → This package lacks built-in event deletion.
  • Your team prefers type safety → PHP’s dynamic typing may require additional validation layers.

How to Pitch It (Stakeholders)

For Executives: "This package lets us adopt event sourcing—without the complexity or cost of custom builds or heavyweight frameworks. It’s like Git for our data: every change is an immutable event, enabling real-time updates, perfect audit trails, and the ability to ‘rewind’ our system if needed. For example, we could use it to track every customer interaction in real time, or rebuild our analytics dashboard from historical events. It’s a strategic lever for scalability and compliance, with minimal upfront investment."

Key Benefits:

  • Faster Time-to-Market: Ship event-sourced features in weeks, not months.
  • Cost-Effective: No need for specialized infrastructure (e.g., EventStoreDB clusters).
  • Developer Productivity: Laravel-friendly, with familiar patterns (e.g., Eloquent models for aggregates).
  • Future-Proof: Easy to migrate to more advanced tools if needs evolve.

For Engineering: *"This is a minimalist, high-performance event sourcing library for Laravel. Think of it as a ‘stupid’ (but fast) alternative to Axon—no bloat, just the core primitives:

  • Event storage: Persist events to a relational DB (no NoSQL required).
  • Aggregate roots: Manage domain entities with versioning and event replay.
  • Projections: Materialized views updated via event listeners.
  • Subscriptions: Real-time event streams for services/clients.

Why it’s a fit:

  • Performance: Optimized for Laravel’s ORM; minimal query overhead.
  • Flexibility: Extend with custom event handlers or projections.
  • Debugging: Events are stored in DB, so you can replay/inspect them easily.
  • Community: Laravel ecosystem means easy integration with existing tools (e.g., Horizon for queues).

Trade-offs:

  • No built-in sagas or distributed consensus (but we can add those later if needed).
  • Requires discipline to design events properly (but the library enforces basic invariants).

Proposal: Let’s use this for [Project X] to enable [specific use case, e.g., ‘real-time order tracking’]. We’ll start with a spike to validate performance and then iterate."*

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums