Skip to content

feat/invite-friend - #209

Closed
islandbitcoin wants to merge 1 commit into
mainfrom
feat/invite-friend
Closed

islandbitcoin wants to merge 1 commit into
mainfrom
feat/invite-friend

Conversation

@islandbitcoin

Copy link
Copy Markdown
Contributor

No description provided.

@islandbitcoin
islandbitcoin requested a review from brh28 September 11, 2025 13:55
@islandbitcoin islandbitcoin self-assigned this Sep 11, 2025
@islandbitcoin islandbitcoin changed the title add "invite a friend" feature [feat] add "invite a friend" Sep 11, 2025
@islandbitcoin
islandbitcoin marked this pull request as ready for review September 11, 2025 17:49

@brh28 brh28 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only about 10% through so far

Comment thread .env.example Resolved
Comment thread DEV.md Resolved
Comment thread dev/bin/gen-test-jwt.ts Resolved
Comment thread src/app/admin/invite.ts Resolved
Comment thread src/app/admin/invite.ts Resolved
Comment thread src/app/admin/invite.ts Resolved
Comment thread src/app/admin/invite.ts Resolved
Comment thread src/app/admin/invite.ts Resolved
Comment thread src/app/invite/index.ts Resolved
Comment thread src/app/admin/invite.ts Resolved
@islandbitcoin
islandbitcoin marked this pull request as draft September 12, 2025 02:28
@islandbitcoin

Copy link
Copy Markdown
Contributor Author

putting this back to draft mode to make changes based on feedback, and wait for twilio to approve messaging so I can test end-to-end

@islandbitcoin
islandbitcoin force-pushed the feat/invite-friend branch 2 times, most recently from 55546c9 to b9efa8d Compare September 15, 2025 01:59
@islandbitcoin
islandbitcoin force-pushed the feat/invite-friend branch 2 times, most recently from ae55ba0 to 60d9d24 Compare September 26, 2025 17:07
@islandbitcoin
islandbitcoin marked this pull request as ready for review September 26, 2025 17:39
@islandbitcoin

Copy link
Copy Markdown
Contributor Author

much cleaner PR, ready for another review

@islandbitcoin
islandbitcoin force-pushed the feat/invite-friend branch 2 times, most recently from 8faac76 to f4685cf Compare October 17, 2025 23:31
@islandbitcoin
islandbitcoin requested a review from brh28 October 17, 2025 23:34
@islandbitcoin

Copy link
Copy Markdown
Contributor Author

@brh28 please review

@islandbitcoin islandbitcoin added the enhancement New feature or request label Oct 27, 2025
Add comprehensive invite-friend feature allowing users to invite friends via Email, SMS, or WhatsApp.

**User-Facing Features:**
- Create invites: Users can send invites via Email (SendGrid), SMS, or WhatsApp (Twilio)
- Redeem invites: New users can redeem invites within 1 hour of account creation
- Preview invites: Unauthenticated endpoint to preview invite before registration
- Rate limiting: 10 invites/day per user, 3 invites/day per target contact (Redis-based)
- 24-hour invite expiration with Firebase Dynamic Links support

**Admin Features:**
- View invite details with inviter/redeemer information
- List and filter invites by status and inviter
- Paginated invite queries

**Technical Implementation:**
- MongoDB schema for invite tracking with secure token hashing (SHA-256)
- Notification service supporting Email, SMS, and WhatsApp
- Contact validation for email/phone formats
- Deep linking support via Firebase Dynamic Links
- Comprehensive test coverage (unit & integration tests)

**Security:**
- Tokens are 40-character random strings with only SHA-256 hash stored
- Contact verification ensures invite sent to correct recipient
- Account age validation (< 1 hour) for new user redemption
- Self-redemption prevention
@islandbitcoin islandbitcoin changed the title [feat] add "invite a friend" feat/invite-friend Dec 29, 2025
@islandbitcoin
islandbitcoin deleted the feat/invite-friend branch July 27, 2026 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants