.NET MAUI › Best Practices & Architecture
How should you organize code in a MAUI project?
IntermediateAnswer
Use feature folders (or layered folders: Views, ViewModels, Services, Models) and consider separate class libraries for domain/core and infrastructure so logic is reusable and testable. Keep the MAUI head focused on UI. Group platform code under Platforms and shared resources under Resources.
/Features/Orders/OrdersPage.xaml
/Features/Orders/OrdersViewModel.cs
/Core/Services/IOrderService.cs
/Infrastructure/Api/OrderApiClient.csReal-world example Grouping each feature's view, view model, and services together makes navigation and ownership clear as the app grows.