How linagora/tmail-flutter works
Twake Mail is a cross-platform JMAP email client. The README describes reading and managing mail, sending, searching, and mobile/web clients, but the supplied tree omits the main Flutter application, so its UI and most mail-operation wiring cannot be mapped reliably. The visible iOS code supports a notification workflow: receive a push, load shared credentials, fetch email changes from JMAP, filter them, and present a notification. The graph also shows native app entry points and the web smart-banner/deep-link behavior; unsampled feature details are omitted.
Main entry points: NotificationService.swift Notification service · JmapClient.swift JMAP client · KeychainController.swift Shared sessions · AlamofireService.swift HTTP service
Components 19
Native clients
- Android host
android/app/src/main/kotlin/com/linagora/android/tmail/MainActivity.kt - iOS app
ios/Runner/AppDelegate.swift - Share extension
ios/TeamMailShareExtension/ShareViewController.swift
Push notifications
- Notification service
ios/TwakeMailNSE/NotificationService.swift - Shared sessions
ios/TwakeMailNSE/Keychain/KeychainController.swift - Session model
ios/TwakeMailNSE/Model/KeychainSharingSession.swift - Push parser
ios/TwakeMailNSE/Utils/PayloadParser.swift - NSE diagnostics
ios/TwakeMailNSE/Utils/SentryManager.swift
JMAP networking
- JMAP client
ios/TwakeCore/Jmap/JmapClient.swift - Request generator
ios/TwakeCore/Jmap/Utils/JmapRequestGenerator.swift - HTTP service
ios/TwakeCore/Network/AlamofireService.swift - Auth interceptor
ios/TwakeCore/Network/Interceptor/AuthenticationInterceptor.swift - Token refresh
ios/TwakeCore/Network/TokenRefreshManager.swift - Email model
ios/TwakeCore/Jmap/Model/Email/Email.swift
Web entry
- Web banner
web/worker_service/worker_service.js
Other components
- Mail user
- App stores
- JMAP server
- OIDC token endpoint
Connections 21
- Mail user → Android host: uses
- Mail user → iOS app: uses
- Mail user → Share extension: shares content
- Mail user → Web banner: opens webmail
- Web banner → iOS app: opens deep link
- Web banner → App stores: fallback redirects
- Notification service → Shared sessions: loads sessions
- Shared sessions → Session model: decodes
- Notification service → Push parser: parses push
- Notification service → NSE diagnostics: reports events
- NSE diagnostics → Shared sessions: loads config
- Notification service → JMAP client: fetches changes
- Notification service → Shared sessions: updates delivery state
- JMAP client → Request generator: builds request
- JMAP client → Auth interceptor: configures authentication
- JMAP client → HTTP service: posts request
- HTTP service → JMAP server: sends JMAP
- HTTP service → Auth interceptor: applies interceptor
- JMAP client → Email model: parses results
- Auth interceptor → Token refresh: refreshes credentials
- Token refresh → OIDC token endpoint: requests token