0:00 All right, so in this lecture, I wanna get started with creating our next 0:03 entity 0:04 for the application, which is gonna be the customer entity, which 0:08 is, in our case, how we're going to create new users inside 0:11 of our 0:11 application so that we can associate them with products later 0:15 on and payments when they eventually make payments. 0:19 And additionally, I'm gonna show you how to integrate a 0:21 notification 0:22 provider to these customers, which in this case, we're gonna use 0:26 Twilio for SMS messaging to our customers. 0:29 However, we're gonna build this in a clean 0:31 architecture way so 0:33 that just like we did with our repositories, 0:35 we're gonna have our external 0:36 dependencies that are volatile, like in this case, the notification 0:40 provider, be encapsulated behind our port 0:43 and adapter's 0:44 implementation so that we'll easily be able to swap it out 0:47 for any 0:48 sort of notification provider at any time, again, showing how great our 0:52 clean architecture is. 0:54 And finally, I'm gonna show you how we can use a new 0:57 CQRS event type called events, where we can dispatch 1:01 events in our system and listen for those events which 1:04 are a bit different than 1:05 our existing commands or queries. 1:07 So to get started, let's go ahead and in our source directory, 1:11 we'll create a 1:11 new directory for our customers, which will be a new 1:15 entity, 1:16 and follow our same existing file structure. 1:21 So for this, we'll start off with our domain model, 1:23 the most important part of our 1:24 application, where the logic lives and data lives for the core 1:28 of the domain model that we know we build everything else 1:31 around. 1:32 So we wanna start here, create our domain directory, 1:36 and inside I'll create a new 1:39 entities folder. 1:42 And let's go ahead and create our first customer 1:46 entity.ts. 1:49 And let's go ahead and set this up just like we did before.
The rest of the transcript is for members.
Sign in