Skip to content

Architecture

Principles

  • Dependency inversion: Core defines interfaces; Infrastructure and Application implement or consume them.
  • Testable Core: *.Core avoids MAUI assemblies so view models and services run on plain net9.0 / net10.0 in tests.
  • Prefer framework APIs: Use ILogger<T>, IStringLocalizer<T>, MAUI SecureStorage / Preferences, Connectivity, etc. where stable — wrap only what is hard to test (e.g. IDialogService for DisplayAlert).
  • CPM: Central Package Management in Directory.Packages.props; MAUI package versions follow $(MauiVersion) from the workload.

Layer diagram

See the template repo for the full diagram and responsibilities: docs/architecture.md.

Composition vs backend templates

Backend (ConnectSoft.BaseTemplate) Mobile (ConnectSoft.MauiBaseTemplate)
ASP.NET Core microservice kernel .NET MAUI multi-head app kernel
Layer 3 templates use base-template/ submodule Standalone repo today; future extended mobile templates could submodule this kernel
Web DI stack (ApplicationModel / MicroserviceRegistrationBase) MauiProgram.cs host builder

Pair mobile apps with Identity, API Gateway, and Microservice templates for APIs and auth — not by sharing the same Git submodule, but by contracts (OpenAPI, OIDC, tenant headers).