Skip to content

phparch/the-truth-about-event-sourcing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

64a32ef · Oct 24, 2024

History

15 Commits
Oct 24, 2024
Oct 16, 2024
Oct 16, 2024
Oct 24, 2024
Oct 16, 2024
Oct 22, 2024
Oct 22, 2024
Oct 17, 2024
Oct 22, 2024
Oct 16, 2024
Oct 16, 2024
Oct 16, 2024
Oct 16, 2024
Oct 17, 2024
Oct 24, 2024
Oct 16, 2024
Oct 16, 2024
Oct 22, 2024
Oct 17, 2024
Oct 17, 2024
Oct 16, 2024
Oct 17, 2024
Oct 16, 2024
Oct 16, 2024

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