What is this?
This is a side project to learn about several technologies and paradigms I'm corious about, specially event sourcing
I started with EventSauce as a foundation. Rather than simply using it, I integrated it into my application to gain a deeper understanding of how it works
Maintaining a clean architecture structure I've followed SOLID and used DDD concepts. It seemed very natural because Event Sauce already uses the concept of aggregate root as central part of the flow for the events.
This project is a work in progress, and some aspects are still being refined. Currently, there is an aggregate root recording domain events, an EventSourceAggregateRoot interface, and an EventSourceAggregateRootBehaviour trait that provide the necessary functionality for the event source events.
To avoid confusion, I'm using the term StateChangeEvent to refer to event sourcing events, and
WrappedStateChangeEvent when these events are packaged with metadata for storage or dispatch.

OK! But what is this supposed to do?
It's a simple expense manager designed for shared living situations. Imagine you're living in a flat with several roommates, and everyone is paying for different services. This tool allows you to create an account and keep track of expenses to see if someone is contributing more or less compared to others
For me, the best way to learn is by doing. The specific functionality of the project isn't important;
it's more about experimenting with things I wouldn't typically encounter in a real job. I focus on
keeping things simple while exploring new approaches, here I can play a little like I did with the CI/CD
system I'm using.

It is possible to use a CI/CD system without infrastructure?
I was working at a company that used CircleCI, Terraform, and AWS (ECS and ECR) for deploying services. It worked like a charm, but it was relatively new to me, and I had never set up something like that on my own so I decided to give it a try.
The first requirement was not to use any external tools, container registries, or orchestrators. To run
the project on my machine, Docker Compose works well, and my small OVH VPS should be sufficient for
hosting.
While discussing a project my girlfriend was working on using GitLab CI, I realized that GitLab CI can
be installed locally, so I decided to give it a try. Setting it up wasn't easy at first, but it was a
fun learning experience. Once I configured the runner to use Docker-in-Docker, I was able to start
building Docker images and loading them onto the remote server via SSH.
Only a few changes were needed on the server side, and now the production infrastructure (Nginx and
MySQL) is running smoothly. The part that still needs to be deployed is the PHP-FPM service where
Symfony runs.
To deploy the application, I use the following command:
docker save $IMAGE_NAME:$CI_COMMIT_SHA | bzip2 | ssh -o StrictHostKeyChecking=no -i $SSH_PRIVATE_KEY [MASKED]]@[MASKED] docker load
It's not perfect—when the image is loaded, the pipeline kills the old container, delete it, and start the new one.
This results in minimal downtime, but there is still a brief interruption.
