tractatus/src/services
TheFlow 32db9188ed feat: Implement newsletter email sending functionality (Phase 3)
Complete implementation of newsletter sending system with SendGrid integration:

Backend Implementation:
- EmailService class with template rendering (Handlebars)
- sendNewsletter() method with subscriber iteration
- Preview and send controller methods
- Admin routes with CSRF protection and authentication
- findByInterest() method in NewsletterSubscription model

Frontend Implementation:
- Newsletter send form with validation
- Preview functionality (opens in new window)
- Test send to single email
- Production send to all tier subscribers
- Real-time status updates

Dependencies:
- handlebars (template engine)
- @sendgrid/mail (email delivery)
- html-to-text (plain text generation)

Security:
- Admin-only routes with authentication
- CSRF protection on all POST endpoints
- Input validation and sanitization
- Confirmation dialogs for production sends

Next steps: Configure SendGrid API key in environment variables

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 11:32:39 +13:00
..
AdaptiveCommunicationOrchestrator.service.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
AnthropicMemoryClient.service.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
BlogCuration.service.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
BoundaryEnforcer.service.js feat: implement Deep Interlock coordination tracking in audit logs 2025-10-31 20:54:37 +13:00
ClaudeAPI.service.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
ClaudeMdAnalyzer.service.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
ContentAnalyzer.service.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
ContentGovernanceChecker.service.js feat(governance): extend framework checks to all external communications 2025-10-25 09:53:09 +13:00
ContentSimilarity.service.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
ContextPressureMonitor.service.js feat: implement Deep Interlock coordination tracking in audit logs 2025-10-31 20:54:37 +13:00
CrossReferenceValidator.service.js feat(framework): implement Phase 3 bidirectional communication architecture 2025-10-27 19:45:24 +13:00
DeepL.service.js fix(i18n): add axios dependency and fix DeepL API parameters 2025-10-26 00:59:05 +13:00
email.service.js feat: Implement newsletter email sending functionality (Phase 3) 2025-11-04 11:32:39 +13:00
feedback-governance.service.js feat: Complete Phase 2 - Agent Lightning integration and Discord community launch 2025-11-03 12:52:26 +13:00
index.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
InstructionPersistenceClassifier.service.js feat(blog): integrate Tractatus framework governance into blog publishing 2025-10-25 08:47:31 +13:00
koha.service.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
MediaTriage.service.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
MemoryProxy.service.js feat(research): add cross-environment audit log sync infrastructure 2025-10-27 12:11:16 +13:00
MetacognitiveVerifier.service.js feat(framework): implement Phase 3 bidirectional communication architecture 2025-10-27 19:45:24 +13:00
PluralisticDeliberationOrchestrator.service.js fix(audit): fix PluralisticDeliberationOrchestrator cultural sensitivity audit logging 2025-10-28 14:11:45 +13:00
RuleOptimizer.service.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
Translation.service.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
VariableSubstitution.service.js feat: implement Rule Manager and Project Manager admin systems 2025-10-11 17:16:51 +13:00