How to follow along

There's a whole project to learn from (or build if you are so inclined).

The general format of the rest of this book will be in the style of a guided tour, meaning that I will write sequentially (post-fact) about the key parts involved in landing a solution I feel encompasses what this book is trying to tell.

This example focuses on overall system design and the goal of setting up an event-driven architecture that fits our scenario.

In the interest of time and energy, certain features of a full solution are therefore excluded from the scope of this exercise. Also, we should spend less time on details like worrying for conflicting names of rooms, as that is not what we are focusing our cognitive effort on.

You can...

  • Go on a guided tour: Grab a coffee, just read and follow along with links and references to the work.


  • Do this as a full-on exercise: Clone the repo, run npm install and npm start in the respective project folders, then read about the patterns and try it out in your own self-paced way.


The root of the GitHub code repository will contain the following pertinent bits:

  • code: Source code for the reference solution, divided into domains and then bounded context

  • data-modeling: JSON files that show us a rough final state of data that is used between contexts/solutions

  • diagrams: Diagrams for the solutions

Data modeling

The data-modeling folder contains various forms of data that roughly represent their final shapes.

I've found it a powerful tactic to do this type of hands-on payload modeling work already at the outset of a project, as it's lightweight, fairly easy for non-technical people to understand, and can be a collaborative exercise. You can also actually use the JSON objects when you are writing your actual implementation later!


The below commands are those I believe you will want to use. See package.json for more commands!

  • npm start: Runs Serverless Framework in offline mode

  • npm test: Tests code

  • npm run docs: Generates documentation

  • npm run deploy: Deploys code with Serverless Framework

  • npm run teardown: Package and build the code with Serverless Framework

Also note that the code's "mono repo" structure is more for convenience than a true "decision" as such.


These only apply if you want to deploy code.

  • You have a recent Node version, ideally version 18 or later

  • You have an AWS account

  • You have sufficient AWS credentials to deploy the required infrastructure (including API Gateway, Lambda, S3 and more)

  • You are logged into AWS in your environment

  • You follow any additional instructions per each each Bounded Context's (microservice's)

Last updated