Welcome to the documentation for Streak, a PHP framework designed for building applications using the Event Sourcing pattern.
Streak aims to provide a flexible and robust foundation for event-sourced applications by focusing on:
- Domain-Driven Design (DDD): Encouraging the use of core DDD concepts like Aggregates, Entities, Value Objects, and Domain Events.
- Simplicity: Offering clear interfaces and components that are easy to understand and use.
- Extensibility: Allowing developers to swap out implementations (e.g., Event Store persistence) to fit their specific needs.
- Testability: Making it easy to unit test domain logic and application services.
Streak is built around several key concepts central to Event Sourcing and DDD:
- Architecture: The foundational patterns and building blocks that form the system.
- Commands: Represent an intention to change the state of the system.
- Events: Represent facts about things that have happened in the past.
- Event Store: Responsible for persisting and retrieving streams of events.
- Event Bus: Allows decoupled components to react to published events.
- Listeners: Components that react to events and trigger side effects.
- Subscriptions: Persistent, reliable mechanism for delivering events to listeners, with support for tracking, restarting, and pausing event processing.
- Explore Core Concepts: Understand the fundamental building blocks of Streak.
- Symfony Integration (Optional): If you are using Symfony, learn how the
StreakBundlesimplifies integration. - Tutorials: Follow step-by-step guides to build key components of an event-sourced application.
- Building an Aggregate - Create the core domain model with commands and events
- Building a Saga - Handle cross-aggregate coordination with external systems
- Building a Process Manager - Manage complex workflows with state
- Building a Projection - Create read models optimized for querying
Installation typically involves using Composer.
composer require streak/streakFor integration with Symfony, you will also need the bundle:
composer require streak/streak-bundleRefer to the specific StreakBundle Installation guide for more details.
After completing the basic tutorials, you might want to explore:
- Event Sourced Subscriptions - Subscription State Persistence
- Custom Event Store Implementations - Adapting to different storage backends
- Projection Performance Optimization - For high-volume event streams
Contributions to Streak are welcome! Please follow the Documentation Style Guide when adding or updating documentation.