Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring a Fren (The Daniel's onboarding) #1696

Open
8 tasks
Tracked by #2642
alltheseas opened this issue Nov 12, 2023 · 17 comments
Open
8 tasks
Tracked by #2642

Bring a Fren (The Daniel's onboarding) #1696

alltheseas opened this issue Nov 12, 2023 · 17 comments
Assignees
Labels
design Design exploration & definition is required feature New feature request onboarding

Comments

@alltheseas
Copy link
Collaborator

alltheseas commented Nov 12, 2023

user story

As a Damus and nostr ambassador, I would like a way to send a personalized Damus invite to my friend with pre-loaded content & sats, so that they have a great experience when they join and they are more likely to stay.

acceptance criteria

  1. There is a "Invite a Friend to Damus" button (see mockup below)
  2. Invite sender can suggest friends to follow for their friend
  3. Invite sender can suggest hashtags to follow for their friend
  4. Invite sender can suggest relays to add to default Damus relay list
  5. Invite sender can pay for friend's paid relays (i.e. pay for write capabilty)
  6. Invite sender can pre-load their friend's LN wallet
  7. Invitee automatically follows invite sender

design / open questions

  1. should there be a cap of users to follow?
  2. should there be a cap of hashtags to follow?
  3. should there be a cap of relays suggested?
  4. should there be a cap of sats pre-loaded?
  5. should the invite sender be allowed to modify the Damus bootstrap list?
  6. Should the invitee have any choice as to what their friend suggested (e.g. choose to follow some user follow suggestions)?

pre-requisites for pre-loading wallet with sats

user flow

Screenshot 2023-11-11 at 11 33 20 PM

invite friend mockup

invite friend

@alltheseas alltheseas added feature New feature request onboarding labels Nov 12, 2023
@alltheseas alltheseas changed the title Personalized invite a friend Personalized invite a friend (The Daniel's onboarding) Nov 12, 2023
@alltheseas
Copy link
Collaborator Author

@robagreda what do you think 👀

@alltheseas alltheseas added the design Design exploration & definition is required label Nov 12, 2023
@alltheseas
Copy link
Collaborator Author

@danieldaquino what do you think of the technical feasibility and points for this ticket? My gut feel is that we'll need to break it down to smaller pieces, and maybe rearrange the flow to make execution simpler.

@danieldaquino
Copy link
Contributor

@alltheseas, my gut feel is that we will likely need to break this down into at least 2 or 3 separate parts, which I would imagine could be ordered in this sequence:

  1. Implement general flow and setup of basic settings (e.g. Which friends to follow)
  2. Implementation of any remaining setting (If not easily done in (1))
  3. Implementation of money-related setups (like pre-paid relays or pre-loaded sats)

@danieldaquino
Copy link
Contributor

@alltheseas, @jb55, for the preloading of sats, one thing that came to my mind was the Bitcoin "laisee" (https://laisee.org), where the person giving the sats can create a lightning QR code that the recipient can use to redeem sats to their own wallet.

I would imagine that whatever underlying lightning protocol mechanisms are used there could potentially be useful here.

@alltheseas
Copy link
Collaborator Author

@alltheseas, @jb55, for the preloading of sats, one thing that came to my mind was the Bitcoin "laisee" (https://laisee.org), where the person giving the sats can create a lightning QR code that the recipient can use to redeem sats to their own wallet.

I would imagine that whatever underlying lightning protocol mechanisms are used there could potentially be useful here.

Interesting! Maybe the redeem code is DM'd from the inviter to the newly created profile? What happens if I tap on a QR code in DMs? Testing now.

@danieldaquino
Copy link
Contributor

@alltheseas, I believe the QR code in the Laisee points to a special lightning url.

A DM could be one way to deliver it, but that URL could also (in theory) be embedded together with the rest of the settings, or in a way that Damus could immediately understand and redeem it.

@alltheseas
Copy link
Collaborator Author

that URL could also (in theory) be embedded together with the rest of the settings, or in a way that Damus could immediately understand and redeem it.

Sounds great. Redeeming from a QR in DMs is a painful experience, just tested.

@alltheseas
Copy link
Collaborator Author

https://onboardstr.vercel.app/ implemented this with the following flow:

  1. input an existing npub
  2. copy follow list, and relay list
  3. generate private key with follow list, and relay list preconfigured

@alltheseas
Copy link
Collaborator Author

Onboardstr by Bera implemented something very similar yesterday!

An insight gleaned from testing onboardstr: what if we could append the inviter's npub to the Damus invite link? If invitee taps, and installs Damus they automagically have relays and follow lists either added, or suggested.

https://damus.io/note1g8ypuxjkmn4gse5d3nx22f5h5zyyuxaglsgedqghexl5hly3xkasu03wrd

@jb55
Copy link
Collaborator

jb55 commented Nov 17, 2023 via email

@alltheseas
Copy link
Collaborator Author

Alternatively we could create a private service that only allows unique
keys and just use that.

What does this entail? A private relay with the note mechanism you described above?

@jb55
Copy link
Collaborator

jb55 commented Nov 17, 2023 via email

@danieldaquino
Copy link
Contributor

@jb55, would it be possible to register another custom URL scheme on the app?

If so, we might be able to eliminate the need for copying/pasting invite codes. We could generate special URLs under this new scheme containing the data they need.

So once the user has Damus installed, all they would need to do is click on the special link provided to them, or scan a QR code for that URL. Then we could setup the app to interpret these special data urls, confirm details with the user, and load everything.

Here is one example:

  1. User generates recommendations with some json data such as {"recommended_users": ["0f8cdd97(...)", (...)], (...)}
  2. They get a shareable URL such as https://invite.damus.io/?data=eyJyZWNvbW1lbmRlZF91c2VycyI6IFsiMGY4Y2RkOTcoLi4uKSIsICguLi4pXSwgKC4uLik=
  3. The static page shows install instructions with two steps: (1) Install Damus on App store (2) Click on this link (Where the link is something like damus-invite:eyJyZWNvbW1lbmRlZF91c2VycyI6IFsiMGY4Y2RkOTcoLi4uKSIsICguLi4pXSwgKC4uLik=)
  4. Damus reads the link, decodes it, and proceeds with the configuration import

The upside of the above is removing the need of any server-side functionality. The downside is that the URLs might get huge.

Another possibility:

Another possibility would be saving that JSON data as a special nostr note, so all 4 steps above would apply — however instead of a big base64 string, we would have only a short nostr note id. (And since note ids are SHA256 hashes of the signed note contents, a spammer would not be able to generate spammy invite data that matches the legitimate note id and invite URL)

Example:

  1. User generates a note, which gets sent to a special private relay
  2. User generates and sends the shareable invite link: https://invite.damus.io/nevent08ab4f(...)
  3. Invite link shows the user (1) the app store link and (2) prompts them to click on the link damus-invite:nevent08ab4f(...)
  4. Damus would open this special scheme url, and proceed with loading/applying the contents of nevent08ab4f(...)

On this one, we might not even need a new URL scheme at all, we might be able to use damus:nevent08ab4f(...) and detect based on the note kind 🤔

@alltheseas
Copy link
Collaborator Author

@pablof7z example Uncle Jim onboarding flow that uses nip-05 + uncle Jim domain provides automagically LN address for newly onboarded folks

https://damus.io/note18kma8hr0dcyy30u0272473u2ggacgws6xlue5e7dexnqatfc4mdshmvgse

@alltheseas
Copy link
Collaborator Author

@ericholguin wdyt of this one, minus the LN wallet (for which we dont have a ready solution today)?

@ericholguin
Copy link
Collaborator

@ericholguin wdyt of this one, minus the LN wallet (for which we dont have a ready solution today)?

I think it's a great idea. I could help with the front end.

@alltheseas
Copy link
Collaborator Author

@alltheseas alltheseas changed the title Personalized invite a friend (The Daniel's onboarding) Bring a Fren (The Daniel's onboarding) Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Design exploration & definition is required feature New feature request onboarding
Projects
Status: Backlog
Development

No branches or pull requests

5 participants