AppClientBase - .NET MAUI Enterprise Base App
Base frontend application cho iOS và Android được xây dựng với .NET MAUI theo chuẩn Enterprise.
Tech Stack
- .NET 10 MAUI - Cross-platform framework
- CommunityToolkit.Mvvm 8.4.0 - MVVM implementation
- CommunityToolkit.Maui 9.1.0 - MAUI extensions
Project Structure
AppClientBase/
├── MauiProgram.cs # DI & configuration
├── App.xaml # Application resources
├── AppShell.xaml # Navigation shell
├── ViewModels/ # MVVM ViewModels
│ ├── BaseViewModel.cs # Base với IsBusy, Title
│ └── MainViewModel.cs # Main page ViewModel
├── Views/ # XAML Pages
│ └── MainPage.xaml # Main page với compiled bindings
├── Services/ # Business services
│ ├── INavigationService.cs # Navigation interface
│ ├── NavigationService.cs # Shell navigation
│ ├── ISettingsService.cs # Settings interface
│ └── SettingsService.cs # MAUI Preferences wrapper
├── Models/ # Data models
├── Resources/
│ └── Styles/
│ ├── Colors.xaml # Brand, Semantic, Surface colors
│ ├── Typography.xaml # Font families, sizes, text styles
│ ├── Theme.xaml # Button, Entry, Card styles
│ └── Styles.xaml # Template implicit styles
└── Platforms/ # Platform-specific code
├── Android/
└── iOS/
Features
MVVM + Dependency Injection
- Constructor injection qua DI container
- Singleton cho stateful services (NavigationService, SettingsService)
- Transient cho ViewModels và Views
Branding System
- Colors.xaml: Light/Dark colors riêng biệt
- Typography.xaml: Font scale (Caption → Display)
- Theme.xaml: ButtonPrimary, ButtonSecondary, CardDefault styles
- AppThemeBinding cho Light/Dark mode support
Compiled Bindings
x:DataTypecho performance tối ưu- Compile-time binding validation
Getting Started
# Navigate to project
cd apps/app-client-base
# Restore packages
dotnet restore
# Build for macCatalyst
dotnet build -c Debug -f net10.0-maccatalyst
# Build for iOS (requires Xcode with iOS simulator)
dotnet build -c Debug -f net10.0-ios
# Build for Android (requires Android SDK)
dotnet build -c Debug -f net10.0-android
Requirements
- .NET 10 SDK
- MAUI workload (
dotnet workload install maui) - For iOS: macOS with Xcode
- For Android: Android SDK
Related Skills
Xem các MAUI Skills để hiểu thêm về patterns được sử dụng:
.agent/skills/maui-enterprise-architect/SKILL.md.agent/skills/maui-branding-expert/SKILL.md