feat: vault simulation and comprehensive notification system#627
Open
Akanimoh12 wants to merge 1 commit into
Open
feat: vault simulation and comprehensive notification system#627Akanimoh12 wants to merge 1 commit into
Akanimoh12 wants to merge 1 commit into
Conversation
|
@Akanimoh12 is attempting to deploy a commit to the vic's projects Team on Vercel. A member of the Team first needs to authorize it. |
…e notification system - Add vault deposit and strategy change simulation endpoints (code-flexing#511, #984) * POST /vaults/:id/simulate-deposit returns expected net amount, fees, projected APY, lock expiry * POST /vaults/:id/simulate-strategy-change returns APY impact and rebalancing cost * SimulationService provides read-only transaction preview without state mutations * Results include simulatedAt timestamp for auditability - Implement email templating system with React Email components (code-flexing#512, #985) * EmailTemplatingService renders type-safe email templates * GET /admin/email-preview/:templateName provides browser preview endpoint * Email components: WelcomeEmail, DepositConfirmed, WithdrawalComplete, SecurityAlert * Both HTML and plaintext variants for all templates - Add SMS notification support for critical vault events (code-flexing#513, #986) * SMSService abstraction allows provider switching (Twilio, Africa's Talking) * Phone number verification via 6-digit OTP * POST /notifications/sms/phone-number set phone for SMS * POST /notifications/sms/verify-request request OTP * POST /notifications/sms/verify verify phone with OTP code * User entity extended with phoneNumber and phoneVerifiedAt fields - Implement notification preference center with per-event granularity (code-flexing#514, #987) * GET /notifications/preferences retrieve user notification settings * PATCH /notifications/preferences update preferences atomically * Support per-event and per-channel preferences (email, SMS, push, in-app) * Event types: depositConfirmed, withdrawalCompleted, vaultPaused, securityAlert, yieldMilestone * Default preferences applied to new users * NotificationPreferencesService checks preferences before dispatch - Add database migration for user notification fields * phoneNumber and phoneVerifiedAt columns for SMS * notificationPreferences JSONB column with sensible defaults - Add comprehensive unit tests for simulation service * Test deposit simulation with fee calculation * Test strategy change simulation with APY impact * Test error handling for missing vaults and invalid inputs
a82e466 to
ad5fcd4
Compare
|
@Akanimoh12 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.
Implements vault simulation endpoints and complete notification system with email templating, SMS support, and preference center. Closes #511, Closes #512, Closes #513, Closes #514.