Prototype to store files on IPFS and Ethereum Blockchain.
The Secure File Sharing Blockchain project leverages IPFS and Ethereum blockchain technology to provide a decentralized, secure, and transparent platform for sharing files among users. The project aims to combine blockchain's immutability and decentralization with the distributed storage capabilities of IPFS. This approach enhances the security and privacy of file sharing, addressing issues of centralization and data tampering.
The system architecture integrates a smart contract deployed on the Ethereum blockchain with IPFS for decentralized file storage. Authorized users register on the blockchain, and files are uploaded to IPFS. The file metadata, including the IPFS hash, is recorded in a smart contract. A React.js frontend facilitates user interactions. The design ensures that files are securely stored and only accessible to authorized users.
The system allows users to register and share files securely as follows:
- User Registration: Users register their addresses, which are verified and stored on the blockchain.
- File Upload: Files are uploaded to IPFS, and the IPFS hash is recorded in the smart contract.
- File Sharing: Only authorized users can access shared files, providing a secure sharing mechanism.
- Decentralized Storage: Files are stored on IPFS, ensuring data availability and redundancy.
- IPFS
- Truffle
- Ganache
- Web3.js
- NodeJs
- Chrome with CORS extension
-
Install IPFS
-
Start IPFS daemon.
ipfs daemon
-
Configure config.js variables in Services/config.js.
Add Ganache mnemonic to CONFIG.wallet_passphrase. -
Deploy Smart Contracts using Truffle and Ganache.
Configure config.js variables in Services/config.js.cd SecureFileSharing.
truffle compile -all.
truffle migrate -reset. -
Use the contract address generated after deployment in config.js, CONFIG.hs_contract_address variable.
-
Start the webapp.
npm install.
npm start. -
Start the React App.
cd app.
npm install.
npm start. -
Enable CORS from the Chrome Extension
Note: The implementation stores the addresses of the authorized accounts in smart contract as per the current Ganache accounts. So, the values would need to be updated as per the blockchain on which the application runs.




