Skip to content

feat: TempMail-CFW modular rebuild (Workers + D1/R2 + panel) - #1

Merged
MHDLabs merged 16 commits into
mainfrom
feat/tempmail-cfw-rebuild
Nov 6, 2026
Merged

MHDLabs merged 16 commits into
mainfrom
feat/tempmail-cfw-rebuild

Conversation

@MHDLabs

@MHDLabs MHDLabs commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Summary

Professional rebuild of TempMail-CFW on Cloudflare Workers: modular TypeScript/Hono architecture, D1 + R2 + KV, legacy API compatibility, email ingestion, admin sessions, Liquid Glass web panel, OTP extraction, optional webhooks, and scheduled cleanup.

This is a draft PR. Do not merge or deploy without explicit owner approval.

Phases completed (0–10)

Phase Focus
0–1 Repo audit, product/docs foundation
2 Architecture, API contracts, security/retention
3 Scaffolding, CI
4 Inbox engine + legacy compatibility
5 MIME, attachments, R2
6 Admin auth, rate limits, cleanup
7 Web panel (React/Vite/Tailwind)
8 OTP, webhooks, bilingual docs
9 Security polish + audit notes
10 Release checklist + this draft PR

Test plan

  • GitHub Actions: typecheck + unit tests + format
  • Operator: D1/R2/KV + Email Routing smoke (see docs/RELEASE-CHECKLIST.md)
  • Operator: web build + assets if serving the panel

Links

  • docs/RELEASE-CHECKLIST.md
  • docs/SECURITY-AUDIT.md
  • docs/README.fa.md
  • CHANGELOG.md

MHDLabs Agent added 16 commits November 6, 2026 13:44
Phase 1 deliverables: PRODUCT.md, AGENTS.md, DESIGN.md,
docs/REFERENCE-MAP.md, docs/LICENSING.md, docs/ROADMAP.md.
No runtime code changes.
Phase 2 design documents: ARCHITECTURE, API, API-COMPATIBILITY,
SECURITY, DATA-RETENTION, D1-SCHEMA draft, and initial OpenAPI.
No runtime implementation.
Phase 3: project structure, config validation, error handling,
request IDs, storage accessors, health routes, D1 migration,
Vitest tests, Prettier, and GitHub Actions CI skeleton.
Legacy inbox routes return SERVICE_UNAVAILABLE until Phase 4.
Phase 4: D1-backed inbox create/check/read/delete, token hashing,
legacy /email routes with original response shapes, and /api/v1/inboxes.
Unit tests with mocked repository layer.
Phase 5: PostalMime parsing, bounded stream read, HTML sanitize,
D1 message metadata, R2 for HTML/raw/attachments, dedup by Message-ID,
mailbox quotas, v1 message and attachment download routes.
Phase 6: PBKDF2-backed admin password verify, HttpOnly __Host-session,
login rate limits, inbox create rate limits, CSRF header for admin
mutations, cron cleanup of expired inboxes/sessions and R2 objects.
Phase 7: admin login, inbox dashboard, message preview with sandboxed
HTML iframe, theme system (system/light/dark), settings with cleanup,
API client with CSRF header, and WEB.md for local/production build.
Phase 9: full inbox purge on delete, security response headers,
legacy API contract tests, and SECURITY-AUDIT notes.
@MHDLabs
MHDLabs marked this pull request as ready for review November 6, 2026 15:59
@MHDLabs
MHDLabs merged commit 515153b into main Nov 6, 2026
2 checks passed
@MHDLabs
MHDLabs deleted the feat/tempmail-cfw-rebuild branch November 6, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant