feat: implement savings milestone badges system#973
Open
Oluwasuyi-Timilehin wants to merge 2 commits into
Open
feat: implement savings milestone badges system#973Oluwasuyi-Timilehin wants to merge 2 commits into
Oluwasuyi-Timilehin wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@Oluwasuyi-Timilehin 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 #956
Implementation Complete ✅
Overview
Implemented a comprehensive badge system for savings milestones to encourage user engagement. Badges are awarded based on user achievements such as first deposits, goal completions, and streak maintenance.
Badge Taxonomy
Files Created
src/modules/badges/entities/badge.entity.ts (67 lines)
src/modules/badges/entities/user-badge.entity.ts (68 lines)
src/modules/badges/dto/badge.dto.ts (32 lines)
src/modules/badges/badges.service.ts (583 lines)
src/modules/badges/badges.controller.ts (68 lines)
src/modules/badges/badges.module.ts (18 lines)
src/modules/badges/badges.service.spec.ts (198 lines)
src/modules/badges/badges.controller.spec.ts (98 lines)
src/modules/badges/README.md (157 lines)
Files Modified
src/app.module.ts
src/modules/notifications/entities/notification.entity.ts
src/modules/notifications/entities/notification-preference.entity.ts
src/modules/notifications/notifications.service.ts
src/modules/mail/mail.service.ts
src/modules/savings/services/milestone.service.ts
Key Features
API Endpoints
GET /badges- Get all available badges with earning statusGET /badges/my- Get current user's earned badgesGET /badges/stats- Get badge statistics and breakdownPOST /badges/:id/share- Generate share token for a badgeGET /badges/shared/:token- Get shared badge by token (public)Event Integration
Database Changes
badgestable for badge definitionsuser_badgestable for tracking earned badgesTesting
Acceptance Criteria Met
✅ Design badge taxonomy
✅ Create badge earning logic
✅ Implement badge storage
✅ Add badge display API
✅ Create badge notifications
✅ Add badge sharing
#closes