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

Whitelist / request association with a Bootik from another Bootik #168

Open
Tirodem opened this issue Jun 14, 2023 · 1 comment
Open

Whitelist / request association with a Bootik from another Bootik #168

Tirodem opened this issue Jun 14, 2023 · 1 comment

Comments

@Tirodem
Copy link
Contributor

Tirodem commented Jun 14, 2023

Context

Allow to whitelist another bootik on Bootik admin interface

  • to use it later on referral settings
  • to allow some commands from the whitelisted bootik npub

Prerequisite

  • Create a "Crossbootik" tab in /admin + new route in /admin/crossbootik
    image
  • Create a new "Bootik Whitelist" collection on MongoDB
  • Create new triggers on nostr-bot
  • Access nostR account public infos from an npub

UI

On /admin/crossbootik, display 3 tabs :

1st tab : "Whitelist a new Bootik"

Form with :

  • target Bootik's internal name (text input)
  • target Bootik's npub
  • link type dropdown (Referral, Association / Multibootik, Discovery / Metabootik)
  • Button "Submit"

2nd tab : "Whitelisted Bootiks"

Table with whitelisted bootiks :

  • column 1 : Bootik's internal name
  • column 2 : Bootik's npub
  • column 3 : Bootik's logo
  • column 4 : Bootik's URL
  • column 5 : Bootik's official name
  • column 7 : "Revoke link" button
  • column 8 : association type
    • "Whitelisted & pending" : Bootik A whitelisted Bootik B and sent a notification, nothing happened since
    • "Whitelisted but declined" : Bootik A whitelisted Bootik B and sent a notification, Bootik B answered "ok but no" because its Discovery toggle is off or manually
    • "Whitelisted & OK referral" : Bootik A whitelisted Bootik B and sent a notification, Bootik B accepted and said "ok for referral", Bootik A can give referral commission on sales for Bootik B
    • "Whitelisted & OK association" : Bootik A whitelisted Bootik B and sent a notification, Bootik B accepted and said "ok for association", Bootik A can sell Bootik B articles, forward the order and give it 100% of the price (MultiBootik use case)
    • "Whitelisted & OK discovery - X%" : Bootik A whitelisted Bootik B and sent a notification, Bootik B accepted automatically thanks to Discovery toggle and said "ok for discovery", Bootik A can sell Bootik B articles, forward the order and give it 100 - Discovery margin % of the price (MultiBootik use case)

3r tab : "Association requests"

Will be defined on #169

Use case

  • As a Bootik's owner I can whitelist another Bootik by filling an internal name (not necessarily the actual Bootik's name, but one I defined for my own recognition) and bootik npub
  • When I whitelist a Bootik, my Bootik's nostR bot send a whitelist notification to the said Bootik with the desired link type + a link ID
  • When I whitelist a Bootik, the said Bootik appears on my "Whitelisted Bootiks" tab ; logo, URL & official name are automatically filled from target Bootik nostR account when account is certified (see Customize bootik's nostr account and certify it #167 )
  • Whitelist bootiks are listed on database for other features purposes (related to my Bootik's nostR bot - check
  • My Bootik's nostR-bot will process the target Bootik answer :
    • any link type + no answer : "Whitelisted & pending"
    • any link type + "I refuse the link {ID}" : "Whitelisted but declined"
    • referral link type + "I accept the link {ID}" : "Whitelisted & OK referral"
    • association link type + "I accept the link {ID}" : "Whitelisted & OK association"
    • discovery link type + "I accept the link {ID}" : "Whitelisted & OK discovery"
@coyotte508
Copy link
Collaborator

1-2 days after #169

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

No branches or pull requests

2 participants