π Hello world! This is Santhosh Reddy, a 17 year old blockchain developer and a curious web3 learner. I keep building projects on blockchain like Dapps and smart contracts which reflects the real world use cases.
Intro... πββοΈ
Recently, I completed building my first web3 project, Web3Drive- A decentralised public files hosting web app.
Visit : Web3Drive
Code : Github Repo
Today, I'm here to say all about this project that includes the aim, tech stack, how it works, future plans, etc...
Aim Behind... π‘
The main aim behind building Web3Drive is to develop a files hosting rather than files sharing app for free of cost and that too in a decentralized ecosystem.
This can not only host files like docs, media and others but also host simple webpages by hosting a html file.
Tech Stack... π§βπ»
ReactJS (fronted framework)
IPFS (to store files and data of the files)
Moralis (authentication, IPFS gateway & RPC node)
Web3JS (interact with smart contract)
Solidity (create a smart contract)
CryptoJS (encrypt the data of the files)
How It works.? πͺ
As mentioned, I used the above tech stack to build Web3Drive.
First of all, the user needs to get authenticated with his Metamask wallet to use the dapp.
After uploading a file in the dapp, the hash/url and other data of those files is stored in json format. This data is either stored in ipfs where hash of that file is stored in ethereum blockchain through smart contract created with solidity or in the localStorage of the user's browser.
The data of the files will be encrypted with AES256 algorithm using Crypto.JS before sending them to the blockchain or localStorage.
Storing the data of files in blockchain is a bit costlier (charges gas fee), where as storing the data of files in localStorage is free of cost without any security loop, but if the user's browser data is cleared the data of files will be lost.
It's better to preserve the url of the file somewhere else if using localStorage. Anyhow, in a few months Ethereum 2.0 is going to release with a new consensus mechanism called Proof-of-Stake and gas fee is going to be reduced rapidly upto 500 times.
Remember that, files hosted are permanent in the IPFS network. It's the user's choice to select where the data of files should be stored.
In the homepage all the files of the user are listed. Out of them, the files whose data is stored in blockchain are marked with a β and they are also shown in starred files page.
Happy using Web3Drive... π
It's a PWA... π₯
To make this dapp easly usable and provide a native app like experience, I also developed it as a PWA.
Final Thoughts... π
Hmm... Finally, completed my first web3 project and hope I build many more better projects in my web3 journey.
Taking a leave for now... π Bye!