Start a new project with an Event Sourcing Architecture
Tags: eventsourcing, php, eventstorming
Published: 2019-07-17 05:23:25

---
title: Start a new project with an Event Sourcing Architecture
published: true
description: "Getting started with an Event Sourcing project in PHP, using an example event sourcing project. This is a step by step guide to get you up and running with Event Sourcing."
tags: ['event sourcing', 'php', 'event storming']
cover_image: https://keith-mifsud.me/static/598198f25be69fdb4c1e9cd1d495f454/6ceba/start-a-new-event-sourcing-project.png

---

## Event Sourcing example project

The best way I can help you, the Engineer, the Product Owner or as I will be throughout this series of articles, both, is with an example event sourcing project. There are several components required in building an event sourcing project and the best way for you to be able to plan and estimate your project is with understanding the amount of work required to build and adapt these components.

To illustrate what it takes to plan and build an event-sourced application, I chose to use a simple To-Do application... I'm kidding 😂, To-Do applications are all over the web and they are too basic to justify this pattern. Instead, I, together with you, will be building a Classified Listing web-based application. A scaled-down version of GumTree .
With this example project, I will focus on the main business problem, the Listing Domain. Throughout a series of articles, I will show you the process I will follow to plan, design and develop an event-sourced Listing application. I intentionally chose this domain (or problem) because I know it as much as you do, unless, of course, you created GumTree yourself 😂.

In this series of articles, I will explain everything needed to have a Listing Web API, providing Members with the ability, of drafting and publishing a Listing, to advertise an item they wish to sell or purchase. Therefore, I will write about planning, how to solve the problems (or provide the opportunities) for this business, setting up a development environment, developing a Common/Shared Model, developing the first Aggregate, applying and dispatching events using a CQRS approach implementing concrete implementations for the system's requirements, testing, cross-domain consequences, read models and the access through the application.

I should get on with it, right? But where to start? From a business and service offering perspective, I would start with Event Storming. However, implementing the infrastructure and Integrations with external services should also be planned to ensure the feasibility of the project.

We are in luck as our Domain and system do not make use of external services. However, I want to highlight that this is a rare scenario! Depending on the product you are building, you may experience integration issues. Just recently, I was working on a Smart Condominium system whose internal hardware provider did not have a public API. The point is that, yes, most common and general service providers have an API but in the real world, a lot of vendors protect their IP (Intellectual property) by not offering an accessible API.

Whether you're developing an Event Sourcing Domain or an application using any pattern, it pays to determine the integration possibilities upfront.

This example Event Sourcing project does not have any external services' requirements and the Infrastructure requirements will be easy to implement because they are quite common.

[Continue reading...](https://keith-mifsud.me/blog/start-a-new-project-with-an-event-sourcing-architecture)