Cấu trúc Dự án
Kiến trúc solution, các module và middleware pipeline
Cấu trúc Dự án
uTPro tuân theo kiến trúc module hóa rõ ràng với phân tách trách nhiệm.
Yêu cầu
- .NET 10 SDK (10.0.301 trở lên)
- Database — PostgreSQL (mặc định), SQL Server hoặc SQLite
- Visual Studio 2022 (v17.12+) hoặc VS Code với C# Dev Kit
Kiến trúc Solution
uTPro/
├── Common/ # Models, constants, content types chung
├── Extension/ # Helpers tái sử dụng, site context
├── Foundation/ # Hạ tầng (middleware, favicon, sitemap, robots)
├── Feature/ # Tính năng tùy chọn (dashboard, form builder)
├── Project/ # Ứng dụng web chính + cấu hình
└── uTPro.slnCấu trúc Web Project
uTPro.Project.Web/
├── Controllers/Pages/ # Sitemap, Robots, Favicon
├── Startup/ # Cấu hình khởi động (module hóa)
├── Views/ # Razor views
├── wwwroot/ # Static assets (CSS, JS, uploads)
├── Program.cs # Entry point tối giản
└── appsettings.json # Cấu hình productionProgram.cs — Entry Point Tối giản
Tất cả logic cấu hình được tổ chức thành extension methods trong thư mục Startup/.
Thứ tự Middleware Pipeline
- Forwarded Headers — rewrites client IP/scheme
- Browser Cache-Control — stale-while-revalidate
- HTTPS Redirection
- Status Code Pages — error handling
- WebOptimizer — CSS/JS minification
- Static Files — cache 1 năm cho assets
- WebMarkupMin — HTML minification + Brotli/GZip
- Output Cache — 120s TTL
- Cookie Policy
- uTPro Middleware — localization + buffering
- Umbraco Pipeline — BackOffice + routing + security headers
- MapControllers — MVC routing
Technology Stack
| Thành phần | Phiên bản |
|---|---|
| Umbraco CMS | 17.5.3 |
| .NET | 10.0 |
| BlockPreview | 5.4.3 |
| SeoVisualizer | 17.0.0 |
| uSync | 17.3.6 |
| WebOptimizer | 3.0.477 |
| WebMarkupMin | 2.22.0 |
| PostgreSql | 17.5.0 |