CoreMiddleware.Infrastructure
1.1.2
dotnet add package CoreMiddleware.Infrastructure --version 1.1.2
NuGet\Install-Package CoreMiddleware.Infrastructure -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.Infrastructure" Version="1.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreMiddleware.Infrastructure" Version="1.1.2" />
<PackageReference Include="CoreMiddleware.Infrastructure" />
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.Infrastructure --version 1.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CoreMiddleware.Infrastructure, 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.Infrastructure@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.Infrastructure&version=1.1.2
#tool nuget:?package=CoreMiddleware.Infrastructure&version=1.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Core Middleware 核心中項框架 (Core Middleware Framework)
致力於提供 B2B SaaS 平台開發者一致、安全、且具備高度擴展性的底層架構 SDK。
🚀 專案導覽
本專案採用 Clean Architecture 與 Domain-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 品質管理配置
🏗️ 技術架構
本框架收斂了以下企業級關鍵技術:
- 全域冪等性 (Idempotency): 確保 API 不因重試而重複執行。
- 交易訊息保證 (Transactional Outbox): 解決分散式環境下的資料一致性問題。
- 動態個資遮蔽 (PII Masking): 遵循 GDPR 規範的自動化個資保護。
- 多租戶分流 (Tenant Context): 自動根據租戶路由資料庫連線與快取。
- 韌性通訊 (Resilience): 內建 Polly 重試與熔斷機制。
- 全域觀測性 (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/ 目錄:
- 開發者指南 (DEVELOPER_GUIDE.md)
- 產品需求 (01_core_middleware_prd.md)
- 核心邏輯 (03_core_middleware_sd_logic.md)
- 實作細節 (04_core_middleware_sd_impl.md)
最後更新時間:2026-03-31
| Product | Versions 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.
-
net10.0
- Ardalis.Specification (>= 8.0.0)
- Ardalis.Specification.EntityFrameworkCore (>= 8.0.0)
- AWSSDK.CognitoIdentityProvider (>= 3.7.505.11)
- BCrypt.Net-Next (>= 4.0.3)
- CoreMiddleware.Application (>= 1.1.2)
- CoreMiddleware.Core (>= 1.1.2)
- Dapper (>= 2.1.72)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 10.0.7)
- Microsoft.EntityFrameworkCore (>= 10.0.7)
- Microsoft.Extensions.Http.Resilience (>= 10.1.0)
- Microsoft.IdentityModel.JsonWebTokens (>= 8.1.2)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.1)
- Polly (>= 8.6.6)
- RabbitMQ.Client (>= 7.2.1)
- Scrutor (>= 5.0.2)
- StackExchange.Redis (>= 2.12.14)
- Swashbuckle.AspNetCore (>= 6.5.0)
- System.IdentityModel.Tokens.Jwt (>= 8.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.