Skip to content

phparch/the-truth-about-event-sourcing

Repository files navigation

The Truth About Event Sourcing

This is a demo app that shows how to implement Event Sourcing in a simple way.

This is not meant to be a secure application, it's just a demo.

How to setup

We need to migrate the database

composer install
npm install
php artisan migrate:fresh --seed

How to run

We need to run the server and vite server.

php artisan serve
npm run dev

How to use

First we need to login, change the port to match your system.

http://localhost:8000/login/1

After logging in, we are redirected to the verbs version of contact 2.

http://localhost:8000/verbs/contact/2

To see the event sauce version

http://localhost:8000/eventsauce/contact/2

To see the projection version

http://localhost:8000/contact/2

Replaying events

To replay events, we need to run the command

php artisan app:clean-projections
php artisan verbs:replay

Slides

About

Code for a presentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages