Description
Implement a native way for users to actively update their trusted merchant network directly inside the Shopstr app, preventing reliance on external Nostr clients to build the Web of Trust.
Feature Description
- A "+ Follow" (and "Following") button should be added to the merchant's banner/profile directly within the Shopstr UI.
- Clicking the button should fetch the user's current Nostr Contact List (NIP-02 kind: 3), append the merchant's pubkey, and publish the updated event.
- The UI should optimistically update, instantly adding the merchant to the user's Web of Trust and refreshing the marketplace Trust filter without requiring a page reload.
Problem This Feature Solves
If a user wants to configure their Trust network to include a Shopstr merchant, they must copy the merchant's npub, leave the Shopstr app, open an external Nostr client (like Primal or Damus), follow the merchant there, and then return to Shopstr. The marketplace Trust button relies entirely on follow networks built outside the app.
Proposed Solution
We will use standard NIP-02 (kind: 3) Contact List events. When the user clicks "+ Follow":
- Shopstr queries relays for the user's most recent kind: 3 event.
- The merchant's pubkey is appended to the tags array.
- The event is signed and rebroadcast.
- The local Context is optimistically updated so the newly added merchants products will be updated in the trust filter .
Alternative Solutions
- Since in Nostr we cannot update a list by simply appending a merchant’s pubkey, we instead need to download the entire list, append the new merchant, and republish the full list. This means that if a user has a large number of followers, the list would need to be downloaded each time they click the +Follow button.
- To address this, we can use NIP-51.
- If Shopstr uses NIP-51, the app could create a dedicated list called “Shopstr Merchants.” This list would be separate from the user’s social follow list and would only contain merchants added through Shopstr. As a result, the payload being downloaded and uploaded would remain small and efficient.
User Impact
- Help improve user retention, turning passive browsing into active relationship-building with sellers.
Relevant NIPs
NIP-02 (Contact List and Petnames)
NIP-51 (Lists) - Alternate Solution.
Implementation Ideas
- Add followUser and unfollowUser functions in nostr-helper-functions.ts to handle follow/unfollow actions
- Add addFollow and removeFollow functions in FollowsContext to update the app’s follow state properly.
- Add a button in SideShopNav that calls these functions. Handle special cases like when users view their own profile or when the network request fails by showing error messages (toasts).
- Add a Follow/Unfollow option in the seller profile dropdown menu useful when users discover sellers from cards/reviews without opening the full seller page first.
Screenshots or Mockups
No response
Additional Context
No response
Code of Conduct
Description
Implement a native way for users to actively update their trusted merchant network directly inside the Shopstr app, preventing reliance on external Nostr clients to build the Web of Trust.
Feature Description
Problem This Feature Solves
If a user wants to configure their Trust network to include a Shopstr merchant, they must copy the merchant's npub, leave the Shopstr app, open an external Nostr client (like Primal or Damus), follow the merchant there, and then return to Shopstr. The marketplace Trust button relies entirely on follow networks built outside the app.
Proposed Solution
We will use standard NIP-02 (kind: 3) Contact List events. When the user clicks "+ Follow":
Alternative Solutions
User Impact
Relevant NIPs
NIP-02 (Contact List and Petnames)
NIP-51 (Lists) - Alternate Solution.
Implementation Ideas
Screenshots or Mockups
No response
Additional Context
No response
Code of Conduct