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)
| Area | Examples |
|---|---|
| Modules | IModule, IServiceRegistrar |
| Navigation | INavigationService, INavigationRegistry (surface used by modules) |
| Shell services | ILocalizationService, ISettingsService (interfaces; implementations elsewhere) |
| Search | ISearchProvider 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
- Add or extend an interface in
Mnemo.Coreif multiple implementations are plausible or you need abstraction for tests. - 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