Repository navigation
feat: email queue, security headers, feature flags, bulk operations (#515-#522) - #561
Merged
ritaifeoluwa merged 1 commit intoOct 18, 2026
Conversation
…martDropLabs#515-SmartDropLabs#522) - SmartDropLabs#515: Added emailQueue service that queues email sending through the existing jobQueue for async delivery. registerEmailHandler wires a transport (Resend/SES/etc.) and queueEmail enqueues jobs. Prevents request blocking on slow email delivery. - SmartDropLabs#516: Added securityHeaders middleware setting X-Content-Type-Options, X-Frame-Options, X-XSS-Protection, Referrer-Policy, Permissions-Policy, HSTS, and CSP on all API responses. - SmartDropLabs#517: Added featureFlags service with boolean toggles, percentage rollouts (deterministic hash bucketing), user allowlist/denylist, and environment variable initialization (FEATURE_FLAG_<NAME>). - SmartDropLabs#522: Added bulkOperations service with processBatch (concurrent per-item error handling) and bulkHandler Express middleware factory. Batch size capped at 100 items per request.
|
@oldtaker24 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #515
Closes #516
Closes #517
Closes #522
What changed
emailQueueservice that queues email sending through the existingjobQueuefor async delivery.registerEmailHandler(transport)wires a provider (Resend, SES, etc.), andqueueEmail({to, subject, html, text})enqueues jobs. Requests return immediately — no blocking on slow email delivery.securityHeadersmiddleware settingX-Content-Type-Options: nosniff,X-Frame-Options: DENY,X-XSS-Protection,Referrer-Policy: strict-origin-when-cross-origin,Permissions-Policy,Strict-Transport-Security, andContent-Security-Policyon all API responses.featureFlagsservice supporting boolean toggles, percentage rollouts (deterministic hash bucketing so the same user always gets the same result), user allowlist/denylist, and environment variable initialization (FEATURE_FLAG_<NAME>=true|false|percentage:50).bulkOperationsservice withprocessBatch(concurrent processing with per-item error handling) andbulkHandlerExpress middleware factory. Batch size capped at 100 items per request.Why
How to test
queueEmail()— returns job ID immediately. Email sent in background viajobQueue.featureFlags.isEnabled('test', { userId: 'abc' })— returns boolean based on flag config and percentage rollout.itemsarray to a bulk endpoint — returns{ total, succeeded, failed, results, errors }.