Skip to content

Latest commit

 

History

History
86 lines (62 loc) · 4.37 KB

README.md

File metadata and controls

86 lines (62 loc) · 4.37 KB

GenIA - AI Powered NFT

Overview

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

Technologies Used

  • 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

Features

  • 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

Flowchart

This is how the application works.

  1. 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.

  2. This is our GenIA token:

Design Token GenIA

  1. 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.

  2. 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).

  3. Take a look on this Flowchart representation:

GenIA Flowchart

Getting Started

Requirements

Front-end

  1. cd frontend
  2. npm install
  3. Set the envoriment variables NEXT_PUBLIC_CHAIN_ID, WEB3_HOST_PROVIDER
  4. npm run dev

Back-end

  1. cd backend
  2. npm install
  3. Set the envoriment variables that connect to the cloudinary database and openAi API, OPENAI_API_KEY, CLOUDINARY_API_KEY, CLOUDINARY_API_SECRET.
  4. node index

Contracts

  1. cd contracts
  2. npm install
  3. Set your the DEPLOY_INFURA_KEY and PRIVATE_KEY variables
  4. npx hardhat run --network aurora ./scripts/deployAurora.ts
  5. npx hardhat run --network mumbai ./scripts/deployMumbai.ts

Requirements

Usage

User Interface

  1. 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.

  2. 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.

  3. 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.

  4. 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.

Redes sociais

Twitter: https://twitter.com/GenIANFTMarket Instagram: https://www.instagram.com/genianft/

Team:

DannxC GabrielMaiaBR Rafael450 Rafa658