Apply Hexagonal Architecture (Ports & Adapters) to design a multi-channel notification system that is fully decoupled from infrastructure.
Define the domain core: Notification, Template, UserPreferences, DeliveryAttempt. Specify the primary port (NotificationUseCase interface called by API/workers) and secondary ports (NotificationChannel, TemplateRepository, PreferenceRepository). No infrastructure types should appear in the domain.