An opiniated started kit for product engineering teams
- dotnet 8 SDK
- nodejs 16+
- docker engine
- mcsp_distributed
- mcsp_bff_ssr_blazor
- mcsp_desktop
- mcsp_cli
- mcsp_doc
Distributed architecture oriented
- âś… blazor wasm
- âś… rest & graphql sdk
- âś… bff & api gateway
- âś… api "TodoApp" service
- âś… IAM
- âś… Storage
- âś… Postgres database
- âś… OpenTelemetry
- âś… Bus
Blazor frontend + BFF pattern
- âś… Material UI (MudBlazor)
- âś… Custom endpoint
- âś… Server side rendering (Blazor)
- âś… OIDC / Cookie authentication (Keycloak)
- âś… Proxying API (Yarp)
- âś… GraphQL gateway (HotChocolate)
- âś… Auto generated SDK (StrawberryShake)
- âś… Light / Dark theme
- âś… I18N
- âś… Feature management
- âś… Docker
Documentation as code web application
- âś… web app
- âś… vitepress
- âś… markdown & mermaid
- âś… templates (#product, #ADR, #PRD, #guidelines, ...)
- âś… opiniated guidelines
Console app with CLI & UI
- âś… Cocona CLI
- âś… Spectre.Console UI
- âś… Commands folder & sample
Cross platform desktop app
- âś… Avalonia
- âś… material ui & icons
- âś… CommunityToolkit.MVVM
git clone https://github.com/bhtz/microscope-boilerplate.git
cd microscope-boilerplate/templates
dotnet pack
dotnet new install ./bin/Release/Microscope.Boilerplate.1.0.0.nupkg
dotnet new uninstall Microscope.Boilerplate
cd microscope-boilerplate/tool
dotnet pack
dotnet tool install --global --add-source ./nupkg Microscope.Boilerplate.Tool.CLI
dotnet tool uninstall --global Microscope.Boilerplate.Tool.CLI
dotnet new mcsp_distributed -n Acme.AwesomeProject
dotnet new mcsp_distributed -n Acme.AwesomeProject -C
dotnet new mcsp_distributed -n Acme.AwesomeProject -T
cd Acme.AwesomeProject/src/IAC/Docker
docker-compose up
cd Acme.AwesomeProject/src/IAC/Aspire/Microscope.Boilerplate.IAC.Aspire
dotnet new mcsp_cli -n Acme.CLI
dotnet new mcsp_doc -n Acme.Doc
dotnet new mcsp_doc -n Acme.Doc -G
Build solution
dotnet build
Build solution containers
dotnet publish -p:PublishProfile=DefaultContainer
Build solution containers for arm64
dotnet publish -r linux-arm64 -p:PublishProfile=DefaultContainer
Build CLI containers for arm64
cd src/Clients/CLI/Microscope.Boilerplate.Clients.CLI
dotnet publish -r linux-arm64 /t:PublishContainer
cd src/IAC/Docker
docker-compose up
- open Boilerplate app
Build documentation
cd templates/docs/Microscope.Boilerplate.Doc
npm run docs:build
Install NPM packages
cd ./src/Docs/Microscope.Boilerplate.Docs
npm i
Dev documentation
npm run docs:dev
npm run slides:dev
Build docs & run
npm run docs:build
dotnet run
export ASPNETCORE_ENVIRONMENT=Development
export ASPNETCORE_ENVIRONMENT=Production
you will need to run todoapp api first for this
cd src/Clients/SDK/Microscope.Boilerplate.Clients.SDK.GraphQL
dotnet graphql update
dotnet build
Navigate to infrastructure project
cd src/Services/TodoApp/Infrastructure/Microscope.Boilerplate.Services.TodoApp.Infrastructure/
Add migration
dotnet ef --startup-project ../../Interface/Microscope.Boilerplate.Services.TodoApp.Api/ migrations add InitialCreate -o ./Persistence/Migrations
Update database
dotnet ef --startup-project ../../Interface/Microscope.Boilerplate.Services.TodoApp.Api/ database update
Export SQL
dotnet ef --startup-project ../../Interface/Microscope.Boilerplate.Services.TodoApp.Api/ migrations script > ./Scripts/TodoApp.sql
Publish Aspire manifest
cd templates/src/IAC/Aspire/Microscope.Boilerplate.IAC.Aspire
dotnet run --publisher manifest --output-path manifest.json
Install Terraform & Azure CLI
brew update
brew tap hashicorp/tap
brew install azure-cli
brew install hashicorp/tap/terraform
Init
terraform init
terraform plan
terraform apply
Install Pulumi & Azure CLI
brew update
brew install azure-cli
brew install pulumi/tap/pulumi
Azure CLI login
az login
Set azure location (optional)
cd ./src/IAC/Pulumi/Microscope.Boilerplate.IAC
pulumi config set azure-native:location westus2
Deploy stack on Azure
pulumi up
Setup environment
- Register a new E2E test user on keycloak IAM
- username: [email protected]
- password: microscope
Run End to End tests
cd ./src/Clients/E2E/Microscope.Boilerplate.Clients.E2E
dotnet test
Run End to End tests with GUI
cd ./src/Clients/E2E/Microscope.Boilerplate.Clients.E2E
HEADED=1 dotnet test