Inspiration

NFTs have been overrun by visual artists who make any type of visual available for users to buy, collect and own. How can writers/authors start monetizing and immortalizing their creative works if there are no reliable tools and platforms available for them to use? NFTs use blockchain technology to generate immutable assets and we don’t want to publish our writings with errors and typos. PUB3 can help writers to tokenize their writing and spot errors before minting with the help of Artificial Intelligence by OpenAI. Traditional publishing services could take weeks to reach out to their readers and PUB3 will do all of it in a minute, anytime, anywhere!

What it does

Users can register as authors to start publishing with PUB3. Authors can transform any form of text writings into NFTs in a minute. They can get some help from AI to spot any errors and typos on their writings before minting. After minting, author’s name, title and its content will appear inside each NFT when viewed at Opensea.

How we built it

First, I need to design an ERC-721 smart contract for mutable and on-chain NFTs. I use Remix CLI for faster coding, testing, flattening and deployment of smart contracts. After that, I design the animated SVG NFT visual to be inserted inside TOKENURI of smart contracts. Opensea NFT Marketplace will render the NFT based on on-chain Token Data. Each NFT contains the author’s name, title and the auto-scrolling content. I use hardhat to check the TOKENURI when a user mints an NFT and also to generate its contractABI.json to be used on the front-end. After successfully deploying and verifying my smart contract, it's time to work on the react front-end. I use ethers.js to connect my front-end to the smart contract on the blockchain and some react bootstraps and CSS to style my dapp site. I integrated the OpenAI API that is instructed to correct the content's grammar before minting. The author will decide which one to publish. After the NFT is minted, it will appear in a minute at Opensea and be rendered on the dapp site as well.

Challenges we ran into

On-Chain NFT is hard to make. It is a combination of mutable and dynamic NFTs. You need to design the NFT art through code and fully understand how NFTs are being rendered at Opensea. You need to insert the animated SVG inside the smart contract without exceeding the maximum smart contract file size. You need a lot of head scratches and creative thinking to make this all happen all at once in just one secure smart contract and make it work even on front-end. After hundreds of trial and errors, on my console, testnet and even on mainnet, because sometimes Opensea doesn't render my NFT Visuals correctly, I finished it with a smile.

Accomplishments that we're proud of

I made this all by myself and I am proud. I used the power of Artificial Intelligence and Blockchain Technology to create a reliable decentralized application to help authors/writers publish their creative works in just a few clicks. They can now publish, connect and reach their readers globally.

What we learned

I learn how to work and utilize the power of animated SVG, dynamic NFTs, mutable NFTs, smart contracts and Artificial Intelligence to solve real problems and improve one's life then thrive!

What's next for AI-Assisted Self-Publishing Service (NFT4Writers)

I want to improve its UI/UX. The possibilities of this dapp in publishing industry is massive so I will add more feature to it and use some other technologies to further improve it.

Built With

Share this project:

Updates