An open API service indexing awesome lists of open source software.

https://github.com/edvin/pillar

Elegant Domain-Driven Design & Event Sourcing for Laravel
https://github.com/edvin/pillar

Last synced: 6 months ago
JSON representation

Elegant Domain-Driven Design & Event Sourcing for Laravel

Awesome Lists containing this project

README

          

![Pillar – PHP Event Sourcing](logo.svg)

[![CI](https://github.com/edvin/pillar/actions/workflows/ci.yml/badge.svg)](https://github.com/edvin/pillar/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/edvin/pillar/branch/main/graph/badge.svg)](https://app.codecov.io/gh/edvin/pillar)
[![Latest Version](https://img.shields.io/packagist/v/pillar/pillar.svg)](https://packagist.org/packages/pillar/pillar)
[![Docs](https://img.shields.io/badge/docs-VitePress-informational)](https://edvin.github.io/pillar/)

## Elegant DDD & Event Sourcing for Laravel

Build rich domain models and event‑sourced systems — without friction.

[![Read the Docs](https://img.shields.io/badge/Read%20the%20Docs-https%3A%2F%2Fdocs.pillarphp.dev-2563eb?style=for-the-badge)](https://docs.pillarphp.dev)

## Install

```bash
composer require pillar/pillar
php artisan pillar:install
```

## Highlights

- 🧠 **Aggregate sessions (Unit of Work)** — `find()`, mutate, `commit()`
- 🗃️ **Pluggable event store** with **generator‑based** streams & optimistic locking
- 🧵 **Fetch strategies** (load‑all / chunked / streaming)
- 🧬 **Versioned events** & **upcasters**
- 💾 **Snapshotting** policies (Always / Cadence / On‑Demand)
- 🧩 **Object serialization** — JSON by default, MessagePack built-in, or custom serializer
- 🔒 **Payload encryption** — pluggable cipher, per‑event overrides
- 🖥️ **Event stream browser Web UI** — browse streams and timelines and inspect payloads
- ⏱️ **Point‑in‑time reads** — load up to aggregate/global sequence or date via `EventWindow`
- 🎭 **Aliases** for readable event names
- 🔁 **Safe replays** to rebuild projections
- ⚡ **CQRS** — projectors and query bus for a fast, scalable read side
- 🧰 **Facade + buses** for quick wiring
- 🛠️ **Pillar Make**: Bounded Context/Command/Query/Event Scaffolding
- 🧪 **First‑class testing** — Given/When/Then helpers for aggregates & commands, full isolation, exception capture, state inspection
- 🧵 **Command & Aggregate Scenarios** — end‑to‑end command testing using the real bus & event store, or fast in‑memory aggregate testing
- 🧰 **Laravel Tinker integration** — automatic aliases for commands, queries & IDs, plus rich aggregate debugging

## Documentation

Full docs at **https://docs.pillarphp.dev**
— Getting started, concepts, tutorial, configuration & CLI reference.

## License

MIT © Edvin Syse