/solana-nft-marketplace

No-Code Solana NFT Marketplaces

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

Marketplace

No-code Solana NFT marketplaces powered by Holaplex.

Tech Stack:

  • Typescript
  • Apollo GraphQL
  • Next.JS/React

Getting Started

Marketplaces is very easy to setup for local use or to be deployed on your own infrastructure.

  1. Create a Marketplace at https://holaplex.com/marketplace/new
  2. Clone the repo
  3. cd into the folder
  4. Install dependencies with yarn install
  5. Edit .env.development and add the subdomain you chose in step 0, or any other active subdomain, eg: espi
  6. Run it with yarn dev

Create a Production Build

To create a production ready build use yarn build. Build files can be found in .next.

Detailed documentation can be found at https://nextjs.org/docs/deployment#nextjs-build-api

Proxy

The active marketplace can be set by the x-holaplex-subdomain request header. Starting the nginx with default.conf will set the subdomain header based on the current hostname context of the request. The nginx conf relies on envstub provided by the official nginx image on Dockerhub.

To start nginx using the required configuration, use the following command:

$ docker run --network=host -v $(pwd)/templates:/etc/nginx/templates \
-e HOSTNAME=dev.holaplex.market.127.0.0.1.nip.io -e PORT=80 -e WEB_PORT=3000 \
-e PROXY_HOST=127.0.0.1.nip.io nginx:latest

If you already have something running in port 80 already, feel free to change that to a different port. Keep in mind that you'll need to append :<port> on the url to access the NGINX server.

Test your proxy setup!

Open a test marketplace, like espi's marketplace. Page should load without issues.