https://github.com/phauthentic/event-sourcing-chess-example
https://github.com/phauthentic/event-sourcing-chess-example
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/phauthentic/event-sourcing-chess-example
- Owner: Phauthentic
- License: gpl-3.0
- Created: 2024-03-25T16:35:10.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2026-02-26T01:47:06.000Z (4 months ago)
- Last Synced: 2026-02-26T05:02:56.513Z (4 months ago)
- Language: PHP
- Size: 213 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Event Sourced Chess - Example App
Chess is an interesting domain that is small enough but complex enough to use it as a nice example for the event sourcing library and in an example project to experiment with it.
There is a domain specific language, [algebraic notation](https://en.wikipedia.org/wiki/Algebraic_notation_(chess)) in the context of chess.
To implement event sourcing, this example is using the Phauthentic event sourcing library.
* [Phauthentic Event Sourcing](https://github.com/Phauthentic/event-sourcing)
* [Phauthentic Event Store](https://github.com/Phauthentic/event-store)
* [Phauthentic Snapshot Store](https://github.com/Phauthentic/snapshot-sourcing)
* [Phauthentic Correlation ID Bundle](https://github.com/Phauthentic/correlation-id-symfony-bundle)
* [Phauthentic Error Response](https://github.com/Phauthentic/error-response)
The goals of this repository are:
* Providing an example of the event sourcing library.
* Experimenting with the implementation in a real app.
## Installation
```sh
composer require phauthentic/event-sourcing-chess-example
docker compose up
bin/console serve
```
## Ubiquitous Language
| Term | Description |
|--------------------|--------------------------------------------------|
| Algebraic Notation | Standard system for recording chess moves using coordinates (e.g., e4, Nf3) |
| Check | A threat to capture the opponent's king |
| Checkmate | When a player's king is in check and there is no legal move to escape |
| Castling | Special move involving the king and a rook |
| En Passant | Special pawn capture move |
| Promotion | Advancing a pawn to the eighth rank to become a queen, rook, bishop, or knight |
| Stalemate | A situation where a player has no legal moves and their king is not in check |
| Zugzwang | A position in which any move will weaken a player's position |
## License
GPLv3 - Copyright Florian Krämer