tractatus/src/routes
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
..
admin.routes.js feat(content): add framework-guided blog pre-publication and comment analysis 2025-10-27 19:45:43 +13:00
analytics.routes.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
audit.routes.js feat(research): add cross-environment audit log sync infrastructure 2025-10-27 12:11:16 +13:00
auth.routes.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
blog.routes.js feat(content): add framework-guided blog pre-publication and comment analysis 2025-10-27 19:45:43 +13:00
calendar.routes.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
cases.routes.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
contact.routes.js feat(crm): implement unified contact form system 2025-10-24 16:56:21 +13:00
crm.routes.js feat(crm): complete Phase 3 multi-project CRM + critical bug fixes 2025-10-24 18:10:14 +13:00
demo.routes.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
diskMetrics.routes.js feat: add disk monitoring system for dev and production 2025-10-29 11:53:55 +13:00
documents.routes.js feat(docs): intelligent section recategorization + i18n infrastructure 2025-10-26 00:48:27 +13:00
feedback.routes.js feat: Complete Phase 2 - Agent Lightning integration and Discord community launch 2025-11-03 12:52:26 +13:00
governance.routes.js feat(infra): semantic versioning and systemd service implementation 2025-10-09 09:16:22 +13:00
hooks-metrics.routes.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
inbox.routes.js feat(crm): complete Phase 3 multi-project CRM + critical bug fixes 2025-10-24 18:10:14 +13:00
index.js feat: Complete Phase 2 Agent Lightning website integration 2025-11-03 14:38:20 +13:00
koha.routes.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
media.routes.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
missedBreach.routes.js feat(research): add missed breach tracking system for framework effectiveness measurement 2025-10-27 12:26:53 +13:00
newsletter.routes.js feat: Implement newsletter email sending functionality (Phase 3) 2025-11-04 11:32:39 +13:00
projects.routes.js feat: implement Rule Manager and Project Manager admin systems 2025-10-11 17:16:51 +13:00
publications.routes.js fix(submissions): extract data from API response wrappers 2025-10-24 16:35:10 +13:00
relationships.routes.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
research.routes.js feat(api): implement research inquiry endpoint and Umami analytics 2025-10-29 01:31:02 +13:00
rss.routes.js feat: Add comprehensive visitor retention system 2025-11-04 10:42:43 +13:00
rules.routes.js feat: implement Rule Manager and Project Manager admin systems 2025-10-11 17:16:51 +13:00
submissions.routes.js feat(translation): complete DeepL translation workflow 2025-10-24 11:22:50 +13:00
sync-health.routes.js refactor(lint): fix code style and unused variables across src/ 2025-10-24 20:15:26 +13:00
test.routes.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00