This project is a web application that combines geolocation data with NFT (Non-Fungible Token) generation. It displays maps, location information, and allows users to create NFTs without requiring wallet extensions like MetaMask. The project is built with Next.js, Ethers.js, React Google Maps API, and Shadcn UI components.
This dapp implements a unique approach to creating NFT tokens without requiring users to have a wallet extension like MetaMask. Here's how it works:
Ethers.js Wallet: We use Ethers.js to manage a wallet using private key on app itself. This wallet is used to interact with the Ethereum blockchain on behalf of the user.
- Next.js - React framework for building web applications
- Ethers.js - Library for interacting with the Ethereum blockchain
- React Google Maps API - React components for Google Maps
- Shadcn UI - Re-usable components built with Radix UI and Tailwind CSS
- Smart contract has been deployed on the Sepolia testnet. View Contract
- Display maps using Google Maps API
- Generate NFT tokens based on geolocation data
- Interact with Ethereum blockchain using Ethers.js without wallet extensions
- Modern and responsive UI using Shadcn components
- Node.js (version 14 or later)
- npm or yarn
- Google Maps API key
- Ethereum node provider (Alchemy)
- Navigate to a location on the map or enter coordinates.
- Get your private key. checkout here.
- Click
Open & Save private key
key Button and paste the key, Don't worry we do not save your private key anywhere. - Click on the "Generate NFT" button to create an NFT based on the current location.
- Confirm the transaction in the application interface.
- You can confirm the transaction from here by copying and pasting your token/tnx ID in Sepolia Testnet Explorer.
- Once confirmed, your NFT will be minted and associated with the chosen location.
The project includes a custom smart contract for generating NFT tokens without requiring users to have a wallet extension. This contract handles:
- Minting of NFTs based on geolocation data
- Association of NFTs with specific coordinates
- Management of NFT ownership and transfers
To interact with the contract:
- Deploy the contract to your Ethereum (Sepolia network).
- Update the
NEXT_PUBLIC_CONTRACT_ADDRESS
in your.env
file with the deployed contract address. - Use the provided functions in the frontend to interact with the contract through Ethers.js.