:feature:attachment ──────┐
:feature:compose ─────────┤
:feature:detail ──────────┤
:feature:inbox ───────────┤
:feature:settings ────────┤
:feature:auth ────────────┤
├──> :core:data ──> :core:database ──> :core:model
│ │ │
│ └──> :core:network ─────────────────┤
│ └──> :core:pgp ─────────────────────┤
│
:app ─────────────────────┴──> :core:designsystem ──> :core:model :core:model — Pure libraryEmail, EmailThread, EmailAttachment, EmailEvent, AppConfig, InboxTab, StringUtils, EmailHtmlSafety.:core:designsystem — Theme + componentskotlin.compose plugin, no KSP/Hilt).MonoMailTheme, Color, Type, shape, FontFamilies, Animations.SlideSheet, AvatarCircle, BlurredModalOverlay, EmptyStateView, ShimmerEffect, etc.:core:database — Room + SQLCipherAppDatabase (Room + SQLCipher), all entities, DAOs, Converters, migrations.:core:network — Retrofit + providersGmailApi, OutlookApi).GmailProvider, OutlookProvider, ImapProvider).EmailProvider interface, ProviderModels, ProviderExceptions.RetrofitClient factory with auth interceptor.:core:data — Repository layerEmailRepository — central data access, bridges providers ↔ Room.auth/ — AuthManager, AccountManager, MicrosoftAuthManager, UserProfile, GoogleAuthHelper.settings/SettingsDataStore — all app settings.push/PushNotificationManager — interface + flavor-specific impls.worker/ — EmailSyncWorker, ScheduledSendWorker, NotificationActionReceiver.attachment/AttachmentCacheManager — temp file caching.:core:pgp — Encryption enginePgpManager (encrypt/decrypt/sign), PgpKeyManager (key lifecycle), PgpKeyStorage (file+prefs persistence).SecurityUtil — AES-GCM via Android KeyStore.:feature:* modules — Feature screens:core:data and :core:designsystem.:app via NavGraph.kt.Every module has a distribution flavor dimension with github and playstore variants:
buildConfigField can expose flavor-specific values.:app consumes the correct variant of each module automatically based on its own flavor.Flavor-specific code lives in src/{flavor}/java/ within the module:
:core:data/src/
main/java/.../auth/GoogleAuthHelper.kt // interface
github/java/.../auth/GoogleAuthHelperImpl.kt // no-op
playstore/java/.../auth/GoogleAuthHelperImpl.kt // real implementation