A web app generating NFT images using real-time weather data. Uses Node.js, Express.js, Wagmi smart contract integration. Auto-updates NFTs every 6 hours. Perfect for exploring dynamic NFTs & external data integration.
This section provides an overview of how the project works. It covers the steps involved in creating the contract, minting the NFTs, and updating the NFT metadata.
To create the contract, follow these steps:
- Use the provided Endpoint to create the contract. You can find more details in the Verbwire API documentation.
You have two options for minting the NFTs:
- Use the provided Endpoint to mint the NFTs from a metadata URL. Refer to the Verbwire API documentation for more details.
- Implement the contract write function named
mint(address recipient, string memory tokenURI, uint256 quantity) payable
within your application's codebase. - Provide the recipient's address, token URI (metadata URL), and the desired quantity as parameters when calling the
mint
function. - This function allows you to mint NFTs directly through the contract by interacting with its write functions.
To update the NFT metadata, follow these steps:
- Use the provided Endpoint to update the token metadata. Details can be found in the Verbwire API documentation.
- This Endpoint allows you to update the metadata associated with an existing NFT. You can provide the token ID and the new metadata information to update.
Before running the project, ensure that you have the following dependencies installed:
- Node.js
- npm (Node Package Manager)
- Metamask Account
The following files need to be modified before running the project:
Navigate to the following file: client -> src -> Components -> Credentials.jsx
Inside the Credentials.jsx
file, update the following values:
- Verbwire API Key
- Contract Address
- Infura Key, get infura keys here
Navigate to the following file: server -> credentials.js
Inside the credentials.js
file, update the following values:
- Verbwire API Key
- Contract Address
- Weather API Key, get the key here
To run the application, follow the steps below:
-
Run the client:
- Open a terminal
- Navigate to the
client
directory:cd client
- Install the required dependencies:
npm install
- Start the client application:
npm run dev
-
Run the server:
- Open another terminal (in a separate window or tab)
- Navigate to the
server
directory:cd server
- Install the required dependencies:
npm install
- Start the server application:
npm run dev
Once both the client and server are running, your application should be up and running!
You can access the application by opening your web browser and navigating to the appropriate URL.
For additional reference, you can also check out this video tutorial: Weather NFT Project Video
That's it! You should now have the project set up and ready to use. If you have any questions or run into any issues, please feel free to reach out. Happy coding!