NFT Minting Frontend
Overview
This project is a Next.js-based frontend for an NFT minting dApp. It integrates Wagmi and RainbowKit for Ethereum wallet connections, utilizes Tailwind CSS for styling, and interacts with an NFT smart contract deployed on the blockchain.
Features
Wallet connection using Wagmi and RainbowKit
NFT minting functionality
NFT gallery to display minted NFTs
Tailwind CSS for modern UI design
TypeScript support
Gas estimation before transactions
Responsive design for mobile and desktop
Project Structure
nft-minting-frontend/ ├── abi/ │ └── NFTMintABI.json // Smart contract ABI file ├── components/ │ ├── MintWidget.tsx // Component for minting NFTs │ ├── NftGallery.tsx // Component for displaying NFTs │ ├── WalletConnect.tsx // Component for wallet connection │ ├── GasEstimator.tsx // Component for estimating gas fees ├── pages/ │ ├── _app.tsx // Custom App wrapper with WalletProvider │ ├── index.tsx // Home page with minting and gallery │ └── about.tsx // About page for project information ├── providers/ │ └── WalletProvider.tsx // Wallet connection setup using Wagmi and RainbowKit ├── public/ │ └── fallback-image.png // Default NFT image ├── styles/ │ └── globals.css // Tailwind CSS global styles ├── .eslintrc.mjs // ESLint configuration ├── next.config.ts // Next.js configuration ├── next-env.d.ts // Next.js environment types ├── package.json // Project dependencies and scripts ├── tailwind.config.ts // Tailwind CSS configuration └── tsconfig.json // TypeScript configuration
Deployment The app is currently been deployed at : https://nft-minting-frontend-nine.vercel.app/
You can navigate through the hosted app to see its functionalities
Installation
git clone https://github.com/EmmanuelVegher/nft-minting-frontend.git cd nft-minting-frontend
npm install
npm run build
npm run start
The app will be available at http://localhost:3000.
Environment Variables
Create a .env.local file in the root directory and add the following:
NEXT_PUBLIC_BACKEND_URL=http://localhost:4000 NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID='Your-Project-ID' NEXT_PUBLIC_RPC_URL=https://sepolia.infura.io/v3/"Your-RPC-ID" NEXT_PUBLIC_CONTRACT_ADDRESS=0xYourContractAddress NEXT_PUBLIC_CHAIN_ID=1
Replace 0xYourContractAddress with the actual deployed contract address.
Usage
Connect your Ethereum wallet using the "Connect Wallet" button.
Mint an NFT by filling out the required fields and clicking "Mint".
View minted NFTs in the NFT Gallery.
Check gas fees before minting using the gas estimator.
Dependencies
next: React framework for server-side rendering
react: UI library
wagmi: Wallet integration and Ethereum utilities
@rainbow-me/rainbowkit: UI for Ethereum wallet connection
tailwindcss: Utility-first CSS framework
viem: Ethereum interaction library
ethers: Library for interacting with Ethereum smart contracts
Scripts
npm run dev - Start development server
npm run build - Build for production
npm run start - Start the production server
npm run lint - Run ESLint
License
This project is licensed under the MIT License.