Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 21 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name: "CodeQL"
on:
push:
branches: [ "main" ]
aths-ignore:
paths-ignore:
- "deploy/**"
pull_request:
# The branches below must be a subset of the branches above
Expand All @@ -33,43 +33,35 @@ jobs:
security-events: write
pull-requests: read

strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: csharp

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# πŸ“š See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
include-prerelease: true

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
language: ${{ matrix.language }}
queries: security-and-quality

- name: Restore dependencies
run: dotnet restore CleanArchitecture.Blazor.slnx
run: dotnet restore CleanArchitecture.Blazor.slnx

- name: Build
run: dotnet build CleanArchitecture.Blazor.slnx --configuration Debug --no-restore
run: dotnet build CleanArchitecture.Blazor.slnx --configuration Release --no-restore

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
languages: csharp
# - name: Perform CodeQL Analysis
# uses: github/codeql-action/analyze@v4
# with:
# category: "/language:${{matrix.language}}"
6 changes: 3 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x

- name: Restore dependencies
run: dotnet restore CleanArchitecture.Blazor.slnx
Expand Down
22 changes: 16 additions & 6 deletions CleanArchitecture.Blazor.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,35 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>CleanArchitecture.Blazor.Solution.Template</id>
<version>1.30.2</version>
<version>1.30.3</version>
<title>Clean Architecture Blazor Solution Template</title>
<authors>hl.z</authors>
<description>Clean Architecture Blazor Solution Template for .NET9.</description>
<description>Clean Architecture Blazor Solution Template for .NET 10.</description>
<summary>
A Clean Architecture Blazor Server dashboard application template for .NET9.
A Clean Architecture Blazor Server dashboard application template for .NET 10.
</summary>
<releaseNotes><![CDATA[
1.30.2
- Upgraded to .NET 10 (including all project files, Docker images, and dependencies)
- Updated all Microsoft packages to .NET 10 RC2 (10.0.0-rc.2.25502.107)
- Updated Entity Framework Core to version 10.0.0-rc.2
- Updated ASP.NET Core packages to version 10.0.0-rc.2
- Upgraded third-party packages for .NET 10 compatibility:
- Npgsql.EntityFrameworkCore.PostgreSQL β†’ 10.0.0-rc.2
- EFCore.NamingConventions β†’ 10.0.0-rc.2
- Hangfire packages β†’ 1.8.22
- Minio β†’ 7.0.0
- QuestPDF β†’ 2025.12.0-alpha3
- NUnit3TestAdapter β†’ 6.0.0-beta.1
- Updated Docker base images to .NET 10 runtime and SDK
- Added full Specification pattern support (spec) for advanced querying and filtering
- Integrated Stl.Fusion for real-time UI/state updates across sessions
- Implemented Google and Microsoft external provider authentication enhancements
- Improved multi-tenant context handling and tenant switch service
- Enhanced Document OCR pipeline (Gemini integration and job reliability fixes)
- Fixed prior OCR process stability issues
- Added Security Risk Dashboard and user login risk summary indicators
- Picklist and PicklistSet import/export and advanced specification filtering
- Added comprehensive validation and exception handling pipeline behaviours
- Added welcome and MFA factor code notification commands
- Theme customization (dynamic primary color and themes menu improvements)
- Localization and culture enhancements (multi-language resource sets)
- Added global search dialog and improved navigation menu structure
Expand All @@ -29,7 +39,7 @@
- Strengthened security analysis and audit logging (LoginAudits, AuditTrails, SystemLogs)
- Added user profile reactive state management and session tracking
- Added AI settings configuration interface
- Updated EF Core configurations and initial migrations for .NET9
- Updated EF Core configurations and migrations for .NET 10
]]></releaseNotes>

<projectUrl>https://github.com/neozhu/CleanArchitectureWithBlazorServer</projectUrl>
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
ο»Ώ#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
# apt update and install fonts
RUN echo "deb http://deb.debian.org/debian/ bookworm main contrib" > /etc/apt/sources.list && \
echo "deb-src http://deb.debian.org/debian/ bookworm main contrib" >> /etc/apt/sources.list && \
Expand Down Expand Up @@ -33,7 +33,7 @@ EXPOSE 443



FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["src/Migrators/Migrators.MSSQL/Migrators.MSSQL.csproj", "src/Migrators/Migrators.MSSQL/"]
Expand All @@ -60,4 +60,4 @@ FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .

ENTRYPOINT ["dotnet", "CleanArchitecture.Blazor.Server.UI.dll"]
ENTRYPOINT ["dotnet", "CleanArchitecture.Blazor.Server.UI.dll"]
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ο»Ώ# Clean Architecture Blazor Server
# Clean Architecture Blazor Server

[![Build](https://github.com/neozhu/CleanArchitectureWithBlazorServer/actions/workflows/dotnet.yml/badge.svg)](https://github.com/neozhu/CleanArchitectureWithBlazorServer/actions/workflows/dotnet.yml)
[![CodeQL](https://github.com/neozhu/CleanArchitectureWithBlazorServer/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/neozhu/CleanArchitectureWithBlazorServer/actions/workflows/codeql-analysis.yml)
Expand All @@ -10,7 +10,7 @@

## 🎯 Overview

This project is a production-ready Blazor Server application template that demonstrates Clean Architecture implementation with .NET 9 and follows **Blazor Clean Architecture best practices**.
This project is a production-ready Blazor Server application template that demonstrates Clean Architecture implementation with **.NET 10** and follows **Blazor Clean Architecture best practices**.
It provides a solid foundation for building scalable, maintainable enterprise applications with modern **spec-driven development practices**.

### Key Features
Expand Down Expand Up @@ -46,7 +46,7 @@ Experience the application in action:
| Layer | Technologies |
|-------|-------------|
| **Frontend** | Blazor Server, MudBlazor, SignalR |
| **Backend** | .NET 9, ASP.NET Core, MediatR, FluentValidation |
| **Backend** | .NET 10, ASP.NET Core, MediatR, FluentValidation |
| **Database** | Entity Framework Core, MSSQL/PostgreSQL/SQLite |
| **Authentication** | ASP.NET Core Identity, OAuth 2.0, JWT |
| **Caching** | FusionCache, Redis |
Expand Down Expand Up @@ -89,7 +89,7 @@ The project includes a comprehensive [Development Workflow](docs/) with:

### Prerequisites

- [.NET 9 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)
- [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0)
- [Visual Studio 2022](https://visualstudio.microsoft.com/) or [Rider](https://www.jetbrains.com/rider/)
- [Docker Desktop](https://www.docker.com/) (optional)

Expand Down Expand Up @@ -150,7 +150,7 @@ See [Docker Setup Documentation](#docker-setup-for-blazor-server-application) fo
OpenSpec enables spec-driven, reviewable changes with clear proposals, deltas, and tasks. This repo includes guidance in `openspec/AGENTS.md` and a project context in `openspec/project.md`.

- Read the quickstart: `openspec/AGENTS.md`
- Project conventions and patterns: `openspec/project.md` (see β€œNew Entity/Feature Guide (Contacts Pattern)”)
- Project conventions and patterns: `openspec/project.md` (see "New Entity/Feature Guide (Contacts Pattern)")

### Workflow

Expand Down Expand Up @@ -181,7 +181,7 @@ OpenSpec enables spec-driven, reviewable changes with clear proposals, deltas, a
- For data access in handlers use `IApplicationDbContextFactory` and per-operation context lifetime:
- `await using var db = await _dbContextFactory.CreateAsync(cancellationToken);`
- Follow MediatR pipeline behaviors, caching tags, and specification patterns.
- Mirror the Contacts module for a new entity’s DTOs, commands, queries, specs, security, and UI pages/components.
- Mirror the Contacts module for a new entity's DTOs, commands, queries, specs, security, and UI pages/components.

5) Archive after deployment
- Move `openspec/changes/<id>/` to `openspec/changes/archive/YYYY-MM-DD-<id>/` (or use the CLI archive helper if available).
Expand Down Expand Up @@ -236,7 +236,7 @@ The system SHALL allow users to create, edit, view, list, and delete customers w
Tips
- Use Contacts as the reference implementation for structure and conventions.
- Add menu entries in `src/Server.UI/Services/Navigation/MenuService.cs`.
- Define permissions under `Permissions.<Module>` and they’ll be picked up during seeding.
- Define permissions under `Permissions.<Module>` and they'll be picked up during seeding.

## πŸ”§ Code Generation

Expand Down
12 changes: 6 additions & 6 deletions src/Application/Application.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ο»Ώ<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>CleanArchitecture.Blazor.Application</RootNamespace>
<AssemblyName>CleanArchitecture.Blazor.Application</AssemblyName>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -21,10 +21,10 @@

<PackageReference Include="FluentValidation" Version="12.1.0" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="12.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="9.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="10.0.0-rc.2.25502.107" />
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="10.0.0-rc.2.25502.107" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="Hangfire.Core" Version="1.8.21" />
<PackageReference Include="Hangfire.Core" Version="1.8.22" />
<PackageReference Include="ZiggyCreatures.FusionCache" Version="2.4.0" />

</ItemGroup>
Expand All @@ -34,4 +34,4 @@
<ItemGroup>
<Folder Include="Common\Interfaces\MultiTenant\" />
</ItemGroup>
</Project>
</Project>
28 changes: 14 additions & 14 deletions src/Domain/Domain.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ο»Ώ<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>CleanArchitecture.Blazor.Domain</RootNamespace>
<AssemblyName>CleanArchitecture.Blazor.Domain</AssemblyName>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -11,23 +11,23 @@

<ItemGroup>
<PackageReference Include="MediatR" Version="12.5.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.0-rc.2.25502.107" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.0-rc.2.25502.107" />
<PackageReference Include="EntityFrameworkCore.Exceptions.PostgreSQL" Version="8.1.3" />
<PackageReference Include="EntityFrameworkCore.Exceptions.Sqlite" Version="8.1.3" />
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.1.3" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="9.0.10" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.10" />
<PackageReference Include="EFCore.NamingConventions" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="9.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.10">
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.0-rc.2.25502.107" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0-rc.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.0-rc.2.25502.107" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.0-rc.2.25502.107" />
<PackageReference Include="EFCore.NamingConventions" Version="10.0.0-rc.2" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="10.0.0-rc.2.25502.107" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.0.0-rc.2.25502.107" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.0-rc.2.25502.107">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="10.0.0-rc.2.25502.107" />
</ItemGroup>

</Project>
</Project>
14 changes: 7 additions & 7 deletions src/Infrastructure/Infrastructure.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ο»Ώ<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>CleanArchitecture.Blazor.Infrastructure</RootNamespace>
<AssemblyName>CleanArchitecture.Blazor.Infrastructure</AssemblyName>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -9,12 +9,12 @@
</PropertyGroup>
<ItemGroup>

<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="9.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="9.0.10" />
<PackageReference Include="Minio" Version="6.0.5" />
<PackageReference Include="QuestPDF" Version="2025.7.4" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="10.0.0-rc.2.25502.107" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="10.0.0-rc.2.25502.107" />
<PackageReference Include="Minio" Version="7.0.0" />
<PackageReference Include="QuestPDF" Version="2025.12.0-alpha3" />
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="9.0.2" />
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="9.0.3-dev-00153" />
<PackageReference Include="Serilog.Sinks.Postgresql.Alternative" Version="4.2.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="2.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
Expand Down
6 changes: 3 additions & 3 deletions src/Migrators/Migrators.MSSQL/Migrators.MSSQL.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ο»Ώ<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyName>CleanArchitecture.Blazor.Migrators.MSSQL</AssemblyName>
Expand All @@ -17,4 +17,4 @@
<Folder Include="Migrations\" />
</ItemGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ο»Ώ<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyName>CleanArchitecture.Blazor.Migrators.PostgreSQL</AssemblyName>
Expand All @@ -17,4 +17,4 @@
<Folder Include="Migrations\" />
</ItemGroup>

</Project>
</Project>
6 changes: 3 additions & 3 deletions src/Migrators/Migrators.SqLite/Migrators.SqLite.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ο»Ώ<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyName>CleanArchitecture.Blazor.Migrators.SqLite</AssemblyName>
Expand All @@ -17,4 +17,4 @@
<Folder Include="Migrations\" />
</ItemGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ο»Ώusing CleanArchitecture.Blazor.Application.Features.Identity.DTOs;
using CleanArchitecture.Blazor.Application.Common.Interfaces; // IDataSourceService

namespace CleanArchitecture.Blazor.Server.UI.Components.Autocompletes;

Expand Down
Loading
Loading