How proverbiallemon/emdash-inbox works
Emdash Inbox is an EmDash admin mailbox for site email: operators browse conversations, manage message state, compose or reply, and track delivery. Inbound email is authenticated and parsed into mailbox records; outbound sends are journaled before provider delivery so recovery can project accepted sends without resending. The UI also exposes private attachment handling and bundle operations, while native MCP provides a tool interface to mailbox actions. The sampled excerpts show key route and client behavior; some UI and bundle wiring is inferred only where documented or directly evidenced.
Main entry points: index.ts Plugin routes · inboxMcpHandlers.ts MCP handlers · composeOps.ts Compose operations · admin.tsx Admin entry
Components 24
Admin mailbox
- Admin entry
src/admin.tsx - Inbox views
src/components - Thread views
src/components - Compose editor
src/components/ComposeView.tsx - Attachment client
src/lib/attachmentClient.ts - Bundle inbox
src/daylight/BundleInbox.tsx
Plugin interfaces
- Plugin routes
src/index.ts - MCP handlers
src/lib/inboxMcpHandlers.ts - Native MCP setup
src/lib/nativeMcp.ts
Mail lifecycle
- Inbound admission
src/index.ts - MIME parser
src/lib/mimeParser.ts - Compose operations
src/lib/composeOps.ts - Delivery provider
src/lib/providerDelivery.ts
Mailbox state
- Mailbox store
src/lib/mailboxStore.ts - Delivery journal
src/lib/deliveryJournal.ts - Attachment storage
src/lib/attachments.ts
Tools and operations
- Bundle operation client
src/daylight/bundleClient.ts - Bundle operations
src/lib/bundleOperations.ts - Bundle state
src/lib/bundleStore.ts
Other components
- Mailbox operator
- Email Sending binding
- Inbound sidecar
- Private R2 bucket
- MCP client
Connections 30
- Mailbox operator → Admin entry: opens
- Admin entry → Inbox views: renders
- Admin entry → Compose editor: opens compose
- Inbox views → Plugin routes: requests mailbox
- Thread views → Plugin routes: requests thread
- Compose editor → Plugin routes: saves and sends
- Compose editor → Attachment client: uploads files
- Attachment client → Plugin routes: posts attachment requests
- Plugin routes → Mailbox store: reads and mutates
- Plugin routes → Compose operations: dispatches compose
- Plugin routes → Inbound admission: dispatches inbound
- Plugin routes → Delivery journal: records and reconciles
- Inbound sidecar → Plugin routes: posts raw MIME
- Inbound admission → MIME parser: parses message
- Inbound admission → Attachment storage: stores inbound files
- Inbound admission → Mailbox store: admits message
- Compose operations → Delivery journal: records attempt
- Compose operations → Delivery provider: requests delivery
- Delivery provider → Email Sending binding: sends email
- Attachment storage → Private R2 bucket: stores private files
- Plugin routes → Attachment storage: handles file routes
- Native MCP setup → MCP handlers: registers tools
- MCP client → Native MCP setup: calls tools
- MCP handlers → Mailbox store: reads and mutates
- MCP handlers → Compose operations: dispatches compose
- MCP handlers → Delivery journal: manages delivery recovery
- Bundle inbox → Bundle operation client: starts operations
- Bundle operation client → Plugin routes: posts operation requests
- Plugin routes → Bundle operations: dispatches bundle routes
- Bundle operations → Bundle state: reads and writes