Open-Source Marketplace

Fork and customize the Reservoir Open-source Marketplace

Introduction

Reservoir Market v2 is an open source marketplace built with Reservoir APIs that enables access to instant liquidity aggregated from major marketplace. We encourage developers to use this project as a reference for their own implementation or even fork the project and make their own meaningful changes. The project is lightly configurable refer to the configuration variables below. If you're looking for a no-code solution check out our v1 marketplace. this marketplace isn't merely a demonstration but an actionable, scalable, and customizable blueprint. It's designed to help you create your own NFT marketplace or trading experiences, matching and even surpassing the sophistication of mainstream marketplaces like Opensea or Looksrare.

Features

  • Open-source: The marketplace’s open-source nature allows you to understand, modify, and enhance the code to suit your unique requirements.

  • Liquidity and Order Execution: Our developer tools also allow for seamless liquidity management and efficient execution of orders in the NFT marketplaces. Access all listings from all marketplaces including Opensea, Blur, LookRare, X2Y2 & 150 more.

  • Feature rich: Built to cater to marketplaces of all sizes, our platform is has many of the beloved features including a collection ranking, sweeping & a portfolio.

  • Customizable: The Open-source Marketplace is a boilerplate, meaning it's designed to be tailored according to your specific needs and preferences. You can include as little or as many built in features as you want while also being able to integrate custom features of your own

Benefits

  • Fast-Track Development: Leverage the Open-source Marketplace as a boilerplate to jumpstart your own platform, significantly reducing the time to market & simplifies the process of interacting with other marketplaces, making it accessible even to those new to the space. As well as reduce the cost associated with building a marketplace from scratch and maintaining data servers, order management systems, and liquidity pools.

  • No compromise innovation: As an open-source platform, you have the freedom to modify the platform to suit your needs, giving you more control over your platform's functionality. Doing so without compromising industry standard features mainstream marketplaces currently have, you're starting with a strong foundation based on industry best practices.

  • Learning Opportunity: This Open-source Marketplace serves as a practical learning resource for developers looking to understand the intricacies of building a feature-rich NFT marketplace.

Getting Started

Prerequisites

  1. Install Node.js and NPM
  2. Install Yarn
  3. Request free Reservoir API key

Built With

Installation

Fork this repo and follow these instructions to install dependencies.

With yarn:

$ yarn install

With NPM:

$ npm install

📘

Learn how to protect your API key

Here are some best practices to secure your API key from unauthorized access.

Configuration

Reservoir Market v2 is lightly configurable with the configurations below. You can either add these to a .env.production and .env.development or add env variables to a deployment platform like vercel.

Environment Variables

Environment VariableRequiredDescriptionExample
NEXT_PUBLIC_HOST_URLtrueThe domain that the deployed project is hosted on.http://localhost:3000
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_IDtrueFollow the steps here to create a wallet connect project and retrieve the id.0e11adav112d76d4de6f631dsa12b7321
RESERVOIR_API_KEYfalseReservoir API key. Sign up here get a free API key.123e4567-e89b-12d3-a456-426614174000
NEXT_PUBLIC_ALCHEMY_IDfalseAlchemy API key required for removing rate limiting restrictions. Sometimes used to fetch Wallet token balance.123e4567-e89b-12d3-a456-426614174000
NEXT_PUBLIC_ETH_COLLECTION_SET_IDfalseUse this to configure a community marketplace. This will only impact the mainnet network. Generate your collection set ID here.f566ba09c14f56aedeed3f77e3ae7f5ff28b9177714d3827a87b7a182f8f90ff
NEXT_PUBLIC_GOERLI_COLLECTION_SET_IDfalseUse this to configure a community marketplace. This will only impact the goerli network. Generate your collection set ID here.f566ba09c14f56aedeed3f77e3ae7f5ff28b9177714d3827a87b7a182f8f90ff
NEXT_PUBLIC_POLYGON_COLLECTION_SET_IDfalseUse this to configure a community marketplace. This will only impact the polygon network. Generate your collection set ID here.f566ba09c14f56aedeed3f77e3ae7f5ff28b9177714d3827a87b7a182f8f90ff
NEXT_PUBLIC_ETH_COMMUNITYfalseUse this to configure a community marketplace. Note: Community IDs are only available for certain communities. This will only impact the mainnet network.artblocks
NEXT_PUBLIC_GOERLI_COMMUNITYfalseUse this to configure a community marketplace. Note: Community IDs are only available for certain communities. This will only impact the goerli network.artblocks
NEXT_PUBLIC_POLYGON_COMMUNITYfalseUse this to configure a community marketplace. Note: Community IDs are only available for certain communities. This will only impact the polygon network.artblocks
NEXT_PUBLIC_NORMALIZE_ROYALTIESfalseEnables royalty normalization. Refer to docs for more info.true, false
NEXT_PUBLIC_DATADOG_CLIENT_TOKENfalseDatadog client token for configuring analytics.pubdaddswww4dad449dadas12ada123bae
NEXT_PUBLIC_DATADOG_APPLICATION_IDfalseDatadog application id for configuring analytics.123cccbb-1234-1111-4411-abc12345612afgds
NEXT_PUBLIC_MARKETPLACE_SOURCEfalseMarketplace source, used to attribute a source to orders. Must be a valid domainreservoir.tools

In addition to the configuration above we've also added comments prefixed with CONFIGURABLE: throughout the app pointing out some pieces of code where you could customize functionality. After cloning the app make sure to search the repo for the aforementioned prefix.

Deeplinking to Actions

The open source marketplace supports deeplinking to purchase actions. Deeplinking to these pages require the user to log in and if they are not on the right chain, chain switching will be prompted if necessary. Note that deeplinking to minting only works if the collection is actively minting. Below are the list of actions and how to deeplink to them:

Run the App

Once you have your setup ready, run:

With yarn:

$ yarn dev

With npm:

$ npm run dev

Deploy with Vercel

This is a Next.js app that can be easily deployed using Vercel. For more information on how to deploy your Github repository with Vercel visit their docs.