How zidan44/mailcraft works
MailCraft is a local-first email client for desktop, CLI, and browser, with offline mail, calendar and people features, and command-driven actions. The main workflow runs from user commands or the UI through an engine session, which queues account work for network workers; synchronized mail is kept in the local store and rendered by the UI. The README documents broad protocol and product capabilities; source excerpts and the index support selected internal links. Some feature implementations were not sampled, so those links are documentation-based rather than claims of inspected call sites.
Main entry points: session.rs Engine session · main.rs Browser app · worker.rs Account workers · actions.rs Mail UI
Components 26
User experience
- Desktop app
apps/mailcraft/src/main.rs - Browser app
apps/mailcraft-web/src/main.rs - CLI
apps/mailcraft-cli/src/main.rs - Mail UI
crates/ui-egui/src/app/actions.rs - Ribbon
crates/ui-egui/src/app/ribbon.rs - Desktop tray
apps/mailcraft/src/desktop/tray.rs
Commands and session
- Command registry
crates/engine/src/cmd.rs - Engine session
crates/engine/src/session.rs - Calendar and people
crates/engine/src/session/pim.rs - Task reminders
crates/engine/src/session/pim/reminders.rs
Mail data and search
- Local mail store
crates/store/src/lib.rs - Offline search
crates/store/src/search/format.rs - Search language
crates/model/src/search.rs - Message reading and writing
crates/mime/src/html.rs - Browser cache
apps/mailcraft-web/src/idb.rs
Sync and accounts
- Account workers
crates/net/src/worker.rs - Mail sync
crates/net/src/worker/sync.rs - Mail import
crates/net/src/worker/imports.rs - Mail protocols
crates/net/src/protocols.rs - JMAP transport
crates/jmap/src/lib.rs - Browser backend
apps/mailcraft-web/src/backend.rs - Browser fetch
apps/mailcraft-web/src/fetch.rs
Extended capabilities
- PST support
crates/pst/src/lib.rs - Message security
crates/smime/src/lib.rs - Print and PDF
crates/print/src/lib.rs
Other components
- User
Connections 29
- User → Desktop app: opens
- User → CLI: runs commands
- User → Browser app: opens
- Desktop app → Mail UI: starts
- Browser app → Mail UI: runs same UI
apps/mailcraft-web/src/main.rs - User → Mail UI: uses
- Ribbon → Command registry: runs actions
- CLI → Command registry: runs actions
- Command registry → Engine session: dispatches
crates/engine/src/session.rs - Engine session → Account workers: queues jobs
crates/engine/src/session.rs - Account workers → Mail sync: dispatches sync
crates/net/src/worker.rs - Account workers → Mail import: dispatches imports
crates/net/src/worker.rs - Mail sync → Mail protocols: syncs accounts
- Mail sync → JMAP transport: uses JMAP
- Account workers → Local mail store: updates local mail
- Engine session → Local mail store: reads cached mail
- Engine session → Offline search: searches offline
- Offline search → Search language: indexes queries
- Engine session → Message reading and writing: reads and builds messages
crates/engine/src/session.rs - Engine session → Calendar and people: manages PIM
crates/engine/src/session/pim.rs - Calendar and people → Task reminders: handles reminders
crates/engine/src/session/pim.rs - Browser app → Browser backend: starts backend
apps/mailcraft-web/src/main.rs - Browser backend → Browser fetch: fetches requests
apps/mailcraft-web/src/backend.rs - Browser backend → Browser cache: persists browser data
apps/mailcraft-web/src/backend.rs - Browser app → Browser cache: keeps cache
apps/mailcraft-web/src/main.rs - Engine session → PST support: opens and exports PST
- Engine session → Message security: signs and encrypts
- Mail UI → Print and PDF: prints and saves PDF
- Desktop app → Desktop tray: uses tray