There are 2 frames available, one for users to post their paywalled content, another one for viewing the content.
Frame files can be found in frames.
Contracts can be found in contracts.
Main homepage can be found in frontend.
- create and upload content in /post frame
- we send a message to poster, with the correct content to share /post/:id
- user loads frame at /post/:id
- server checks if user has nft of /post/:id 2a. retrieve db entry 2b. retrieve ipfs data with ipfs hash 2c. check if requestor's address has NFT of :id 2d. if yes, decrypt the ipfs data and render it 2e. otherwise, display nothing ("PAYWALLED")
- if user does not have access, add a buy button 3a. mint() on nft address 3b. if succeeded, load the frame by going to 1.
PaywallTokenFactory.sol
- poster address => 721 address
entry point when creating a paywalled content
PaywallToken.sol
- ipfs hash
- content owner
used to check whether user has access to paywalled content
Database
id => ipfsHash, poster address, nft address
- add a home page
- upload custom content
- view all posted content
- view all content that you bought
- subscription per user instead of per post