How aris-code-0/mailroom works
Mailroom is a self-hosted email client: a user signs in to an Expo app, reads and manages mail, and composes messages; the app talks to a local Node backend that synchronizes with Resend and stores mail locally in SQLite. The backend also supports drafts, settings, domains, and attachment caching. The excerpts show the app’s API client, backend composition, persistence helpers, and provider calls; some feature links below rely on the README because their route implementations were not fully sampled.
Main entry points: App.tsx Mail workspace · app.mjs API and mail workflows · index.mjs Sync scheduler · api.ts API client
Components 12
Mail client
- Mail workspace
App.tsx - Composer and settings
src/Composer.tsx - API client
src/api.ts - UI components
src/ui.tsx - UI styles
src/styles.ts
Mail service
- API and mail workflows
server/app.mjs - Sync scheduler
server/index.mjs
Local data
- Mail store
server/store.mjs - SQLite database
Email provider
- Resend adapter
server/provider.mjs - Resend API
Other components
- Mail user
Connections 15
- Mail user → Mail workspace: uses
README.md - Mail workspace → API client: requests
App.tsx - Mail workspace → Composer and settings: opens
App.tsx - Mail workspace → UI components: renders
App.tsx - Mail workspace → UI styles: styles with
App.tsx - Composer and settings → API client: saves and sends
src/Composer.tsx - Sync scheduler → API and mail workflows: creates
server/index.mjs - Sync scheduler → Mail store: creates
server/index.mjs - Sync scheduler → Resend adapter: creates
server/index.mjs - API client → API and mail workflows: calls API
README.md - API and mail workflows → Mail store: reads and writes
server/app.mjs - API and mail workflows → Resend adapter: fetches and sends
server/app.mjs - Mail store → SQLite database: persists mail
README.md - Resend adapter → Resend API: calls
server/provider.mjs - API and mail workflows → Mail user: authenticates