From 09e908d55521f2736eb3ea9424e36ed2e581a18e Mon Sep 17 00:00:00 2001 From: David Eggenberger <72417712+DavidEggenberger@users.noreply.github.com> Date: Mon, 27 May 2024 19:43:34 +0200 Subject: [PATCH 1/4] Update README.md --- README.md | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 70dd133..e29ba54 100644 --- a/README.md +++ b/README.md @@ -26,30 +26,34 @@ The most convient way to run a Redis and SQL Server instance is through Docker. docker-compose -f docker-compose.infrastructure.yml up ``` -The SQL Server must be setup before CrispyCollab can be started. Open the Package Manager Console inside Visual Studio and execute the following commands: +The SQL Server must be setup before the template can be successfully run. Because the EF Core migrations were already created they only must be applied to the database. Open the Package Manager Console inside Visual Studio and execute the following two commands: ``` -update-database -context ApplicationDbContext -update-database -context IdentityDbContext +update-database -context TenantIdentityDbContext +update-database -context SubscriptionsDbContext ``` -These commands will create two seperate databases on the same server (the configuration strings are read from Web/WebServer/appsettings). The identity database storeas all the users informations and the application database all the other data. +These commands will create two seperate shemes with their respective tables on the same database (the configuration string is read from Web/Server/appsettings.Development.json). ### Web -Before running the WebServer (it serves also the Blazor WebAssembly client) configuration values must be set. They are then accessible through the IConfiguration interface for which ASP.NET Core automatically registers an implementation in the inversion-of-control (DI) container (assuming the configuration resides in appsettings.json or secrets.json). Especially the Infrastructure layer relies on the configuration values (e.g. database connection strings, Stripe API Key). It is highly recommended to keep the following secrets out of source control. For local development right click on the WebServer project and then click on manage user secrets. The opened secrets.json file should then updated to hold the following configuration (the values can be retrieved by following the respective links): +Before running the WebServer (it serves also the Blazor WebAssembly client) configuration values must be set. They are then accessible through the IConfiguration interface for which ASP.NET Core automatically registers an implementation in the inversion-of-control (DI) container (assuming the configuration resides in appsettings.json or secrets.json). Especially the Infrastructure layer relies on the configuration values (e.g. database connection strings, Stripe API Key). It is highly recommended to keep the following secrets out of source control. For local development right click on the Web.Server project and then click on manage user secrets. The opened secrets.json file should then updated to hold the following configuration (the values can be retrieved by following the respective links): ```json { - "StripeKey": "to register a stripe account and retrieve the API Key visit: https://dashboard.stripe.com/login", - "SocialLogins": { - "Google": { - "ClientId": "https://chsakell.com/2019/07/28/asp-net-core-identity-series-external-provider-authentication-registration-strategy", - "ClientSecret": "" - } + , + "EFCoreConfiguration": { + "SQLServerConnectionString_Dev": "Server=127.0.0.1,1433;Database=ModularMonolith;User Id=SA;Password=YourSTRONG!Passw0rd;Encrypt=False;" + }, + "SubscriptionsConfiguration": { + "StripeProfessionalPlanId": "_" + }, + "TenantIdentityConfiguration": { + "GoogleClientId": "_", + "GoogleClientSecret": "_", + "MicrosoftClientId": "_", + "MicrosoftClientSecret": "_", + "LinkedinClientId": "_", + "LinkedinClientSecret": "_" } } ``` -With the configuration set, the WebServer can either be started through Visual Studio (e.g. for debugging) or by running this command from the root folder -(where CrispyCollab.sln file is located): -``` -docker-compose -f docker-compose.web.yml up -``` +With the configuration set, the Web.Server project can be started through Visual Studio. From 7fcd6b8d1a1b6cac5e2b538dc75b070d7ddcac07 Mon Sep 17 00:00:00 2001 From: David Eggenberger <72417712+DavidEggenberger@users.noreply.github.com> Date: Mon, 27 May 2024 19:45:24 +0200 Subject: [PATCH 2/4] Update README.md --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e29ba54..1ba06c5 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,14 @@ This repository builds upon ModularMonolith.SaaS.Template repo for more information. -## Running CrispyCollab -CrispyCollab's WebServer (it also serves the Blazor WebAssembly client) relies on a Redis instance to store cached values and on a SQL Server to store the application's data. Running CrispyCollab therefore requires these two Infrastructure components to be running as well. +## Using and Running CrispyCollab +### TailwindCSS +If you want to start building with the template and adding your own tailwind classes you must run the following commands from the Source directory: +``` +npm install -D tailwindcss +npx tailwindcss init +npx tailwindcss -i ./TailwindSource.css -o ./Web/Server/wwwroot/dist/output.css --watch +``` ### Infrastructure The most convient way to run a Redis and SQL Server instance is through Docker. To do so run this command from the root folder From 1d04def886333655c57737fcf56b2b1037864010 Mon Sep 17 00:00:00 2001 From: David Eggenberger <72417712+DavidEggenberger@users.noreply.github.com> Date: Mon, 27 May 2024 19:54:14 +0200 Subject: [PATCH 3/4] Update README.md --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1ba06c5..62ef2ca 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ This repository builds upon ModularMonolith.SaaS.Template repo for more information. +Because this repo builts upon the ModularMonolith.SaaS.Template repo please visit it for information about the architecture. -## Using and Running CrispyCollab +## Running and Using CrispyCollab ### TailwindCSS If you want to start building with the template and adding your own tailwind classes you must run the following commands from the Source directory: ``` @@ -26,8 +26,7 @@ npx tailwindcss -i ./TailwindSource.css -o ./Web/Server/wwwroot/dist/output.css ``` ### Infrastructure -The most convient way to run a Redis and SQL Server instance is through Docker. To do so run this command from the root folder -(where CrispyCollab.sln file is located): +The most convient way to run an SQL Server instance is through Docker. To do so run this command from the root folder (where CrispyCollab.sln file is located): ``` docker-compose -f docker-compose.infrastructure.yml up ``` From 3e080ef275a22d0bbc4913ec1df2c0f428ce21d9 Mon Sep 17 00:00:00 2001 From: David Eggenberger <72417712+DavidEggenberger@users.noreply.github.com> Date: Mon, 27 May 2024 20:05:54 +0200 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 62ef2ca..befcb1a 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ update-database -context SubscriptionsDbContext These commands will create two seperate shemes with their respective tables on the same database (the configuration string is read from Web/Server/appsettings.Development.json). ### Web -Before running the WebServer (it serves also the Blazor WebAssembly client) configuration values must be set. They are then accessible through the IConfiguration interface for which ASP.NET Core automatically registers an implementation in the inversion-of-control (DI) container (assuming the configuration resides in appsettings.json or secrets.json). Especially the Infrastructure layer relies on the configuration values (e.g. database connection strings, Stripe API Key). It is highly recommended to keep the following secrets out of source control. For local development right click on the Web.Server project and then click on manage user secrets. The opened secrets.json file should then updated to hold the following configuration (the values can be retrieved by following the respective links): +Before running the Web.Server project (its the project to be started because it also serves the Blazor WebAssembly client) the configuration values must be set. It is highly recommended to keep the following secrets out of source control. For local development right click on the Web.Server project and then click on manage user secrets. The opened secrets.json file should then updated to hold the following configuration (the values can be retrieved by following the respective links): ```json {