Back to results for “Architecture”
.NET MAUI › Best Practices & Architecture

How should you organize code in a MAUI project?

Intermediate

Answer

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.cs
Real-world example Grouping each feature's view, view model, and services together makes navigation and ownership clear as the app grows.

Common follow-ups: Feature folders vs layered folders? | Why extract a core library?