From 41967ff116e2ea00537fb0393e26c268025c9ca3 Mon Sep 17 00:00:00 2001 From: Almog Hindi <102804545+almoghindi@users.noreply.github.com> Date: Tue, 2 Jul 2024 23:06:25 +0300 Subject: [PATCH 1/4] Update README.md --- README.md | 161 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 119 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index ea1cd1d..e3f5782 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,119 @@ -# Microservices Udemy Course repository - -This is the repository for the Microservices 'Carsties' app created for the Udemy course released in July 2023. - -You can view a demo of this app [here](https://app.carsties.store). You can register a user and sign in to see it in action or you can use one of the test accounts with the username 'bob' or 'alice' with the password of 'Pass123$' to sign in. - -You can see how this app was made by checking out the Udemy course for this [here](https://www.udemy.com/course/build-a-microservices-app-with-dotnet-and-nextjs-from-scratch/?couponCode=NEWCOURSEPROM) (with discount) - -You can run this app locally on your computer by following these instructions: - -1. Using your terminal or command prompt clone the repo onto your machine in a user folder - -``` -git clone https://github.com/TryCatchLearn/Carsties.git -``` -2. Change into the Carsties directory -``` -cd Carsties -``` -3. Ensure you have Docker Desktop installed on your machine. If not download and install from Docker and review their installation instructions for your Operating system [here](https://docs.docker.com/desktop/). -4. Build the services locally on your computer by running (NOTE: this may take several minutes to complete): -``` -docker compose build -``` -5. Once this completes you can use the following to run the services: -``` -docker compose up -d -``` -6. To see the app working you will need to provide it with an SSL certificate. To do this please install 'mkcert' onto your computer which you can get from [here](https://github.com/FiloSottile/mkcert). Once you have this you will need to install the local Certificate Authority by using: -``` -mkcert -install -``` -7. You will then need to create the certificate and key file on your computer to replace the certificates that I used. You will need to change into the 'devcerts' directory and then run the following command: -``` -cd devcerts -mkcert -key-file carsties.com.key -cert-file carsties.com.crt app.carsties.com api.carsties.com id.carsties.com -``` -8. You will also need to create an entry in your host file so you can reach the app by its domain name. Please use this [guide](https://phoenixnap.com/kb/how-to-edit-hosts-file-in-windows-mac-or-linux) if you do not know how to do this. Create the following entry: -``` -127.0.0.1 id.carsties.com app.carsties.com api.carsties.com -``` -9. You should now be able to browse to the app on https://app.carsties.com +# Carsties + +Carsties is an advanced application developed using .NET and Next.js with a microservices architecture. This repository demonstrates how to build and deploy a microservices-based application. + +## Features + +- **Microservices Architecture:** Multiple backend services built with .NET. +- **Client Application:** Frontend built with Next.js. +- **Service Communication:** Utilizes RabbitMQ and gRPC. +- **Identity Management:** Integrated with Duende IdentityServer. +- **Gateway:** Uses Microsoft YARP as a gateway. +- **Real-Time Updates:** Employs SignalR for push notifications. +- **Testing:** Unit and integration testing using XUnit. +- **Containerization:** Dockerized services. +- **CI/CD:** GitHub Actions for continuous integration and delivery. +- **Deployment:** Local deployment with Docker Compose and Kubernetes, including publishing to an online Kubernetes cluster. + +## Microservices Overview + +### AuctionService +- **Functionality:** Manages auction-related operations. +- **Key Features:** + - Creating and managing auction listings. + - Handling auction start and end times. + - Processing auction bids and determining winners. + - Integrating with the BiddingService for bid management. + +### BiddingService +- **Functionality:** Manages the bidding process within auctions. +- **Key Features:** + - Recording bids from users. + - Validating bid amounts and user eligibility. + - Providing real-time bid updates using SignalR. + - Ensuring that the highest bid is correctly reflected in the AuctionService. + +### Contracts +- **Functionality:** Defines shared interfaces and models used across different microservices. +- **Key Features:** + - Common data models for consistency. + - Interfaces for service-to-service communication. + - Shared utility functions and constants. + +### GatewayService +- **Functionality:** Acts as the API gateway for the application, routing requests to appropriate microservices. +- **Key Features:** + - Centralized entry point for client applications. + - Request routing to backend microservices. + - Authentication and authorization enforcement using IdentityService. + - Load balancing and request validation. + +### IdentityService +- **Functionality:** Manages user authentication and authorization. +- **Key Features:** + - User registration and login. + - Issuing and validating JWT tokens. + - Integrating with IdentityServer for OAuth2 and OpenID Connect. + - Managing user roles and permissions. + +### NotificationService +- **Functionality:** Manages notifications for the application. +- **Key Features:** + - Sending real-time notifications using SignalR. + - Handling email and SMS notifications. + - Integrating with other services to notify users about important events (e.g., outbid notifications, auction wins). + +### SearchService +- **Functionality:** Provides search capabilities for auction listings and bids. +- **Key Features:** + - Indexing auction listings and bids using Elasticsearch. + - Handling search queries from users. + - Returning relevant search results quickly. + - Supporting advanced search features like filters and sorting. + +## Tools and Technologies + +- **.NET** +- **Next.js** +- **RabbitMQ** +- **Duende IdentityServer** +- **Microsoft YARP** +- **SignalR** +- **Docker** +- **Kubernetes** +- **GitHub Actions** +- **XUnit** (for unit and integration testing) + +## Getting Started + +### Prerequisites + +- Coding experience +- Windows, Mac, or Linux computer capable of running Docker + +### Installation + +1. **Clone the Repository:** + ```bash + git clone https://github.com/almoghindi/Carsties.git + cd Carsties + ``` + +2. **Install Docker Desktop:** Ensure Docker is installed and running on your machine. Follow the [Docker installation instructions](https://docs.docker.com/desktop/). + +3. **Build the Services:** + ```bash + docker compose build + ``` + +4. **Run the Services:** + ```bash + docker compose up -d + ``` + +5. **Access the Application:** + Open your browser and navigate to `https://app.carsties.com`. + +--- + +This README provides a summary of the Carsties project, its features, the microservices architecture, the technologies used, and how to get started with the project. From 54fcd4e78e880e8452fed5949547ae680e9a9f4d Mon Sep 17 00:00:00 2001 From: Almog Hindi <102804545+almoghindi@users.noreply.github.com> Date: Tue, 2 Jul 2024 23:16:31 +0300 Subject: [PATCH 2/4] Update README.md --- README.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e3f5782..1b06818 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,16 @@ Carsties is an advanced application developed using .NET and Next.js with a micr ## Features -- **Microservices Architecture:** Multiple backend services built with .NET. +- **Microservices Architecture:** Multiple backend services built with ASP.NET. - **Client Application:** Frontend built with Next.js. - **Service Communication:** Utilizes RabbitMQ and gRPC. - **Identity Management:** Integrated with Duende IdentityServer. - **Gateway:** Uses Microsoft YARP as a gateway. - **Real-Time Updates:** Employs SignalR for push notifications. -- **Testing:** Unit and integration testing using XUnit. - **Containerization:** Dockerized services. - **CI/CD:** GitHub Actions for continuous integration and delivery. - **Deployment:** Local deployment with Docker Compose and Kubernetes, including publishing to an online Kubernetes cluster. +- **Testing:** Unit and integration testing using XUnit. ## Microservices Overview @@ -53,7 +53,7 @@ Carsties is an advanced application developed using .NET and Next.js with a micr - **Key Features:** - User registration and login. - Issuing and validating JWT tokens. - - Integrating with IdentityServer for OAuth2 and OpenID Connect. + - Integrating with Duende IdentityServer for OAuth2 and OpenID Connect. - Managing user roles and permissions. ### NotificationService @@ -66,7 +66,7 @@ Carsties is an advanced application developed using .NET and Next.js with a micr ### SearchService - **Functionality:** Provides search capabilities for auction listings and bids. - **Key Features:** - - Indexing auction listings and bids using Elasticsearch. + - Indexing auction listings and bids using MongoDB. - Handling search queries from users. - Returning relevant search results quickly. - Supporting advanced search features like filters and sorting. @@ -84,6 +84,11 @@ Carsties is an advanced application developed using .NET and Next.js with a micr - **GitHub Actions** - **XUnit** (for unit and integration testing) +## Databases + +- **MongoDB** +- **PostgreSQL** + ## Getting Started ### Prerequisites @@ -114,6 +119,16 @@ Carsties is an advanced application developed using .NET and Next.js with a micr 5. **Access the Application:** Open your browser and navigate to `https://app.carsties.com`. +## Media + +### Home Page + +![Screenshot 2024-07-02 230047](https://github.com/almoghindi/Carsties/assets/102804545/f3118070-6cc2-480e-86f4-51c1e60171a2) + +### Car Page + +![Screenshot 2024-07-02 230109](https://github.com/almoghindi/Carsties/assets/102804545/88b0e18e-229d-4a4f-8d24-1866834c1f4b) + --- This README provides a summary of the Carsties project, its features, the microservices architecture, the technologies used, and how to get started with the project. From 16f030ada536720cb4e84bdda201659977c49911 Mon Sep 17 00:00:00 2001 From: Almog Hindi <102804545+almoghindi@users.noreply.github.com> Date: Tue, 2 Jul 2024 23:17:15 +0300 Subject: [PATCH 3/4] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b06818..fcd17dd 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Carsties is an advanced application developed using .NET and Next.js with a micr ## Features -- **Microservices Architecture:** Multiple backend services built with ASP.NET. +- **Microservices Architecture:** Multiple backend services built with .NET. - **Client Application:** Frontend built with Next.js. - **Service Communication:** Utilizes RabbitMQ and gRPC. - **Identity Management:** Integrated with Duende IdentityServer. @@ -74,6 +74,7 @@ Carsties is an advanced application developed using .NET and Next.js with a micr ## Tools and Technologies - **.NET** +- **ASP.NET** - **Next.js** - **RabbitMQ** - **Duende IdentityServer** From e2254c471705ce1af1bef39cb83d36a2444b4621 Mon Sep 17 00:00:00 2001 From: Almog Hindi <102804545+almoghindi@users.noreply.github.com> Date: Tue, 2 Jul 2024 23:18:35 +0300 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fcd17dd..01fac25 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ Carsties is an advanced application developed using .NET and Next.js with a micr - **Identity Management:** Integrated with Duende IdentityServer. - **Gateway:** Uses Microsoft YARP as a gateway. - **Real-Time Updates:** Employs SignalR for push notifications. +- **Testing:** Unit and integration testing using XUnit. - **Containerization:** Dockerized services. - **CI/CD:** GitHub Actions for continuous integration and delivery. - **Deployment:** Local deployment with Docker Compose and Kubernetes, including publishing to an online Kubernetes cluster. -- **Testing:** Unit and integration testing using XUnit. ## Microservices Overview