Skip to main content

Core layer

Purpose

Mnemo.Core holds shared contracts (interfaces), domain models, and enums used by Infrastructure and UI. It stays free of Avalonia, SQLite drivers, and concrete AI stacks so tests and alternative hosts can reference it cheaply.

Code location

  • Mnemo.Core/ — projects split by area (Models, Services, etc.).

Main interfaces / classes (representative)

AreaExamples
ModulesIModule, IServiceRegistrar
NavigationINavigationService, INavigationRegistry (surface used by modules)
Shell servicesILocalizationService, ISettingsService (interfaces; implementations elsewhere)
SearchISearchProvider and related contracts

Browse Mnemo.Core/Services for the authoritative list.

Startup / registration

Core types do not self-register. Bootstrapper in UI registers implementations that satisfy Core interfaces.

How to extend

  1. Add or extend an interface in Mnemo.Core if multiple implementations are plausible or you need abstraction for tests.
  2. Keep DTOs and enums close to the feature domain in Mnemo.Core/Models.

Gotchas

  • Do not add package references that drag UI or database drivers into Core.
  • Avoid fat interfaces that force every consumer to depend on unrelated methods—split by role.

Related: Infrastructure, Dependency injection