Skip to content

ArvellonB/Alpha-Defi-File-Storage

Repository files navigation

Decentralized File Storage Hey there! I'm Arvellon, and this is Decentralized File Storage, a project I built to store files in a secure and decentralized way using IPFS and blockchain. The idea behind this project is to give file owners complete control over their files, allowing them to manage who accesses their files and charge for it if they want to—all while keeping everything secure on the blockchain.

What's This Project About? In simple terms, this smart contract lets you:

Upload files: Store your files using IPFS, with their details safely tracked on the blockchain. Set Access Fees: You can charge others to access or download your files. Transfer File Ownership: If you want to hand over your files to someone else, you can easily transfer ownership. Delete Files: You’re in charge—you can delete your files whenever you want. Track Downloads: Check who’s been accessing your files with a detailed download history. Everything works on the blockchain and IPFS, so there’s no need to rely on traditional servers or middlemen.

How Does It Work? When you upload a file, the actual content goes to IPFS (a decentralized file system), and the details—like who owns it, how much it costs to access, and download history—are stored on the blockchain. This ensures both transparency and security.

Getting Started What You'll Need Node.js (if you're using Truffle or Hardhat to deploy) Solidity Compiler (through Remix, Truffle, or Hardhat) IPFS (for storing the files themselves) Steps to Use Clone the project:

bash Copy code git clone https://github.com/ArvellonB/Defi-File-Storage.git cd Defi-File-Storage Install dependencies (if you're using a tool like Truffle):

bash Copy code npm install Compile the contract:

If you’re using a tool like Truffle, compile the smart contract:

bash Copy code truffle compile Deploy it to the blockchain:

bash Copy code truffle migrate --network <your_network> Start interacting:

You can use Remix, Truffle, or your own dApp to interact with the contract:

Upload a file: Call the uploadFile() function with the file name, IPFS hash, and the access fee. Access a file: Call accessFile() with the file ID and pay the required fee. Delete a file: If you're the owner, use deleteFile() to remove it. Transfer file ownership: Use transferOwnership() to give the file to someone else.

About Me I'm Arvellon, and I created this project to explore how decentralized storage can work using blockchain and IPFS. Feel free to contribute, fork the project, or even use it as a stepping stone for your own projects! Just Please Ask first

License This project is licensed under the MIT License. You can find more details in the LICENSE file.

Update to README

About

Decentralized File Management

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published