This repository builds upon ModularMonolith.SaaS.Template. CrispyCollab is a reference application for building monolithic SaaS solutions with ASP.NET Core, Blazor and EF Core. CrispyCollab features:
- Subscription-based billing (Stripe Checkout)
- Multi-tenancy
- Tenant wide operations (sending chat messages)
- Admin Section (e.g. inviting users)
- Domain Driven Design
- CQRS
Because this repo builts upon the ModularMonolith.SaaS.Template repo please visit it for information about the architecture.
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
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
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 TenantIdentityDbContext
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).
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):
{
,
"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 Web.Server project can be started through Visual Studio.