GenIA is a platform that allows users to enter a command prompt to generate an image and simultaneously mint it as an NFT on the Aurora Blockchain. These NFTs can then be instantly sold on our platform for GenIA tokens, which can be used to pay for the generation of new images using AI prompts. Our tokens can be easily purchased using QR Code payments through PIX, the brazilian way of sending money fast and tax-free. Click here to see our demo
- Typescript and Next.js for the front-end
- MetaMask to connect the user with the front-end
- LayerX for connect the front-end functionalities to the contracts
- Aurora blockchain for minting NFTs
- ERC20 and ERC721 protocols for the GenIA token and NFTs
- Polygon for bridging between Aurora and Chainlink
- Chainlink for connecting to our own API (back-end)
- Node.js for the back-end
- DALL-E2 API for generating AI images
- Cloudinary for storing the images with a default URL
- Generate and mint NFTs with AI images using the DALL-E2 API and the Aurora blockchain
- Connect your MetaMask wallet to the website and interact with the application, using our Tokens (GenIA)
- View your own NFTs generated by DALL-E2 on the website
- Browse a marketplace of NFTs minted by other users
- Buy our tokens in a blazing fast fashion using PIX
This is how the application works.
-
Our front-end uses LayerX to connect to the Aurora blockchain to make requests. At the same time, it is possible to use your MetaMask to buy our ERC20 token (GenIA), which will be used to mint a ERC721 NFT.
-
This is our GenIA token:
-
To make the mint really work, we use a bridge connection to Polygon so that we can use the Chainlink protocol to make some API calls to our backend. This allows us to make on-chain API calls directly to our back-end, which will send another call to the OpenAI API for the image generation with DALL-E2 AI.
-
After that, the image is stored into Cloudinary with a previously settled URL, so we can make it easy to show up the NFTs in our front-end application (in My Collections and in NFT Marketplace spaces).
-
Take a look on this Flowchart representation:
cd frontend
npm install
- Set the envoriment variables
NEXT_PUBLIC_CHAIN_ID
,WEB3_HOST_PROVIDER
- npm run dev
cd backend
npm install
- Set the envoriment variables that connect to the cloudinary database and openAi API,
OPENAI_API_KEY
,CLOUDINARY_API_KEY
,CLOUDINARY_API_SECRET
. node index
cd contracts
npm install
- Set your the DEPLOY_INFURA_KEY and PRIVATE_KEY variables
npx hardhat run --network aurora ./scripts/deployAurora.ts
npx hardhat run --network mumbai ./scripts/deployMumbai.ts
-
When you load the page, you'll see a brief overview of how to use GenIA. You'll also find the 'Try GenIA' button on the same page. Once you click on it, you'll be prompted to connect your MetaMask to the site.
-
Once you've successfully connected your MetaMask, you'll see a text box where you can input your own PROMPT. This PROMPT will be used to generate an AI image from the DALL-E2 API. To mint an NFT on the Aurora blockchain, simply click on the 'Generate' button.
-
Additionally, you can always scroll down the main page to access the AI-generated NFT Marketplace, where other users sell their own NFTs. If you have a connection with MetaMask on the site, you'll be able to purchase other people's NFTs.
-
If you have your wallet connected, you will also be able to click on My Collection to see your own AI generated NFT collection! There, you also will be able to SELL your NFT in the webpage marketplace, choosing the price in GenIA Token.
Twitter: https://twitter.com/GenIANFTMarket Instagram: https://www.instagram.com/genianft/