{"id":13832697,"url":"https://github.com/lnbits/nostrmarket","last_synced_at":"2025-06-29T01:37:07.183Z","repository":{"id":95652723,"uuid":"607236817","full_name":"lnbits/nostrmarket","owner":"lnbits","description":"Nostr Market ","archived":false,"fork":false,"pushed_at":"2024-04-15T11:59:13.000Z","size":3818,"stargazers_count":122,"open_issues_count":8,"forks_count":21,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-04-15T18:51:19.046Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lnbits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-27T15:40:02.000Z","updated_at":"2024-05-29T23:55:07.039Z","dependencies_parsed_at":"2023-03-05T03:30:38.217Z","dependency_job_id":"ffa75c90-1046-43e3-b46a-c3097c3d0b5e","html_url":"https://github.com/lnbits/nostrmarket","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/lnbits/nostrmarket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnbits%2Fnostrmarket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnbits%2Fnostrmarket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnbits%2Fnostrmarket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnbits%2Fnostrmarket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lnbits","download_url":"https://codeload.github.com/lnbits/nostrmarket/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnbits%2Fnostrmarket/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262520323,"owners_count":23323686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T11:00:28.142Z","updated_at":"2025-06-29T01:37:07.159Z","avatar_url":"https://github.com/lnbits.png","language":"JavaScript","funding_links":[],"categories":["Clients"],"sub_categories":["Nostr Marketplace clients (NIP-15 \u0026 NIP-99)"],"readme":"# Nostr Market ([NIP-15](https://github.com/nostr-protocol/nips/blob/master/15.md)) - \u003csmall\u003e[LNbits](https://github.com/lnbits/lnbits) extension\u003c/small\u003e\n\n\u003csmall\u003eFor more about LNBits extension check [this tutorial](https://github.com/lnbits/lnbits/wiki/LNbits-Extensions).\u003c/small\u003e\n\n**Demo at Nostrica \u003ca href=\"https://www.youtube.com/live/2NueacYJovA?feature=share\u0026t=6846\"\u003ehere\u003c/a\u003e**.\n\n**Original protocol for [Diagon Alley](https://github.com/lnbits/Diagon-Alley) (resilient marketplaces)**\n\n\u003e The concepts around resilience in Diagon Alley helped influence the creation of the NOSTR protocol, now we get to build Diagon Alley on NOSTR!\n\n## Prerequisites\n\nThis extension uses the LNbits [nostrclient](https://github.com/lnbits/nostrclient) extension, an extension that makes _nostrfying_ other extensions easy.\n![image](https://user-images.githubusercontent.com/2951406/236773044-81d3f30b-1ce7-4c5d-bdaf-b4a80ddddc58.png)\n\n- before you continue, please make sure that [nostrclient](https://github.com/lnbits/nostrclient) extension is installed, activated and correctly configured.\n- [nostrclient](https://github.com/lnbits/nostrclient) is usually installed as admin-only extension, so if you do not have admin access please ask an admin to confirm that [nostrclient](https://github.com/lnbits/nostrclient) is OK.\n- see the [Troubleshoot](https://github.com/lnbits/nostrclient#troubleshoot) section for more details on how to check the health of `nostrclient` extension\n\n## Create, or import, a merchant account\n\nAs a merchant you need to provide a Nostr key pair, or the extension can generate one for you.\n![create keys](https://i.imgur.com/KhQYKOe.png)\n\nOnce you have a merchant \"account\", you can view the details on the merchant dropdown\n![merchant dropdown](https://i.imgur.com/M5abrK9.png)\n\n## Create a Stall, or shop\n\nTo create a stall, you first need to set a _Shipping zone_. Click on the _Zones_ button and fill in the fields:\n![zone dialog](https://i.imgur.com/SMAviHm.png)\n\n- Give your shipping zone a name\n- Select to which countries does this _Shipping zone_ applies to (you can set a \"Free\" zone for digital goods)\n- Select the unit of account. If your will list products in EUR, the shipping zone must be in the same currency\n- Select the cost to ship\n\n**Let's create the stall**\nClick on _New Stall_ button and fill the necessary fields\n![Create stall](https://i.imgur.com/gb9b4We.png)\n![Stall dialog](https://i.imgur.com/lX3Cd9K.png)\n\n- Give your stall/shop a name\n- An optional description (this can be used by client to search shops)\n- Select which wallet to use for this shop\n- Select the unit\n- select a Shipping Zone (multiple zones can be selected)\n\nClick on the \"Plus\" button to open the stall details and click \"New Product\" to create a product\n![create product](https://i.imgur.com/zNG8wZx.png)\n\nFill the necessary fields on the dialog\n\n![product dialog](https://i.imgur.com/lAmkuvy.png)\n\n- The product name\n- Give it a description\n- Add some categories (this can be used by clients to search for products)\n- Supply an URL for your product image (you can upload an image but it's recommended that the images are hosted outside of LNbits)\n- A price for the product, in the currency selected for the shop (this will be converted to sats when a customer buys)\n- The quantity you have in stock, for the product. This will update when orders are made/paid\n\nOn the _Stall_ section you can also see (update or delete) the stall details in _Stall Info_ tab\n![stall details](https://i.imgur.com/97eJ7R0.png)\n\nCreate, update or delete products in _Products_ tab\n![products tab](https://i.imgur.com/ilbxeOG.png)\n\nAnd check your orders on the _Orders_ tab\n\n![orders tab](https://i.imgur.com/RiqMKUM.png)\n\nWhen you get an order, you can see the details by clicking on the \"Plus\" sign for the order\n\n![order details](https://i.imgur.com/PtYbaPm.png)\n\n- Ordered products\n- The order ID\n- Customer's shipping address\n- Customer's public key\n- Invoice ID\n\nIf applicable, you can set as shipped when shipping is processed.\n\nYou also have a _Chat Box_ to chat with customer\n\n![chat box](https://i.imgur.com/fhPP9IB.png)\n\n## Diagon Alley Clients\n\nLNbits also provides a Nostr Market client app. You can visit the client from the merchant dashboard by clicking on the \"Market client\" link\n![market client link](https://i.imgur.com/3tsots2.png)\n\nor by visiting `https://\u003cLNbits instance URL\u003e/nostrmarket/market`\n\nMake sure to add your `merchant` public key to the list:\n![image](https://user-images.githubusercontent.com/2951406/236787686-0e300c0a-eb5d-4490-aa70-568738ac78f4.png)\n\n### Styling\n\nIn order to create a customized Marketplace, we use `naddr` as defined in [NIP-19](https://github.com/nostr-protocol/nips/blob/master/19.md#shareable-identifiers-with-extra-metadata). You must create an event (kind: `30019`) that has all the custom properties, including merchants and relays, of your marketplace. Start by going to the marketplace page:\n![vanilla market](https://i.imgur.com/nCaMh1N.png)\n\nYou'll need to Login, and head over to _Marketplace Info_. Optionally import some merchants and relays, that will be included in the event. Click on _Edit_ and fill out your marketplace custom info:\n![edit](https://i.imgur.com/wEuHuN9.png)\n\nFill in the optional fields:\n\n- Add a name to the Marketplace\n- Add a small description\n- Add a logo image URL\n- Add a banner image URL (max height: 250px)\n- Choose a theme\n\nBy clicking _Publish_, a `kind: 30019` event will be sent to the defined relays containing all the information about your custom Marketplace. On the left drawer, a button with _Copy Naddr_ will show up.\n![copy naddr](https://i.imgur.com/VuNIMVf.png)\n\nYou can then share your Marketplace, with the merchants and relays, banner, and style by using that Nostr identifier. The URL for the marketplace will be for example: `https://legend.lnbits.com/nostrmarket/market?naddr=naddr1qqfy6ctjddjhgurvv93k....`, you need to include the URL parameter `naddr=\u003cyour naddr\u003e`. When a user visits that URL, the client will get the `30019` event and configure the Marketplace to what you defined. In the example bellow, a couple of merchants, relays, `autumn` theme, name (_Veggies Market_) and a header banner:\n![final](https://i.imgur.com/EYG7vYS.png)\n\nThe nostr event is a replaceable event, so you can change it to what you like and publish a new one to replace a previous one. For example adding a new merchant, or remove, change theme, add more relays,e tc...\n\n## Troubleshoot\n\n### Check communication with Nostr\n\nIn order to test that the integration with Nostr is working fine, one can add an `npub` to the chat box and check that DMs are working as expected:\n\nhttps://user-images.githubusercontent.com/2951406/236777983-259f81d8-136f-48b3-bb73-80749819b5f9.mov\n\n### Restart connection to Nostr\n\nIf the communication with Nostr is not working then an admin user can `Restart` the Nostr connection.\n\nMerchants can afterwards re-publish their products.\n\nhttps://user-images.githubusercontent.com/2951406/236778651-7ada9f6d-07a1-491c-ac9c-55530326c32a.mp4\n\n### Check Nostrclient extension\n\n- see the [Troubleshoot](https://github.com/lnbits/nostrclient#troubleshoot) section for more details on how to check the health of `nostrclient` extension\n\n## Aditional info\n\nStall and product are _Parameterized Replaceable Events_ according to [NIP-33](https://github.com/nostr-protocol/nips/blob/master/33.md) and use kind `30017` and `30018` respectivelly. See [NIP-15](https://github.com/nostr-protocol/nips/blob/master/15.md) for more details.\n\nOrder placing, invoicing, payment details and order statuses are handled over Nostr using [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md).\n\nCustomer support is handled over whatever communication method was specified. If communicationg via nostr, [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md) is used.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnbits%2Fnostrmarket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flnbits%2Fnostrmarket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnbits%2Fnostrmarket/lists"}