How collection-of-things/emc2 works
Emc² is a cross-platform email client that combines accounts in one inbox, with optional calendar/workspace and AI features. The main workflow is: connect an account, load and organize mail in the client, then search, read, compose, and send; the local service handles API requests and provider access. The graph includes documented capabilities whose implementation was not sampled, but omits unverified internal wiring. Dashed edges mark optional or incompletely evidenced paths.
Main entry points: App.tsx Client interface · index.ts HTTP service · mail-ui.ts Mail navigation · api.ts Renderer API
Components 24
Mail client
- Client interface
src/App.tsx - Mail navigation
src/mail-ui.ts - Compose and drafts
src/compose/draft-session.ts - Client preferences
src/settings/SettingsPage.tsx - Privacy display
src/ui/Privacy.tsx - Renderer API
src/api.ts - Notifications
src/notifications.ts - Notification rules
shared/notifications.ts - Appearance and themes
src/appearance.ts - Keyboard and mouse
src/interaction.ts - Desktop runtime
desktop/main.ts - Android client
android/app/src/main/java/dev/emc2/android/MainActivity.java
Local mail service
- HTTP service
server/index.ts
Mail and accounts
- Mail providers
server/providers.ts - Encrypted mail store
server/store.ts - Mail preferences
shared/mail-features.ts - Inbox categories
shared/inbox-tabs.ts
Workspace features
- Workspace data
shared/workspace.ts - Calendar and events
server/calendar.ts - Contact management
server/contacts.ts
Optional integrations
- AI sorting and replies
server/agent-provider.ts - Scoped MCP access
server/mcp.ts - Workspace backups
server/workspace-backup.ts
Other components
- User
Connections 21
- User → Client interface: uses
- Client interface → Renderer API: requests data
src/App.tsx - Renderer API → HTTP service: calls service
- HTTP service → Mail providers: syncs accounts
server/index.ts - HTTP service → Encrypted mail store: reads mail
server/index.ts - Mail providers → Encrypted mail store: caches mail
- Client interface → Mail navigation: shows inbox
src/App.tsx - Client interface → Compose and drafts: manages drafts
src/App.tsx - Mail navigation → Inbox categories: uses categories
src/mail-ui.ts - Client preferences → Mail preferences: configures compose
src/settings/SettingsPage.tsx - Client interface → Privacy display: applies privacy
src/App.tsx - User → Contact management: imports contacts
- User → Calendar and events: uses calendar
- User → AI sorting and replies: enables AI
- User → Scoped MCP access: grants permissions
- User → Workspace backups: backs up workspace
- Notifications → Notification rules: uses preferences
src/notifications.ts - Client interface → Appearance and themes: configures appearance
src/App.tsx - Client interface → Keyboard and mouse: handles input
src/App.tsx - Desktop runtime → HTTP service: starts service
desktop/main.ts - User → Android client: uses client