In wrapping up, our project for decentralized image sharing is a big step forward. It uses a fancy thing called blockchain to make sure that when you share pictures, it's super safe and private. We focused on keeping your data intact, your pictures secure, and made it easy for everyone to work together. This isn't just about sharing images; it's about a safer, more reliable way for all of us to connect in the digital world.
Welcome to our innovative project, redefining the way we share images through the power of blockchain technology. Our decentralized image upload and sharing platform prioritize security, privacy, and collaboration, offering users a tamper-proof environment for their digital interactions. By focusing on data integrity and user-friendly experiences, we aim to set new standards for secure and authentic image sharing in the digital era.
Follow the steps below to set up the Decenralized G-Drive3.0 Project on your local machine:
-
Clone the repository:
`https://github.com/your-username/Decentralized_G-drive.git`
-
Install dependencies for the hardhat:
# Navigate to the root directory
cd Dgdrive3.0
# Install hardhat dependencies
npm install
- Compile the smart contract for artifacts:
# Compile Smart Contract
npx hardhat compile
- Deploy the Solidity smart contract to an Ethereum testnet or local development environment.
# Deploy Smart Contract
npx hardhat run scripts/deploy.js --network <network-name>
- Install dependencies for the React front end:
# Navigate to the React client directory
cd client
# Install React dependencies
npm install
- Run the react application:
# Start React Application
npm start
- Set up environment variables:
Obtain API keys for Pinata to interact with IPFS. Update the React component (FileUpload.js) with your Pinata API keys.
Once the setup and configuration are complete, follow these steps to utilize the decentralized image upload and sharing system:
-
Install Metamask:
- Ensure Metamask is installed and configured in your browser for Ethereum interactions.
-
Update Contract Address:
- After smart contract deployment, make sure to update the contract address in
App.js
within the React application.
- After smart contract deployment, make sure to update the contract address in
-
Upload Image before "Get Data":
- Click "Get Data" only after uploading an image on Pinata. Otherwise, it will throw an error stating "You don't have access".
-
Accessing Other User Images:
- Use the "Get Data" button to access other users' images. Input the user's address in the designated box, but remember, you can only access their images if they've granted you access through the smart contract. Otherwise, it will throw an error saying "You don't have access".
These steps will ensure smooth navigation and utilization of the system while maintaining access control and avoiding potential errors.
- Ethereum : Ethereum is a decentralized blockchain platform that establishes a peer-to-peer network that securely executes and verifies application code, called smart contracts
- React.js : Front-end interface for uploading images and managing access.
- Solidity : Smart contract development for ownership and access control.
- Pinata : By the help of Pinata we have to upload the image on the IPFS.
- IPFS : Decentralized storage protocol for hosting uploaded images.
- Axios : Used as Pinning Service For Pinata
- Hardhat : Development and Deployment tool
- MetaMask(wallet) : For User Authentication
#Over All summary
- Split the terminal in three parts
- npm start
- npx hardhat node
- npx hardhat run scripts/deploy.js --network
#User Login via Metamask
#Dislay Image - Not See the Image Beacuse Pinata have to Closed Public Gateway. You can see the image when you have to click on alt text(see_img).
Before the closing the Public Gateway Look Like this
#Share Image With Another Account