This project demonstrates how to create and manage NFT collections on the Ethereum blockchain. It includes:
- nft-contracts: Solidity contracts for creating and managing NFT collections.
- nft-backend: An Express server to handle events emitted by the smart contracts.
- nft-frontend: A web application to interact with the smart contracts.
- Navigate to nft-contracts directory:
cd nft-contracts
- Install dependencies:
yarn
- Create .env file and populate env variables (refer to .env.example):
RPC_URL=
PRIVATE_KEY=
- Run tests
yarn test
- Deploy contract either locally
yarn deploy-local
or on Sepolia testnet
yarn deploy
- Navigate to nft-backend directory:
cd nft-backend
- Install dependencies:
yarn
- Create .env file and populate env variables (refer to .env.example):
RPC_URL=
FACTORY_CONTRACT_ADDRESS=
- Start the backend server:
yarn start
- Navigate to nft-frontend directory:
cd nft-frontend
- Install dependencies:
yarn
- Create .env file and populate env variables (refer to .env.example):
RPC_URL=
FACTORY_CONTRACT_ADDRESS=
- Start the frontend server:
yarn start
This will open the application in your default web browser. If not go to
http://localhost:9000/
- Create a new NFT Collection: Enter a name and symbol for the collection and click "Create".
- Mint a new NFT: Enter the collection address, recipient address, token ID, and token URI, then click "Mint".
The backend server will listen to events emitted by the smart contracts and store them in memory, serving them via HTTP endpoints at /collections and /tokens.