MCPcopy Index your code
hub / github.com/Jerga99/nft-marketplace

github.com/Jerga99/nft-marketplace @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
89 symbols 226 edges 35 files 29 documented · 33%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

This is a Next.js project. Full process and video lectures how to create the application can be found here: NFT Marketplace in React, Typescript & Solidity - Full Guide

Overview

Marketplace has dependencies on multiple technologies.

  • Pinata - store images, and NFT metadata
  • Ganache - private Blockchain, to run application localy

To run the app

  1. run npm install to install dependencies

  2. In the root folder of the application create a .env.development file with following content:

NEXT_PUBLIC_NETWORK_ID=5777
NEXT_PUBLIC_TARGET_CHAIN_ID=1337
NEXT_PUBLIC_PINATA_DOMAIN=https://gateway.pinata.cloud

SECRET_COOKIE_PASSWORD={your custom at least 32 characters long password!}

PINATA_API_KEY={your api key from pinata}
PINATA_SECRET_API_KEY={your api secret key from pinata}
  • (your api pinata key has to allow pinFileToIPFS and pinJSONToIPFS rules)

  • Then migrate a contract to Ganache, contract can be found in the contracts folder. It's called NftMarket.sol

  • To migrate the contract run truffle migrate in the terminal while Ganache network is setup and running.

  • Do not forget to link trufle-config.js with Ganache, just go to config and click Add Project

  • keys.json must be created if you want to deploy to Ropsten, if not, just remove import of keys.json from trufle-config.js and also comment out ropsten configuration

  • Now everything is setup and you can test out the app.

  • Run npm run dev in the terminal. App will run at localhost:3000

Extension points exported contracts — how you extend this code

ContractTransactionOverrides (Interface)
(no doc)
types/nftMarketContract.ts
Window (Interface)
(no doc)
components/providers/web3/utils.ts
ContractCallOverrides (Interface)
(no doc)
types/nftMarketContract.ts
NftMarketContractEventsContext (Interface)
(no doc)
types/nftMarketContract.ts
ApprovalEventEmittedResponse (Interface)
(no doc)
types/nftMarketContract.ts
ApprovalForAllEventEmittedResponse (Interface)
(no doc)
types/nftMarketContract.ts

Core symbols most depended-on inside this repo

mintToken
called by 6
types/nftMarketContract.ts
getOwnedNfts
called by 5
types/nftMarketContract.ts
useHooks
called by 4
components/providers/web3/index.tsx
tokenURI
called by 3
types/nftMarketContract.ts
getAllNftsOnSale
called by 3
types/nftMarketContract.ts
useNetwork
called by 3
components/hooks/web3/index.ts
classNames
called by 3
pages/profile.tsx
ownerOf
called by 2
types/nftMarketContract.ts

Shape

Function 44
Method 34
Interface 11

Languages

TypeScript100%

Modules by API surface

types/nftMarketContract.ts44 symbols
components/providers/web3/index.tsx8 symbols
pages/nft/create.tsx7 symbols
components/providers/web3/utils.ts4 symbols
components/hooks/web3/index.ts4 symbols
components/hooks/web3/useAccount.ts3 symbols
pages/profile.tsx2 symbols
pages/api/utils.ts2 symbols
components/ui/nft/item/index.tsx2 symbols
components/ui/navbar/index.tsx2 symbols
components/ui/navbar/Walletbar.tsx2 symbols
pages/index.tsx1 symbols

For agents

$ claude mcp add nft-marketplace \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact