MAD Mail - Build Status
Live mirror of what's wired vs stubbed vs pending. Updated as the project ships.
Done
Stubbed (working with mock or fallback)
Partial (env or DNS needed)
TODO
Backend
| Component | State | Notes |
| Worker entry + routing | Done | src/index.ts with /healthz, /login, /callback, /api/* |
| MAD Login OAuth (PKCE) | Partial | Code complete; needs OAuth client registered at accounts.madmonkey.media |
| Session (HMAC cookie) | Done | 14-day signed cookies; set SESSION_SIGNING_KEY for prod |
| IMAP proxy | Stubbed | Mock inbox returned. Live IMAP needs an HTTP bridge - Workers can't open raw TCP |
| SMTP send | Partial | cPanel bridge stubbed; Resend fallback ready when RESEND_API_KEY is set |
| Triad classifier | Done | Rules engine: domain + subject + header hints |
| Signup / cPanel UAPI | Partial | Calls Email::add_pop when CPANEL_API_TOKEN set; otherwise returns stub email |
| Multi-account linking | TODO | /api/account/add accepts but doesn't store credentials yet |
| Gmail unified-inbox | TODO | Needs GMAIL_OAUTH_* + Google Cloud project |
Frontend
| Component | State | Notes |
| Three-pane webmail | Done | Folder list / message list / preview with light theme default |
| Dark mode toggle | Done | Stored in localStorage, opt-in |
| Compose modal | Done | Reply / reply-all / forward prefill, Cmd+Enter to send |
| Triad tabs (Imbox / Reading Room / Receipts) | Done | Accent-blue active state per dual-token system |
| On-device AI summarize | Done | transformers.js lazy-loaded from CDN, distilbart-cnn-6-6 (~80 MB first run) |
| On-device AI smart reply | Stubbed | Template reply for now; will swap to an instruct model |
| Signup page | Done | /signup.html with tier comparison + managed-service upsell |
| Login overlay | Done | MAD Login button + magic-link placeholder |
Infra / Handoff
| Item | State | Notes |
| wrangler.toml | Partial | KV namespace IDs need wrangler kv namespace create |
| DNS: mail.madmonkey.media | TODO | Add Custom Domain in Workers dashboard |
| OAuth client at accounts.madmonkey.media | TODO | Register client_id mad-mail-webmail, redirect https://mail.madmonkey.media/callback |
| Resend domain verification | TODO | Verify madmonkey.media in Resend dashboard |
| cPanel API token | TODO | Already in .env as MAD_CPANEL_API_TOKEN; promote via wrangler secret put CPANEL_API_TOKEN |
Big known limitation: Cloudflare Workers cannot open raw outbound TCP, so they cannot speak IMAP directly. The MVP returns mock inbox data. Real mail reading needs either (a) a tiny IMAP-over-HTTP bridge on the InMotion box, or (b) standing up Stalwart / Cyrus-JMAP. The frontend, triad classifier, and AI hooks are all live and exercising the right wiring.