chore: newsletter e2e implementation #450
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✉️ Newsletter Subscription System (Double Opt-In)
Overview
This PR introduces a production-ready newsletter subscription system with double opt-in, secure unsubscribe flow, and admin visibility. The implementation aligns backend APIs with the existing frontend newsletter component and follows best practices for security, validation, and extensibility.
Related Issue
Closes #442
✨ Features
Public Newsletter Flow
POST
/newsletter/subscribePENDINGstateverificationToken(confirm subscription)unsubscribeToken(future opt-out)POST
/newsletter/confirmPOST
/newsletter/unsubscribeAdmin Functionality
/newsletter/subscribers🧱 Technical Details
Backend (NestJS)
NewsletterSubscriberentity with:subscribedAt,verifiedAt)consentedAt,ipAddress)@Public()for open routesFrontend (Next.js)
/newsletter/confirmpage🔐 Security & Validation
🧪 Testing
📌 Notes / Future Improvements
✅ Checklist