Git Product home page Git Product logo

bsc-nft-explorer's Introduction

BSC NFT Explorer

Explore NFTs and key NFT metrics on Binance Smart chain

BSC.NFT.Explorer.mp4

Implementation

The app relies on:


Lightning-fast performance

Usually web apps face a trade-off between slowly fetching the latest data (requests take time) or quickly displaying static data (which is out of date).

BSC NFT Explorer loads lightning fast statically-generated pages whilst continiously displaying the latest data. This is made possible by the one of the latest features on Next.js, Incremental Static Regeneration (ISR). For each NFT collection's page, the server will attempt to regenerate the page once every 10 seconds.


Interactive charts

BSC NFT Explorer features interactive, zoomable charts, made possible by the Apexcharts package.


Add a new NFT collection in seconds

Simply go to collections.json, append the collection address, and then deploy. That's it!

All of the collection's data, from its name and size, to daily volume and prices, are fetched using the contract address you added.

BSC NFT Explorer also allows site visitors to request a collection to be added. Site administrators can easily see the latest requests and approve them in the Github issues tab.

How a site visitor can request a collection to be added:

  • Click the request button on the homepage
  • Enter the contract address of the collection, and press submit
  • This will automatically create a new Issue on Github
  • Once the site administrator has approved the addition by adding the label 'approved-collection' to the Issue, a Github workflow appends the address to collections.json and generates a pull request (wip)
  • The site administrator approve the PR, automatically triggering a rebuild - the collection is added

Setup

  • Clone the repository
  • Add your COVALENT_KEY in the .env file
  • Run yarn install
  • Run yarn dev

Local development notes

  • The web app makes requests to the Covalent API
  • Requests to Covalent are data-heavy and require the Covalent servers to perform complex queries
  • Fetch requests to the covalent server may take longer than expected
  • In times of high server load, the Covalent server may return a 501 error and timeout - redeploy or refresh the page to retry
  • In production, pages are statically generated at build-time so that the experience is instant
  • Use fewer contracts in collections.json just for when developing locally if fetch requests are too slow

Deploy

The easiest way to deploy is using Vercel.

  • Add your COVALENT_KEY to your Vercel project's environment variables

Deploy with Vercel

bsc-nft-explorer's People

Contributors

poogooflupduck avatar

Watchers

 avatar

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.