CoreMiddleware.Core 1.1.2

dotnet add package CoreMiddleware.Core --version 1.1.2
                    
NuGet\Install-Package CoreMiddleware.Core -Version 1.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CoreMiddleware.Core" Version="1.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreMiddleware.Core" Version="1.1.2" />
                    
Directory.Packages.props
<PackageReference Include="CoreMiddleware.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CoreMiddleware.Core --version 1.1.2
                    
#r "nuget: CoreMiddleware.Core, 1.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CoreMiddleware.Core@1.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CoreMiddleware.Core&version=1.1.2
                    
Install as a Cake Addin
#tool nuget:?package=CoreMiddleware.Core&version=1.1.2
                    
Install as a Cake Tool

Core Middleware 核心中項框架 (Core Middleware Framework)

致力於提供 B2B SaaS 平台開發者一致、安全、且具備高度擴展性的底層架構 SDK。


🚀 專案導覽

本專案採用 Clean ArchitectureDomain-Driven Design (DDD) 模式構建,將核心技術與業務邏輯抽離,確保技術升級不影響業務穩定性。

目錄結構

.
├── CoreMiddleware.Core/           # 核心領域層 (Domain Entities, Interfaces)
├── CoreMiddleware.Application/    # 應用邏輯層 (Services, DTOs)
├── CoreMiddleware.Infrastructure/ # 基礎設施層 (EF Core, Repositories, Redis)
├── CoreMiddleware.WebApi/         # API 展現層 (Controllers, Middlewares)
├── CoreMiddleware.Tests/          # 自動化測試專案 (Unit, Integration)
├── docs/                          # 完整技術文檔中心 (PRD, SA, SD)
└── .husky/                        # Git Hooks 品質管理配置

🏗️ 技術架構

本框架收斂了以下企業級關鍵技術:

  1. 全域冪等性 (Idempotency): 確保 API 不因重試而重複執行。
  2. 交易訊息保證 (Transactional Outbox): 解決分散式環境下的資料一致性問題。
  3. 動態個資遮蔽 (PII Masking): 遵循 GDPR 規範的自動化個資保護。
  4. 多租戶分流 (Tenant Context): 自動根據租戶路由資料庫連線與快取。
  5. 韌性通訊 (Resilience): 內建 Polly 重試與熔斷機制。
  6. 全域觀測性 (Observability): OpenTelemetry 貫穿的 TraceId 鏈路追蹤。

🛠️ 快速開始 (Quick Start)

1. 環境需求

  • .NET 10 SDK
  • Redis 7.0+
  • SQL Server 2022+ / PostgreSQL 15+

2. 初始化開發環境

# 1. 還原套件
dotnet restore

# 2. 安裝 Git Hooks (Husky)
dotnet tool restore
dotnet husky install

# 3. 建立測試專案與環境 (選用)
powershell ./docs/scripts/setup-tests.ps1

3. 啟動 WebApi

dotnet run --project CoreMiddleware.WebApi

📚 技術文檔

詳細的文件請參考 docs/ 目錄:


最後更新時間:2026-03-31

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CoreMiddleware.Core:

Package Downloads
CoreMiddleware.Application

Application layer for CoreMiddleware — CQRS service contracts, error-code localization, and application-level DI extensions for B2B SaaS platform development.

CoreMiddleware.Infrastructure

Infrastructure implementations for CoreMiddleware — EF Core repositories, Redis caching, JWT/OIDC auth, RabbitMQ messaging, AWS Cognito integration, rate limiting, and ASP.NET Core middleware for B2B SaaS platform development.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.2 117 5/4/2026
1.1.1 108 5/4/2026
1.1.0 124 4/29/2026
1.0.0 127 4/28/2026