Skip to content

feat: vault simulation and comprehensive notification system#627

Open
Akanimoh12 wants to merge 1 commit into
code-flexing:mainfrom
Akanimoh12:feat/notifications-and-vault-simulation
Open

feat: vault simulation and comprehensive notification system#627
Akanimoh12 wants to merge 1 commit into
code-flexing:mainfrom
Akanimoh12:feat/notifications-and-vault-simulation

Conversation

@Akanimoh12

@Akanimoh12 Akanimoh12 commented Jun 29, 2026

Copy link
Copy Markdown

Implements vault simulation endpoints and complete notification system with email templating, SMS support, and preference center. Closes #511, Closes #512, Closes #513, Closes #514.

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

@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
@Akanimoh12 Akanimoh12 force-pushed the feat/notifications-and-vault-simulation branch from a82e466 to ad5fcd4 Compare June 29, 2026 21:12
@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant