Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CleanArchitecture.Maui #33

Open
wants to merge 50 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
04d1084
Make MsBuild Task More Managable (#31)
ubhaya Jan 19, 2024
5ef45b8
Cleanup
ubhaya Jan 19, 2024
de5c8de
CleanArchitecture.Maui Initialization
ubhaya Jan 19, 2024
8510813
Configuring Maui Project
ubhaya Jan 19, 2024
5d9a53a
Add Minimal Api project
ubhaya Jan 19, 2024
4bacd75
Cleanup MsBuild target to match the final Maui project out put
ubhaya Jan 19, 2024
4796076
Add Fastendpoint
ubhaya Jan 19, 2024
542813e
Merge branch 'main' into CleanArchitecture.Maui
ubhaya Jan 19, 2024
eae0e48
Configure CleanArchitecture Services
ubhaya Jan 19, 2024
06be713
Add basic Authentication
ubhaya Jan 19, 2024
dc3d4ed
Authentication and Permission Authorization success
ubhaya Jan 19, 2024
50673ce
Add AccessControl Endpoints
ubhaya Jan 19, 2024
6cb32fe
Fix Typo
ubhaya Jan 19, 2024
8a0bf46
Fix swagger support
ubhaya Jan 20, 2024
0a3a29a
Add Roles Endpoints
ubhaya Jan 20, 2024
48b1fed
Add Users Endpoints
ubhaya Jan 20, 2024
827413c
Add TodoItems Endpoints
ubhaya Jan 20, 2024
a0807b1
Add Todo Lists Endpoints
ubhaya Jan 20, 2024
c216c3f
Add Maui project
ubhaya Jan 21, 2024
21cd2fd
Add IdentityServer support
ubhaya Jan 21, 2024
2a6f632
Implementing Open Id (#35)
ubhaya Jan 23, 2024
d24bada
Add http client generation and fix builf failling issues and failling…
ubhaya Jan 23, 2024
84da7df
Add OidcClient to Maui
ubhaya Jan 24, 2024
d0bb0e9
Setup Maui app with Oidc authorization
ubhaya Jan 24, 2024
b9941e7
Code Clean up
ubhaya Jan 25, 2024
2269658
Wire up MobileUi with WebApi
ubhaya Jan 26, 2024
9ca5006
Code clean up
ubhaya Jan 26, 2024
e86f63f
Fix Failing Test
ubhaya Jan 26, 2024
e23932b
Grant Refresh Token
ubhaya Jan 26, 2024
309fc82
Add ViewModels
ubhaya Jan 26, 2024
c058215
Setup project to intercept navigation to implement Authorization
ubhaya Jan 26, 2024
9138606
Add flyout menu
ubhaya Jan 26, 2024
a901059
Add WeatherForecast page
ubhaya Jan 26, 2024
0478306
Organized DependencyInjection in Maui project
ubhaya Jan 26, 2024
8742d48
Fix OpenApi Document
ubhaya Jan 26, 2024
057c59f
Todo List Page and Todo Items Page added in implement Get
ubhaya Jan 27, 2024
4cc76c5
Fix todo item page geting stuck when loading
ubhaya Feb 27, 2024
07477b5
Mark todo item done
ubhaya Feb 27, 2024
6175ed7
Add new item and edit item
ubhaya Feb 27, 2024
88bb420
Remove Item
ubhaya Feb 28, 2024
49d9fce
Fix failing IntegrationTests
ubhaya Feb 28, 2024
db2d3ee
Remove WebUi Automation texting
ubhaya Feb 29, 2024
ac4acbb
Fix typo
ubhaya Feb 29, 2024
63bf69f
Add run configurations
ubhaya Mar 1, 2024
868738e
Project build cleanup
ubhaya Mar 4, 2024
b6d4547
Fix Build Target
ubhaya Mar 4, 2024
7821e3a
Configure Project Template for Maui and update read me file
ubhaya Mar 4, 2024
02335b2
Update packages
ubhaya Mar 5, 2024
ad56246
Add workflows for MAUI build
ubhaya Mar 5, 2024
48cd3de
Excluded Maui Mobile project from workflow
ubhaya Mar 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
173 changes: 124 additions & 49 deletions .github/workflows/CleanArchitecture.Blazored.Dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ env:
jobs:
build-test-bootstrapblazor:
runs-on: ubuntu-latest
env:
SolutionPath: CleanArchitecture.Blazored.Bootstrap.sln

services:
services:
sql-server:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
Expand All @@ -40,15 +42,19 @@ jobs:
shell: pwsh
run: .\CleanArchitecture.Blazored.restore.ps1

- name: Create Temporary Solution
shell: pwsh
run: .\AddProjectsToSolution.ps1 -solutionPath ${{ env.SolutionPath }} -projectsPath .\src\content\CleanArchitecture.Blazored\

- name: Restore dependencies
run: dotnet restore CleanArchitecture.Blazored.Dev.sln --configfile ./nuget.config
run: dotnet restore ${{ env.SolutionPath }} --configfile ./nuget.config

- name: Build solution
run: dotnet build --no-restore CleanArchitecture.Blazored.Dev.sln -c Release
run: dotnet build --no-restore ${{ env.SolutionPath }} -c Release

- name: Execute Application.IntegrationTests
run: |
dotnet test -c Release --no-build src/content/CleanArchitecture.Blazored/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
dotnet test -c Release --no-build src/content/CleanArchitecture.Blazored/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
env:
ConnectionStrings__DefaultConnection: Server=localhost,1433;Database=CleanArchitecture_Application_IntegrationTests;User=sa;Password=${{ env.SqlServerPassword }};MultipleActiveResultSets=true;TrustServerCertificate=True;

Expand All @@ -69,51 +75,120 @@ jobs:
ConnectionStrings__DefaultConnection: "Server=localhost,1433;Database=CleanArchitecture_Application_AcceptanceTests.Blazored;User=sa;Password=${{ env.SqlServerPassword }};MultipleActiveResultSets=true;TrustServerCertificate=True;"

build-test-mudblazor:
runs-on: ubuntu-latest

services:
sql-server:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
ACCEPT_EULA: 'Y'
MSSQL_SA_PASSWORD: ${{ env.SqlServerPassword }}
ports:
- 1433:1433
runs-on: ubuntu-latest
env:
SolutionPath: CleanArchitecture.Blazored.MudBlazor.sln

services:
sql-server:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
ACCEPT_EULA: 'Y'
MSSQL_SA_PASSWORD: ${{ env.SqlServerPassword }}
ports:
- 1433:1433

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: 8.x

- name: Build Generated Project
shell: pwsh
run: .\CleanArchitecture.Blazored.restore.ps1

- name: Create Temporary Solution
shell: pwsh
run: .\AddProjectsToSolution.ps1 -solutionPath ${{ env.SolutionPath }} -projectsPath .\src\content\CleanArchitecture.MudBlazored\

- name: Restore dependencies
run: dotnet restore ${{ env.SolutionPath }} --configfile ./nuget.config

- name: Build solution
run: dotnet build --no-restore ${{ env.SolutionPath }} -c Release

- name: Execute Application.IntegrationTests
run: |
dotnet test -c Release --no-build src/content/CleanArchitecture.MudBlazored/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
env:
ConnectionStrings__DefaultConnection: Server=localhost,1433;Database=CleanArchitecture_Application_IntegrationTests;User=sa;Password=${{ env.SqlServerPassword }};MultipleActiveResultSets=true;TrustServerCertificate=True;

- name: Execute Application.UnitTest
run: dotnet test -c Release --no-build src/content/CleanArchitecture.MudBlazored/tests/Application.UnitTests/Application.UnitTests.csproj

- name: Execute Domain.UnitTest
run: dotnet test -c Release --no-build src/content/CleanArchitecture.MudBlazored/tests/Domain.UnitTests/Domain.UnitTests.csproj

- name: Install Playwright
run: pwsh src/content/CleanArchitecture.MudBlazored/tests/WebUi.AcceptanceTests/bin/Release/net8.0/playwright.ps1 install

- name: Execute WebUi.AcceptanceTests
run: dotnet test -c Release --no-build src/content/CleanArchitecture.MudBlazored/tests/WebUi.AcceptanceTests/WebUi.AcceptanceTests.csproj

build-test-maui:
runs-on: ubuntu-latest
env:
SolutionPath: CleanArchitecture.Blazored.Maui.sln

services:
sql-server:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
ACCEPT_EULA: 'Y'
MSSQL_SA_PASSWORD: ${{ env.SqlServerPassword }}
ports:
- 1433:1433

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: 8.x

- name: Install Maui
shell: pwsh
run: dotnet workload install maui-android

- name: Install OpenJDK 11
shell: bash
run: |
ubuntu_release=`lsb_release -rs`
wget https://packages.microsoft.com/config/ubuntu/${ubuntu_release}/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install msopenjdk-11

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: 8.x

- name: Build Generated Project
shell: pwsh
run: .\CleanArchitecture.Blazored.restore.ps1

- name: Restore dependencies
run: dotnet restore CleanArchitecture.Blazored.Dev.sln --configfile ./nuget.config

- name: Build solution
run: dotnet build --no-restore CleanArchitecture.Blazored.Dev.sln -c Release

- name: Execute Application.IntegrationTests
run: |
dotnet test -c Release --no-build src/content/CleanArchitecture.MudBlazored/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
env:
ConnectionStrings__DefaultConnection: Server=localhost,1433;Database=CleanArchitecture_Application_IntegrationTests;User=sa;Password=${{ env.SqlServerPassword }};MultipleActiveResultSets=true;TrustServerCertificate=True;

- name: Execute Application.UnitTest
run: dotnet test -c Release --no-build src/content/CleanArchitecture.MudBlazored/tests/Application.UnitTests/Application.UnitTests.csproj

- name: Execute Domain.UnitTest
run: dotnet test -c Release --no-build src/content/CleanArchitecture.MudBlazored/tests/Domain.UnitTests/Domain.UnitTests.csproj
- name: Build Generated Project
shell: pwsh
run: .\CleanArchitecture.Blazored.restore.ps1

- name: Create Temporary Solution
shell: pwsh
run: .\AddProjectsToSolution.ps1 -solutionPath ${{ env.SolutionPath }} -projectsPath .\src\content\CleanArchitecture.Maui\ -projectsToExclude src\MobileUi\Mobile

- name: Restore dependencies
run: dotnet restore ${{ env.SolutionPath }} --configfile ./nuget.config

- name: Build solution
run: dotnet build --no-restore ${{ env.SolutionPath }} -c Release

- name: Execute Application.IntegrationTests
run: |
dotnet test -c Release --no-build src/content/CleanArchitecture.Maui/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
env:
ConnectionStrings__DefaultConnection: Server=localhost,1433;Database=CleanArchitecture_Application_IntegrationTests;User=sa;Password=${{ env.SqlServerPassword }};MultipleActiveResultSets=true;TrustServerCertificate=True;
ConnectionStrings__IdentityServer: Server=localhost,1433;Database=CleanArchitecture_IdentityServer_IntegrationTests;User=sa;Password=${{ env.SqlServerPassword }};MultipleActiveResultSets=true;TrustServerCertificate=True;

- name: Install Playwright
run: pwsh src/content/CleanArchitecture.MudBlazored/tests/WebUi.AcceptanceTests/bin/Release/net8.0/playwright.ps1 install
- name: Execute Application.UnitTest
run: dotnet test -c Release --no-build src/content/CleanArchitecture.Maui/tests/Application.UnitTests/Application.UnitTests.csproj

- name: Execute WebUi.AcceptanceTests
run: dotnet test -c Release --no-build src/content/CleanArchitecture.MudBlazored/tests/WebUi.AcceptanceTests/WebUi.AcceptanceTests.csproj

- name: Execute Domain.UnitTest
run: dotnet test -c Release --no-build src/content/CleanArchitecture.Maui/tests/Domain.UnitTests/Domain.UnitTests.csproj
8 changes: 8 additions & 0 deletions .run/Android.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Android" type="CompoundRunConfigurationType">
<toRun name="Mobile: IdentityServer" type="LaunchSettings" />
<toRun name="Mobile: WebApi" type="LaunchSettings" />
<toRun name="Mobile: Android" type="XamarinAndroidProject" />
<method v="2" />
</configuration>
</component>
8 changes: 8 additions & 0 deletions .run/MacOS.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MacOS" type="CompoundRunConfigurationType">
<toRun name="Mobile: IdentityServer" type="LaunchSettings" />
<toRun name="Mobile: WebApi" type="LaunchSettings" />
<toRun name="Mobile: MacOS" type="XamarinMacProject" />
<method v="2" />
</configuration>
</component>
11 changes: 11 additions & 0 deletions .run/Mobile_ Android.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Mobile: Android" type="XamarinAndroidProject" factoryName="Xamarin.Android">
<option name="PROJECT_PATH" value="$PROJECT_DIR$/src/content/CleanArchitecture.Maui/src/MobileUi/Mobile/Mobile.csproj" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="TARGET_SELECTION_MODE" value="DEVICE_AND_SNAPSHOT_COMBO_BOX" />
<option name="DEPLOY_BEHAVIOUR_NAME" value="Default" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
17 changes: 17 additions & 0 deletions .run/Mobile_ IdentityServer.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Mobile: IdentityServer" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/src/content/CleanArchitecture.Maui/src/MobileUi/IdentityServer/IdentityServer.csproj" />
<option name="LAUNCH_PROFILE_TFM" value="net8.0" />
<option name="LAUNCH_PROFILE_NAME" value="SelfHost" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1" />
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0" />
<option name="SEND_DEBUG_REQUEST" value="1" />
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value="" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
11 changes: 11 additions & 0 deletions .run/Mobile_ MacOS.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Mobile: MacOS" type="XamarinMacProject" factoryName="Xamarin.Mac">
<option name="PROJECT_PATH" value="$PROJECT_DIR$/src/content/CleanArchitecture.Maui/src/MobileUi/Mobile/Mobile.csproj" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src/content/CleanArchitecture.Maui/src/MobileUi/Mobile/bin/Debug/net8.0-maccatalyst/maccatalyst-x64" />
<option name="PASS_PARENT_ENVS_MAC" value="1" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
17 changes: 17 additions & 0 deletions .run/Mobile_ WebApi.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Mobile: WebApi" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/src/content/CleanArchitecture.Maui/src/MobileUi/WebApi/WebApi.csproj" />
<option name="LAUNCH_PROFILE_TFM" value="net8.0" />
<option name="LAUNCH_PROFILE_NAME" value="https" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1" />
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0" />
<option name="SEND_DEBUG_REQUEST" value="1" />
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value="" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
9 changes: 9 additions & 0 deletions .run/Mobile_ Windows.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Mobile: Windows" type="UwpProject" factoryName="UWP">
<option name="PROJECT_PATH" value="$PROJECT_DIR$/src/content/CleanArchitecture.Maui/src/MobileUi/Mobile/Mobile.csproj" />
<option name="PROGRAM_PARAMETERS" value="" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
9 changes: 9 additions & 0 deletions .run/Mobile_ iOS.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Mobile: iOS" type="XamarinIOSProject" factoryName="Xamarin.iOS">
<option name="PROJECT_PATH" value="$PROJECT_DIR$/src/content/CleanArchitecture.Maui/src/MobileUi/Mobile/Mobile.csproj" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="IS_PASS_PARENT_ENVS" value="false" />
<option name="EXTRA_MLAUNCH_PARAMETERS" value="" />
<method v="2" />
</configuration>
</component>
17 changes: 17 additions & 0 deletions .run/WebUi_ Blazored.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="WebUi: Blazored" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/src/content/CleanArchitecture.Blazored/src/WebUi/WebUi/WebUi.csproj" />
<option name="LAUNCH_PROFILE_TFM" value="net8.0" />
<option name="LAUNCH_PROFILE_NAME" value="https" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1" />
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0" />
<option name="SEND_DEBUG_REQUEST" value="1" />
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value="" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
17 changes: 17 additions & 0 deletions .run/WebUi_ MudBlazored.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="WebUi: MudBlazored" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/src/content/CleanArchitecture.MudBlazored/src/WebUi/WebUi/WebUi.csproj" />
<option name="LAUNCH_PROFILE_TFM" value="net8.0" />
<option name="LAUNCH_PROFILE_NAME" value="https" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1" />
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0" />
<option name="SEND_DEBUG_REQUEST" value="1" />
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value="" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
8 changes: 8 additions & 0 deletions .run/Windows.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Windows" type="CompoundRunConfigurationType">
<toRun name="Mobile: IdentityServer" type="LaunchSettings" />
<toRun name="Mobile: WebApi" type="LaunchSettings" />
<toRun name="Mobile: Windows" type="UwpProject" />
<method v="2" />
</configuration>
</component>
8 changes: 8 additions & 0 deletions .run/iOS.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="iOS" type="CompoundRunConfigurationType">
<toRun name="Mobile: IdentityServer" type="LaunchSettings" />
<toRun name="Mobile: WebApi" type="LaunchSettings" />
<toRun name="Mobile: iOS" type="XamarinIOSProject" />
<method v="2" />
</configuration>
</component>
Loading
Loading