tractatus/src
TheFlow 8732e6caf8 feat: Migrate from SendGrid to ProtonBridge for email sending
Complete migration to ProtonBridge following proven family-history architecture:

Backend Changes:
- Replace @sendgrid/mail with nodemailer
- Refactor EmailService for ProtonBridge/SMTP
- Add smart port detection (1026 prod, 1025 dev)
- Implement connection pooling and rate limiting
- Add EMAIL_ENABLED flag for dev/prod separation
- Add checkConnection() method for health checks

Email Service Features:
- Localhost-only SMTP (127.0.0.1)
- Automatic production/development port detection
- Connection verification on initialization
- Connection pooling (max 5 connections)
- Rate limiting (10 messages/second)
- Graceful fallback when email disabled

Documentation:
- Complete ProtonBridge setup guide (VPS installation)
- Quick start guide (30-minute setup)
- Systemd service file template
- Environment variable configuration
- Troubleshooting guide
- Migration notes from SendGrid

Architecture Benefits:
- Privacy-focused (end-to-end encrypted via Proton)
- Self-hosted bridge on VPS (no third-party API)
- Validated in production (family-history: 3+ months, 315+ restarts)
- Cost-effective (Proton paid account ~$4/month)
- No external dependencies (localhost SMTP)

Next Steps:
1. Install ProtonBridge on production VPS
2. Update production .env with Bridge credentials
3. Deploy email service changes
4. Test newsletter sending

See docs/PROTONBRIDGE_QUICKSTART.md for deployment guide

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 12:02:17 +13:00
..
config chore: add optimal submission timing to publication targets config 2025-10-26 11:34:27 +13:00
controllers feat: Implement newsletter email sending functionality (Phase 3) 2025-11-04 11:32:39 +13:00
middleware docs(auth): add RBAC explanation to requireRole middleware 2025-10-28 12:44:56 +13:00
models feat: Implement newsletter email sending functionality (Phase 3) 2025-11-04 11:32:39 +13:00
routes feat: Implement newsletter email sending functionality (Phase 3) 2025-11-04 11:32:39 +13:00
services feat: Migrate from SendGrid to ProtonBridge for email sending 2025-11-04 12:02:17 +13:00
utils feat(security): implement attack surface exposure prevention (inst_084) 2025-10-27 12:11:43 +13:00
server.js feat: Add comprehensive visitor retention system 2025-11-04 10:42:43 +13:00