CursosPago

Build a Microservices app with .Net and NextJS from scratch

31:42:57 Inglés Premium 08/05/2024 240 videos

Descripción del curso

Microservices is the latest 'buzzword' and hot topic in the web development industry at the moment and nowadays having microservices as part of your skillset is becoming more and more essential. This course aims to teach you how to build a microservices based app using .Net for the backend services and Next.js for the client app.  We start from nothing and build up the app until we have a completed app that we can publish to a Kubernetes cluster on the internet.
Here are some of the things that are covered in this course:
  • Creating several backend services using .Net that provide functionality for the app
  • Service to service communication using RabbitMQ and gRPC
  • Using IdentityServer as the identity provider.
  • Creating a gateway using Microsoft YARP
  • Building a client side app with Next.js using the new App Router functionality (since Next.js 13.4)
  • Using SignalR for push notifications to the client app
  • Dockerizing our different services
  • CI/CD workflows using GitHub actions
  • Adding ingress controllers
  • Publishing the app locally using docker compose
The goals of the main part of this course is to build this app and be able to run and publish everything locally without having to sign up or pay for any cloud services.  Once you have completed the main part of the course there are 3 optional Appendixes that cover:
  • Unit and integration testing
  • Publishing locally to Kubernetes
  • Publishing the app to a Kubernetes cluster on the internet
Tools you need for this course In this course all the lessons are demonstrated using Visual Studio Code, a free (and fantastic) cross platform code editor.  You can of course use any code editor you like and any Operating system you like... as long as it's Windows, Linux or Mac. Please ensure that your computer can run Docker as this is a requirement for this course (please see the pre-requisite lesson available as a preview to confirm this).  Is this course for you? This course is very practical, about 90%+ of the lessons will involve you coding along with me on this project. If you are the type of person who gets the most out of learning by doing, then this course is definitely for you.   On this course we will build an example Auction Application with several services that we will use to provide its functionality.  For the client side of things we are using Next.js to take advantage of its client side and server side capabilities which is an excellent fit for what we are building. All you will need to get started is a computer with your favourite operating system that is capable of running Docker, and a passion for learning how to build a microservies based application using .Net and Next.js.   

Curriculum

Section 1: Module 1

  • 02 - Introduction 04:57
  • 03 - Course pre-requisites 03:50
  • 04 - Setting up the developer environment 05:42
  • 05 - Course assets and source code 04:49
  • 06 - VS Code troubleshooting and tips 05:30
  • 07 - Microservices - the big picture 06:58
  • 08 - Introduction to section 2 05:27
  • 09 - Creating the first micro service 11:23
  • 10 - Reviewing and simplifying the project 12:25
  • 11 - Adding the entity classes 10:05
  • 12 - Adding the Database context class 13:40
  • 13 - Adding a Postgres database server 10:11
  • 14 - Creating seed data 08:28
  • 15 - Shaping the data to return 09:49
  • 16 - Adding an API controller 11:48
  • 17 - Adding a postman collection 08:17
  • 18 - Adding the create auction endpoint 08:45
  • 19 - Adding the update auction endpoint 06:57
  • 20 - Adding the delete auction endpoint 04:54
  • 21 - Saving changes into source control 06:45
  • 22 - Summary 01:50
  • 23 - Introduction to Section 3 06:06
  • 24 - Creating the second micro services 09:02
  • 25 - Adding the MongoDb server 08:38
  • 26 - Adding the Item model 07:57
  • 27 - Adding seed data 08:14
  • 28 - Adding a search controller 09:44
  • 29 - Paginating the results 05:10
  • 30 - Adding filtering and ordering 11:43
  • 31 - Synchronous messaging 08:09
  • 32 - Adding Http communication to get the data 16:24
  • 33 - Making our Http communication resilient 15:22
  • 34 - Summary of Section 3 01:23
  • 35 - Introduction to Section 4 05:55
  • 36 - What is RabbitMQ 05:47
  • 37 - Installing RabbitMQ 04:34
  • 38 - Adding and configuring mass transit 09:50
  • 39 - Adding the contracts 05:09
  • 40 - Adding a consumer to consume a message from the Service bus 10:45
  • 41 - Publishing the Auction Created event to the bus 08:59
  • 42 - What could go wrong? 10:49
  • 43 - Adding a message outbox 13:26
  • 44 - Using message retries 06:36
  • 45 - Consuming fault queues 09:03
  • 46 - Challenge: Adding the update and delete consumers 04:48
  • 47 - Challenge solution 06:41
  • 48 - Summary of section 4 01:09
  • 49 - Introduction to Section 5 07:40
  • 50 - OAuth and OpenIDConnect 10:30
  • 51 - Creating the Identity Server project 05:01
  • 52 - Reviewing and configuring our new project 12:52
  • 53 - Seeding data and adding a migration 17:20
  • 54 - Reviewing the login page in identity server 05:50
  • 55 - Adding a register page 08:12
  • 56 - Adding a register page part 2 07:33
  • 57 - Adding a register page part 3 08:34
  • 58 - Adding client credentials to allow clients to request a token 12:54
  • 59 - Adding a custom profile service to identity server 06:11
  • 60 - Configuring auth on the resource server 06:47
  • 61 - Configuring the auth endpoints on the resource server 08:06
  • 62 - Summary of section 5 02:48
  • 63 - Introduction to Section 6 04:12
  • 64 - Adding the Gateway service 06:43
  • 65 - Adding the Reverse Proxy configuration 10:17
  • 66 - Adding authentication to the Gateway config 07:23
  • 67 - Testing our Gateway service in Postman 07:55
  • 68 - Adding the remaining contracts we need 04:45
  • 69 - Adding the remaining consumers to the Auction Service 10:31
  • 70 - Adding the remaining consumers in the Search Service 06:20
  • 71 - Adding a new client to the Identity service configuration 07:11
  • 72 - Summary of Section 6 01:04
  • 73 - Introduction to Section 7 03:57
  • 74 - Creating a docker account 04:42
  • 75 - Dockerizing the Auction Service 14:09
  • 76 - Updating our docker compose file for the Auction Service container 13:53
  • 77 - Dockerising the Search service 08:52
  • 78 - Dockerising the Identity Service 04:47
  • 79 - Debugging a .Net service in a docker container 11:04
  • 80 - Dockerising the Gateway Service 08:06
  • 81 - Testing our docker containers 11:22
  • 82 - Summary of Section 7 03:04
  • 83 - Introduction to Section 8 08:37
  • 84 - Creating the NextJS project 08:05
  • 85 - Reviewing and simplifying the NextJS Project 11:12
  • 86 - Creating a nav bar 14:58
  • 87 - Fetching data from the API 05:31
  • 88 - Adding an Auction Card component 05:02
  • 89 - Styling the auction cards 13:14
  • 90 - Adding a countdown timer to the auction card 13:03
  • 91 - Adding loading to the images 07:04
  • 92 - Adding types to the project 06:21
  • 93 - Adding pagination to our list 08:36
  • 94 - Using server functions in client components 11:28
  • 95 - Adding a set page size option 09:15
  • 96 - Using Zustand for state management 10:04
  • 97 - Refactoring our code to use the zustand state 10:53
  • 98 - Adding a search bar 05:34
  • 99 - Adding the search functionality 08:29
  • 100 - Adding a reset to the search function 04:19
  • 101 - Adding the sorting functionality 08:55
  • 102 - Adding the filtering functionality 04:24
  • 103 - Adding a component to display when zero results 10:51
  • 104 - Summary of section 8 01:09
  • 105 - Introduction to Section 9 03:19
  • 106 - Before we begin 04:55
  • 107 - Installing Next Auth into our client app 12:30
  • 108 - Adding the login functionality 06:24
  • 109 - Getting the session details in the client 12:44
  • 110 - Populating the session data 10:40
  • 111 - Populating the User actions dropdown 08:59
  • 112 - Protecting routes 08:55
  • 113 - Testing API authentication 08:08
  • 114 - Getting the access token to use to authenticate to our resource server 11:03
  • 115 - Summary of Section 9 05:43
  • 116 - Introduction to Section 10 01:33
  • 117 - Routing in NextJS 06:21
  • 118 - Getting the auctions won 07:39
  • 119 - Creating an Auction form 04:23
  • 120 - Creating an Auction form part 2 09:39
  • 121 - Creating a reusable text input 08:55
  • 122 - Creating the auction form part 3 07:28
  • 123 - Creating a reusable date input 09:14
  • 124 - Creating a fetch wrapper 14:07
  • 125 - Adding the create auction server action 10:10
  • 126 - Adding react hot toast to display notifications if something goes wrong 05:07
  • 127 - Adding the auction details page content 09:28
  • 128 - Adding the edit auction page 14:06
  • 129 - Adding the delete auction functionality 08:43
  • 130 - Summary of section 10 04:26
  • 131 - Introduction to Section 11 02:35
  • 132 - Creating the Bid Service 08:46
  • 133 - Adding the models to the Bid Service 04:46
  • 134 - Adding an API Controller for the bids 10:33
  • 135 - Adding the get bids endpoint 02:19
  • 136 - Adding the auction created consumer 04:03
  • 137 - Testing the bid functionality in Postman 03:26
  • 138 - Adding the DTOs and Automapper 06:04
  • 139 - Adding a producer for the BidPlaced 07:48
  • 140 - Challenge solution 07:04
  • 141 - Adding a Background service for the auction finished event 15:35
  • 142 - What is gRPC? 05:49
  • 143 - Adding gRPC part 1 13:57
  • 144 - Adding gRPC part 2 06:02
  • 145 - Adding a gRPC client 12:03
  • 146 - Updating the Gateway service 03:22
  • 147 - Dockerising the BidService 10:36
  • 148 - Summary of Section 11 01:00
  • 149 - Introduction to Section 12 02:14
  • 150 - Creating the Notification service 05:30
  • 151 - Adding a SignalR Hub 05:17
  • 152 - Adding the Consumers 07:50
  • 153 - Adding CORS support to the Gateway 05:20
  • 154 - Dockerising the NotificationService 02:36
  • 155 - Updating the Docker compose file 04:34
  • 156 - Summary of section 12 00:57
  • 157 - Introduction to Section 13 00:33
  • 158 - Refactoring the auctions into a zustand store 09:54
  • 159 - Updating the Auction cards with the current high price 05:26
  • 160 - Getting the bids for an auction 03:25
  • 161 - Creating a bid item 09:57
  • 162 - Creating a bid store 09:50
  • 163 - Creating a bid form 14:33
  • 164 - Updating the error handling 06:29
  • 165 - Adding conditionals to the form and testing 05:04
  • 166 - Adding SignalR to the client app 14:00
  • 167 - Adding the new bid to SignalR 05:02
  • 168 - Adding a toast for an auction created 06:51
  • 169 - Adding a toast for an auction finished event 08:14
  • 170 - Disabling the auction finished form when the auction finishes 11:46
  • 171 - Preventing low bids 03:45
  • 172 - Summary Section 13 00:52
  • 173 - Introduction to Section 14 03:30
  • 174 - Preparing the client app 12:03
  • 175 - Creating the Dockerfile for nextjs 11:44
  • 176 - Fixing the identity server issues in docker compose 15:09
  • 177 - Giving the Identity Server a static ip address 11:42
  • 178 - Adding an ingress to Docker compose 10:34
  • 179 - Adding SSL to the ingress 07:13
  • 180 - Final app cleanup and resolving SignalR issue 12:27
  • 181 - End of course summary 04:55
  • 182 - Intro to Appendix A - Testing 10:01
  • 183 - The simplest unit test possible 13:52
  • 184 - Reviewing the code in the Auction controller and what we are testing 06:00
  • 185 - Creating an Auction Repository and interface 08:23
  • 186 - Refactoring the Auctions controller to use the repository 04:34
  • 187 - Mocking things 06:02
  • 188 - Unit testing the GET methods part 1 08:49
  • 189 - Unit testing the GET methods part 2 08:34
  • 190 - Unit testing the POST request 12:15
  • 191 - Challenge - Practicing creating unit tests for the other controller methods 04:19
  • 192 - Challenge solution 06:07
  • 193 - Integration testing setup 08:58
  • 194 - Setting up a Custom web application factory for integration testing 10:02
  • 195 - Adding test data to the DB 07:41
  • 196 - Creating an integration test for the GET method part 1 11:13
  • 197 - Creating an integration test for a GET request part 2 10:27
  • 198 - Creating an integration test for the POST request 13:39
  • 199 - Challenge - Practicing creating integration tests for the other methods 01:51
  • 200 - Challenge solution 03:11
  • 201 - Testing the Service bus 10:37
  • 202 - Using Collection fixtures to share the DB across test classes 10:39
  • 203 - Intro to Appendix B - Kubernetes 09:39
  • 204 - No ‘depends on’ in Kubernetes - using Polly to retry instead 12:55
  • 205 - Adding a GitHub action to push our Identity Server image to Docker hub 15:03
  • 206 - Deploying our IdentityServer to a Digital Ocean server 07:24
  • 207 - Configuring the Linux server to host the identity server 10:48
  • 208 - Creating the first Kubernetes manifest for a deployment 11:13
  • 209 - Adding a persistent volume claim 06:38
  • 210 - Adding a load balancer to allow us to connect to the postgres deployment 04:52
  • 211 - Adding a cluster ip our services can use 02:50
  • 212 - Creating a deployment for RabbitMQ 06:55
  • 213 - Creating a Mongodb deployment 04:40
  • 214 - Creating the auction service deployment 11:23
  • 215 - Creating the search service deployment 05:52
  • 216 - Creating the bid service deployment 04:55
  • 217 - Creating the notification service deployment 04:07
  • 218 - Creating the gateway service deployment 07:11
  • 219 - Creating the client app deployment 07:55
  • 220 - Adding an nginx ingress controller for docker-compose 09:54
  • 221 - Adding SSL to the ingress controller 09:40
  • 222 - Fixing Identity Server issues 16:24
  • 223 - Introduction to Appendix C 02:55
  • 224 - Kubernetes secrets 06:46
  • 225 - Using a manifest to create secrets 06:34
  • 226 - Updating the rest of the secrets 10:08
  • 227 - Adding a workflow to deploy our Auction service 09:22
  • 228 - Creating a kubernetes cluster on Digital Ocean 06:00
  • 229 - Connecting to our new kubernetes cluster 07:07
  • 230 - Creating a workflow to deploy our manifests automatically 07:39
  • 231 - Dev resources and prod resources 06:38
  • 232 - Creating the other deployment workflows for the other services 09:41
  • 233 - Deploying the secrets and the ingress controller 06:15
  • 234 - Deploying our manifests via github actions 08:09
  • 235 - Checking our deployment 03:37
  • 236 - Getting a domain name to point at our Load balancer 07:42
  • 237 - Tying up the loose ends part 1 13:49
  • 238 - Tying up the loose ends part 2 04:52
  • 239 - Adding SSL to our deployment part 1 09:33
  • 240 - Adding SSL to our deployment part 2 09:11
  • 241 - Finishing up the deployment 08:12

About the Instructor

Instructor

udemy

Course

$0.00

$8.00
Que esta incluido?
  • Streaming Multiplataforma
  • Acceso de por vida
  • Soporte al cliente
  • Actualizaciones gratuitas