BlockShare is a decentralized cloud storage application built using blockchain technology. It allows users to securely store and share images in a distributed manner.
This repository contains the codebase and scripts to deploy and use BlockShare, a decentralized cloud storage system leveraging blockchain for secure image storage and sharing.
https://www.youtube.com/watch?v=wTLWqOCyp3Q
- Blockchain Integration: Utilizes blockchain for decentralized file storage.
- File Encryption: Ensures security and privacy through file encryption techniques.
- User Authentication: Implements secure user authentication for accessing stored files.
- File Sharing: Facilitates easy and secure file sharing between users.
- Smart Contracts: Utilizes smart contracts for managing file storage and access permissions.
BlockShare uses smart contracts written in Solidity to manage file storage and sharing functionalities.
Checks user permissions and grants access to requested files.
function accessFile(address userAddress, bytes32 fileId) public view returns (bool allowed);Registers new users in the system.
function registerUser(address userAddress, string memory userEmail) public returns (bool success);Authenticates users for file access and management operations.
function authenticateUser(address userAddress) public view returns (bool authenticated);Allows users to share files with other registered users.
function shareFile(address userAddress, bytes32 fileId, address recipientAddress) public returns (bool success);Deploy contracts to a local blockchain (e.g., Hardhat's built-in network):
Ensure Node.js and npm are installed.
npm install -g hardhatStart Hardhat Node:
npx hardhat nodeDeploy contracts to a local blockchain (e.g., Hardhat's built-in network):
npx hardhat run --network localhost scripts/deploy.jsEnsure you have the following prerequisites installed:
- Node.js
- Hardhat
- Metamask (or other Ethereum wallet)
Clone the repository:
git clone https://github.com/your-username/blockshare.git
cd blocksharenpm installnpx hardhat nodeTo deploy the smart contracts to a local blockchain (e.g., Hardhat's built-in network):
npx hardhat run --network localhost scripts/deploy.jsTo start the frontend and backend servers:
cd client
npm startContributions are welcome! If you have any ideas, suggestions, or improvements, please open an issue or a pull request. To contribute to BlockShare, follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/improvement). - Make your changes.
- Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin feature/improvement). - Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.