How do you structure a large, enterprise MAUI solution?
Short answer
Separate concerns into projects: the MAUI head (UI, pages, view models), a shared domain/core library (models, services, interfaces), infrastructure (data, API clients), and a test project. Use DI throughout, MVVM with compiled bindings, and feature folders.
Advertisement
AModel answer
Separate concerns into projects: the MAUI head (UI, pages, view models), a shared domain/core library (models, services, interfaces), infrastructure (data, API clients), and a test project. Use DI throughout, MVVM with compiled bindings, and feature folders. Keep platform code isolated behind interfaces so the core stays portable and testable.
Example
MyApp.sln ├─ MyApp.Maui (UI, ViewModels) ├─ MyApp.Core (Models, Interfaces, Services) ├─ MyApp.Infrastructure (Api, Sqlite) └─ MyApp.Tests (xUnit)
Real-world example
A large team keeps business logic in MyApp.Core so it's shared, unit-tested, and independent of the MAUI UI.
Likely follow-ups
- Why isolate platform code behind interfaces? | Where does business logic live?
Related topics