I'm beginning my journey with blockchain and smart contracts. I want to create web application - blog or articles website. Each user will be able to write an article and save it. Every article will be available to other users for purchase in ethers. Each user will be authenticated via metamask. I already write signing implementation and now I want to ask if my idea is correct.
So the way that I want to achieve it is:
- User creates text, set the price for it and clicks on send button.
- Text is send to the server and server save it as an article to the database and create one unique NFT smart contract and deploy it automatically to the blockchain. The creator of an article is the owner of the smart contract.
- Articles are being displayed on the website to anyone.
- If user wants an access to any article on the website, he must pay for it - which means mint 1 NFT - which means call a mint function of an NFT smart contract and pay the price for it that the owner has set. The tokens are kept in smart contract to withdraw by the owner.
- If user minted token successfully, he owns the NFT token and now he has access to the article (he will get it from the database when a server checks that he actually owns it).
So basically there will be one nft smart contract for each article. Creators will be the owners and they will be able to call withdraw function to get earned tokens. Everyone could be article creators and everyone could be article readers.
What do you think about my implementation steps? Is there any way to make if simpler or better?