Git Product home page Git Product logo

marketplace-v1's Introduction

Reservoir Market v1 - [⛔️ DEPRECATED]

An open source NFT marketplace built on Reservoir.

Learn more about v2 of the Reservoir Market.

No Maintenance Intended

About The Project

Reservoir Market is an open source marketplace that enables communities to easily launch their own NFT marketplace, accessing instant liquidity aggregated from other major marketplaces.

The marketplace supports 3 different modes:

With each deployment, communities are given full control over their marketplace from designing their look and feel to setting their own marketplace fees.

(back to top)

Getting Started (Self-Hosted)

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 dependancies.

With yarn:

$ yarn install

With NPM:

$ npm install

Configuration

Reservoir Market is built to be fully configurable using environment variables. To preview your configuration locally you can copy the values you want to use from env.development or env.production into a new file called .env.local.

Note: Environment variables can also be added during deployment via deployment platforms like vercel.

Required Configuration

Environment Variable Required Description Example
NEXT_PUBLIC_RESERVOIR_API_BASE true The Reservoir API base URL. Available on Mainnet, Rinkeby, Goerli, and Optimism. https://api-rinkeby.reservoir.tools/ https://api.reservoir.tools/
NEXT_PUBLIC_CHAIN_ID true The Ethereum network to be used. 1 for Etherem Mainnet and 4 for Rinkeby Testnet, etc. 1 4
NEXT_PUBLIC_PROXY_API_BASE true The proxy API used to pass the Reservoir API key without exposing it to the client. /api/reservoir
NEXT_PUBLIC_RESERVOIR_API_KEY true Reservoir API key provided by the Reservoir Protocol. Get your own API key. 123e4567-e89b-12d3-a456-426614174000
NEXT_PUBLIC_ALCHEMY_ID true Alchemy API key required for buying items on mobile. Get your own API key here. 123e4567-e89b-12d3-a456-426614174000

General Configuration

Environment Variable Required Description Example
NEXT_PUBLIC_SOURCE_ID false DEPRECATED: The source ID used to attribute listings and offers from your marketplace. Reservoir Market
NEXT_PUBLIC_SOURCE_DOMAIN false The source ID used to attribute listings and offers from your marketplace. Must be in a domain format. reservoir.market
NEXT_PUBLIC_SOURCE_NAME false The source name used to attribute listings and offers from your marketplace, falls back to the domain. Reservoir Market
NEXT_PUBLIC_ORDER_KIND false The order kind to be used when listing or making offers on your marketplace. Default will use seaport if not set. zeroex-v4. wyvern-v2.3, seaport
NEXT_PUBLIC_FEE_BPS false The marketplace fee that will be earned from native listings and offers on your marketplace. Configured as <glossary:bps>. 100
NEXT_PUBLIC_FEE_RECIPIENT false The address that will receive marketplace fee. 0xF296178d553C8Ec21A2fBD2c5dDa8CA9ac905A00
NEXT_PUBLIC_COLLECTION false Use this to configure a single collection marketplace or set the default collection for your community marketplace. 0x8d04a8c79ceb0889bdd12acdf3fa9d207ed3ff63
NEXT_PUBLIC_COLLECTION_SET_ID false Use this to configure a community marketplace. Generate your collection set ID here. f566ba09c14f56aedeed3f77e3ae7f5ff28b9177714d3827a87b7a182f8f90ff
NEXT_PUBLIC_COMMUNITY false Use this to configure a community marketplace. Note: Community IDs are only available for certain communities. artblocks
NEXT_PUBLIC_REDIRECT_HOMEPAGE false If enabled, homepage will automatically redirect to collection page set in NEXT_PUBLIC_COLLECTION. true
NEXT_PUBLIC_EXTERNAL_LINKS false External links to be displayed in the top navigation bar. Blog::<<<<https://blog.com,Docs::https://docs.com>>>>
NEXT_PUBLIC_COLLECTION_DESCRIPTIONS false Customize descriptions on a per collection basis. 0xb74bf94049d2c01f8805b8b15db0909168cabf46::test description,0xc751c84678d8e229e361f9b04c080256516f4a0a::another description
NEXT_PUBLIC_NAVBAR_LOGO_LINK false Customize the marketplace navbar logo's link. https://blog.com
NEXT_PUBLIC_DEFAULT_TO_SEARCH false If enabled, search bar will be displayed instead of collection switcher. true
NEXT_PUBLIC_LISTING_CURRENCIES false Customize which currency users can list in. [{"symbol": "ETH", "decimals": 18, "contract": "0x0000000000000000000000000000000000000000"},{"symbol": "USDC", "decimals": 6, "contract": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"}]

Design Configuration

Environment Variable Required Description Example
NEXT_PUBLIC_NAVBAR_LOGO false The logo of your marketplace that appears on mobile. https://www.reservoir.market/reservoir.svg
NEXT_PUBLIC_DESKTOP_NAVBAR_LOGO false The logo of your marketplace that appears on desktop. https://www.reservoir.market/reservoir-desktop.svg
NEXT_PUBLIC_FAVICON false The favicon for your marketplace. https://www.reservoir.market/reservoir.svg
NEXT_PUBLIC_SOURCE_ICON false The icon that appears on native listings. https://www.reservoir.market/reservoir.svg
NEXT_PUBLIC_DISABLE_POWERED_BY_RESERVOIR false Use this to disable the Powered by Reservoir tag on modals. true
NEXT_PUBLIC_DARK_MODE false Use this to enable dark mode theme. true
NEXT_PUBLIC_THEME_SWITCHING_ENABLED false Use this to allow users to toggle between the dark and light theme. If NEXT_PUBLIC_DARK_MODE is enabled then that will be the default theme selected. true
NEXT_PUBLIC_PRIMARY_COLOR false Use this to select your primary color. default, red, orange, lime, green, blue
NEXT_PUBLIC_FONT_FAMILY false Primary sans font used in your marketplace. Inter, Montserrat, Open Sans, Playfair Display, Roboto, Druk, Nunito Sans, Lucida Grande, Gazpacho, Frank Ruh Libre, Chalkboard, Gothicus Roman, Styrene B Black, Montserrat Uppercase Bold Italic
NEXT_PUBLIC_BODY_FONT_FAMILY false Secondary font family used in your marketplace. Inter, Montserrat, Open Sans, Playfair Display, Roboto, Druk, Nunito Sans, Lucida Grande, Gazpacho, Frank Ruh Libre, Chalkboard, Gothicus Roman, Styrene B Black, Montserrat Uppercase Bold Italic
NEXT_PUBLIC_FONT_URLS false Use in conjunction with NEXT_PUBLIC_FONT_FAMILY and NEXT_PUBLIC_BODY_FONT_FAMILY to pull in a remote font, using services like google fonts, adobe fonts etc. https://fonts.googleapis.com/css2?family=Blaka&display=swap,https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap
NEXT_PUBLIC_BANNER_IMAGE false The background banner image used on collection pages. If not set this will use the default collection banner. https://www.reservoir.market/banner.png
NEXT_PUBLIC_DISABLE_COLLECTION_BG false Use this to hide the background banners on collection pages. true
NEXT_PUBLIC_TAGLINE false A tagline to be displayed in the homepage. Only available if NEXT_PUBLIC_COLLECTION and NEXT_PUBLIC_COMMUNITY are unset. Buy, sell and collect NFTs!
NEXT_PUBLIC_FOOTER_ENABLED false If enabled, a footer will be displayed on the homepage and the list of trending collections will be capped at 100. true

SEO Configuration

Environment Variable Required Description Example
NEXT_PUBLIC_META_TITLE false The text used in the <title> tag. Reservoir Market | Open Source NFT Marketplace
NEXT_PUBLIC_META_DESCRIPTION false The text used in the meta description Reservoir Market is an open source NFT marketplace built with Reservoir.
NEXT_PUBLIC_META_OG_IMAGE false The image used in the meta og images . https://www.reservoir.market/og.png

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.

(back to top)

Contributing

If you'd like to contribute please follow the guidelines.

Contact

Twitter: @reservoir0x Project Link: Reservoir

(back to top)

marketplace-v1's People

Contributors

bstchow avatar cap10bad avatar dependabot[bot] avatar georgeroman avatar jakerockland avatar lingzizheng avatar lunarmayor avatar pandurand avatar pedromcunha avatar ptrwtts avatar r3lays avatar rogerpodacter avatar rorygeoghegan avatar ted-palmer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

marketplace-v1's Issues

Update general marketplace home

Frame 3 (1)

Acceptance criteria:

  • Update 'Your Logo Here' to be reservoir.market logo
  • Update 'powered by reservoir' to be 'What is reservoir.market?' -> This should still open pop-up modal when clicked.
  • Update styling of collections (removing price data) and only display top 16
  • When user searches for collection it should navigate to /collection/{collection-id} not the subdomain

Site logo should match the domain/sub-domain

For example:
For general marketplace use reservoir.market logo (reservoir.market)
For Bored Apes Yacht Club use Bored Apes Yacht Club logo (boredapesyachtclub.reservoir.market)
For Bored Apes Community use BAYC logo (bayc.reservoir.market)

Mobile Web: Collection Page

Frame 8

  • Add a bit more padding to left of reservoir.market logo
  • Add a bit more padding to right of wallet address
  • Reduce padding between header and banner
  • Center banner
  • Increase font size of collection name
  • Increase size of collection logo
  • Make collection data 2 lines
  • Remove faint line that appears on the left and right of the collection header (see screenshot below)
    Screen Shot 2022-02-01 at 12 04 05 PM

BUG: Incorrect total being calculated

  1. I make an offer for 0.01 ETH

Screen Shot 2022-02-02 at 6 49 13 PM

Expected:
Total cost with royalty should be 0.011 and displayed offer should be 0.01

Actual:
Top offer is appearing as 0.0099
Screen Shot 2022-02-02 at 6 49 32 PM

Errors when running locally

The goal should be that a user can check out the repo, run it locally, and it works out of the box. I got two different errors when I tried to do this.

On the root URL:

error - lib/params.ts (11:41) @ eval
TypeError: Cannot read properties of undefined (reading 'toString')
   9 | ) {
  10 |   Object.keys(query).map((key) =>
> 11 |     url.searchParams.set(key, query[key].toString())
     |                                         ^
  12 |   )
  13 | }

And when using a subdomain, it failed if I did not specify open sea api key. What is this used for? Also why does it say that an infura key is needed? What is that used for?

Update general marketplace home

  • Replace 'Sample Marketplace' with 'Your Logo Here' in top left corner
  • Replace 'WELCOME TO OUR SAMPLE MARKETPLACE!' with 'Discover, buy and sell NFTs'
  • Replace 'Fork me on GitHub' with 'powered by reservoir' (do this on collection and community pages too)

Frame 3

Cancellation improvements

  • There's no way to cancel listing. Let's do it same as cancelling offer
  • While cancelling, the buy now button copy changed to pending. Only the cancel copy should
  • After the cancellation was successful, it still showed button to cancel. Didn't happen every time, but definitely once. Maybe a race condition where API hasn't updated. Similar to when making purchases, we should poll API to make sure it is updated before changing state

Configure collection / community via ENV variable

As discussed, it should be possible to set the collection / community via ENV variable. This should be checked first, and override the subdomain:

NEXT_PUBLIC_COLLECTION={collection-slug}
NEXT_PUBLIC_COMMUNITY={community-id}

This might have been done already, but I couldn't find it. I updated README to reflect this, so let's make sure it matches the described behavior.

No margin on 13 inch laptop

The breakpoints should include padding in their calculation, so that you never experience the page without padding
Screen Shot 2022-02-04 at 4 41 04 am

Add Reservoir information pop up

When a user clicks on the 'powered by reservoir' icon open a pop up modal that contains information about Reservoir and how they can fork the repo.

Copy:

What is Reservoir?
Reservoir is a web3-native NFT order book protocol and framework powering marketplaces and tools all sharing a global pool of liquidity.
Learn more

What is this sample app for?
This is a sample marketplace built to highlight some of the functionality you can access immediately when building with Reservoir.

Check out some other examples below:

General Marketplace
https://reservoir.market/

Bored Ape Yacht Club Collection Marketplace
https://boredapeyachtclub.reservoir.market/

BAYC Community Marketplace
https://bayc.reservoir.market/

All of our sample marketplaces are fully functional but we also encourage developers to fork our GitHub repository here.

Acceptance criteria:

  • 'Learn more' links to https://reservoirprotocol.github.io/
  • 'fork our GitHub repository here' likes to sample app repo
  • Don't display the example link for the marketplace the user is current on. Eg. If I am on the general marketplace, only list the Bored Ape Yacht Club Collection Marketplace and BAYC Community Marketplace examples.
  • User can close the modal

Frame 4

Update collection logos

  • When displaying collection logos use cover instead of contain
  • When displaying collection logos use circles instead of squares
  • Make these changes anywhere a collection logo appears on the site (general market home, search, collection page etc)

Offer Modal Tweaks

Screen Shot 2022-01-20 at 10 01 16 AM

  • the total cost doesn't include the fee
  • i don't think you need to show the amount of fees, just the percentage
  • can we make it a bit wider, so that weth notice doesn't wrap
  • let's move the weth notice under the total cost. it's confusing why it's wrapping more than my input amount until i've seen fees
  • it doesn't make sense to have a tick box for posting a collection wide offer. instead, the modal will always be triggered with either a token, collection or attribute, and the logic should differ for each. i'll do quick mocks of the variations
  • i actually have WETH. but when i tested this, I was connected to mainnet, which i assume is why it got my balance wrong. let's add the warning banner, and also not let you access the modals until you're connected to correct network
  • let's use the ETH image instead of the 3 lines. looks a lot cleaner
  • the total cost amount should be bigger and bold
  • let's make the expiry selection a drop-down, so it's clean on one line
  • Rename the open sea option to "Also post to Open Sea"

See new modal mocks here: https://www.figma.com/file/g11iTdlOPKsP1uXJ9TXxBG/Community-Marketplace?node-id=0%3A1

Update content in What is reservoir.market?

Reservoir.market is a demo marketplace designed to show how simple it is to build on top of Reservoir, a web3-native order book protocol.

It supports 3 modes:

It comes with all the functionality you expect (browsing, listing, buying, etc), as well as powerful new features like trait exploration and bidding.

It's open-source, and ready to be forked. Just add lore.

Learn more about our project here.

Add attribute bid pop modal

When filtered onto a specific attribute, the 'Make a collection bid' button will become 'Make an attribute bid' button. The user can the click this button and make a bid on a specific attribute.

Update community home

Frame 6

Acceptance criteria:

  • Update 'Your Logo Here' to be reservoir.market logo
  • Update 'powered by reservoir' to be 'What is reservoir.market?' -> This should still open pop-up modal when clicked.
  • Update styling of collections (removing price data) and center them on the page

Update collection page - All tokens

Collection Page - All tokens (1)

Acceptance criteria:

  • Update 'Your Logo Here' to be reservoir.market logo
  • Update 'powered by reservoir' to be 'What is reservoir.market?' -> This should still open pop-up modal when clicked.
  • Add collection banner and gradient to each collection page
  • Update collection title and status
  • Add 'Buy for {collection floor} ETH' button to allow user to instantly buy cheapest token from collection
  • Add 'Make a collection bid' button to open collection bid module
  • Update attributes filtering and sorting options from reservoir.app

Note: Where designs use Ξ symbol please replace with eth icon:
image

Update collection page - Filtered by attributes

Collection Page - Filtered attribute (1)

Acceptance criteria:

  • Add 'Buy for {attribute floor} ETH' button to allow user to instantly buy cheapest token from the attribute
  • Add 'Make an attribute bid' button to open attribute bid module

Update Search

  • Add more padding between left side of search box and 'Search for an NFT collection' text
  • Show top results when clicking in search box
  • It appears to takes double time to render result after receiving response from backend. Can this be improved?

Clean up responsive web

  • Hide power by reservoir
  • Increase width of search bar so all text is visible
  • Decrease size of collections and display in two columns so that more can be seen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.