How eppie-io/eppie-app works
<explanation>
1. Identify the project type and purpose
- Eppie is an open‑source, multi‑platform email client built in C# using the Uno Platform.
- It currently functions as a conventional IMAP/SMTP/Proton Mail client with PGP and seed‑phrase backup, and will later incorporate encrypted p2p networks (IPFS, SBBS).
2. Analyze the file structure
- Top‑level directories:
• src/Eppie.App – the main solution, includes UI, Shared code, ViewModels, Services, Authorization, and platform‑specific projects.
• src/Tests – unit tests for the ViewModels.
- Architectural pattern: MVVM (Views in Eppie.App.Shared UI, ViewModels in Eppie.App.ViewModels, Services in Eppie.App.Shared/Services).
- Platform targets: UWP, WinAppSDK, WebAssembly, Android, iOS, MacCatalyst, Desktop via Uno.
- Config and CI: .github workflows, Directory.Build.props/targets, global.json.
3. README insights
- Client‑only architecture: no central server.
- Future p2p modules to plug into network/storage layers.
- Uses OAuth2 for Proton authentication, PGP/ECC for encryption, BIP39 for seed phrases.
4. Main components and interactions for the diagram
a. Components:
• Presentation Layer:
– UI Shared (XAML Views & Controls)
– Platform‑specific UI Hosts (UWP, Uno WASM, Android, iOS, MacCatalyst, Desktop)
• Presentation Logic: ViewModels (Eppie.App.ViewModels)
• Domain/Service Layer:
– Services (AIService, MessageService, FileOperationProvider, LocalSettingsService, AuthorizationProvider/OAuth2, PGP Manager)
• Data Layer:
– Local Encrypted Store (seed‑phrase backup, local database/files)
– Settings and credentials (appsettings.json, LocalSettingsService)
• Network/Protocol Layer:
– IMAP/SMTP client adapters
– Proton OAuth2 module
– Future p2p transports (SBBS) & storage (IPFS)
• External Systems:
– IMAP/SMTP Servers (Gmail, Outlook, Proton)
– Proton Mail API
– (Future) IPFS nodes, SBBS bulletin board
b. Relationships & Data flows:
• UI ←→ ViewModels (two‑way binding)
• ViewModels → Services (async calls)
• Services → Network Layer (protocol adapters) and Data Layer (local store)
• AuthorizationProvider → Token store → Network calls
• PGP Manager ↔ Services (MessageService) for encrypt/decrypt
• AIService ↔ GenAIModel for local AI assistant
• App startup reads appsettings.json → configures services/container
c. Architectural patterns & principles:
• MVVM for UI separation
• Dependency Injection via Directory.Build.props and Uno host
• Modular service abstractions (interfaces in ViewModels.Services and implementations in Shared/Services)
• Platform‑agnostic Shared code, platform projects only supply hosting and native APIs
• Pluggable transport/storage modules
d. Key technologies/frameworks:
• Uno Platform (cross‑platform XAML/C#)
• .NET 6+ with global.json
• OAuth2 module (Eppie.Authorization.OAuth2)
• PGP/ECC via internal utilities
• BIP39 Seed via GenAIModel Utils (temporary)
• CI/CD via GitHub Actions
5. Tailoring the diagram to this client‑tool type
- Highlight core functionality: message composition, encryption, network protocols, local storage.
- Show extensibility points: where a new transport (SBBS) or storage (IPFS) plugs in.
- Emphasize the MVVM boundary and platform‑specific hosts → Shared UI/Logic → Services → Protocol modules.
6. Diagram guidelines
- Labels: clearly name each box (e.g., “ViewModels”, “IMAP Adapter”, “LocalStore”).
- Arrows: directional, show UI→ViewModel data binding, Service→Network calls, Service→Data access.
- Color/shape coding:
• Blue boxes for UI and ViewModels
• Green for Services and business logic
• Orange for protocol/network adapters
• Gray for external systems (IMAP/SMTP Servers, IPFS nodes)
- Group platform projects in a “Platform Hosts” swimlane.
7. Detailed breakdown to include
- UI layer subdivided into Shared Controls and Platform Hosts.
- MVVM binding → ViewModels layer.
- Service interfaces vs implementations.
- Data layer: LocalSettingsService, Encrypted Backup.
- Network layer abstraction with current (IMAP/SMTP, Proton OAuth2) and future (P2P transport, decentralized storage).
- AIService and GenAIModel as an ancillary module.
- External dependencies: OAuth2 provider, PGP keys module.
By following these guidelines and mapping each folder/project in the file structure to a component in your diagram, you will produce a clear, accurate architecture overview that captures both current functionality and future extensibility of Eppie.