Skip to content
/ docupay Public

DocuPay is a DApp backed by a smart contract where users can quickly share PDF files on informational products or reports, and get paid in Ethereum when someone purchases their file to download

Notifications You must be signed in to change notification settings

cate-k/docupay

Repository files navigation

DocuPay

What is DocuPay?

DocuPay is a DApp backed by a smart contract where users can quickly share PDF files on informational products or reports, and get paid in Ethereum when someone purchases their file to download.

Technology

DocuPay was built using Solidity, ReactJS, Truffle, Ganache, and Infura. Its smart contract is deployed on the Sepolia testnet on the Ethereum blockchain and can be found on Etherscan.

Note

This project was completed in February 2022, but it was originally on the Ropsten and Goerli testnets. Due to those testnets closing, DocuPay moved to Sepolia in March 2023.

How It Works

1. On the home page, the user can connect their MetaMask wallet to DocuPay. For new users, an account is automatically created using their wallet's public address once the "Sign in" button is clicked.

1 - Home

2. The user can upload PDF files and add a title, fee (in gwei), and description. Once the "Publish" button is clicked, a MetaMask transaction will appear for the user to confirm.

2A - Upload Document

2B - Upload Document

3. All posts can be viewed on the feed page, and they can be favourited by clicking the star icon on the left-hand side of the post.

3 - Feed

4. Once the user has clicked on a document to view, they may upvote, downvote, favourite, and comment on it. Comments can be deleted, and they can be liked by other users. Under the comment message is also a status that shows if the commenter has purchased the document or not.

4A - Document

4B - Document

Clicking on the "Purchase document" button triggers two MetaMask transactions. The transactions add the document to the user's library and send the fee to the uploader.

4C - Document

After the transactions have been confirmed, the "Purchase document" button will change to "Download document." This allows the user to directly download the PDF file.

4D - Document

The status on comments sent previously also changes if the commenter purchases the document.

4E - Document

5. In the library, the user can view documents they have favourited and purchased. Purchased documents have an eye icon on the "View document" button to let the user see which documents they already have at a glance.

5 - Library

6. The profile page contains information such as the user's public address, display name, reputation, and documents they have uploaded. On the user's own profile, they may edit their display name.

6 - Profile

About

DocuPay is a DApp backed by a smart contract where users can quickly share PDF files on informational products or reports, and get paid in Ethereum when someone purchases their file to download

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published