The Web 3.0 Portal with Social Media and Photo Storage application

Page 1

The Web 3.0 Portal with Social Media and Photo Storage application

Abstract - Blockchain technology has become a gamechanging invention with its built-in characteristics of decentralization, immutability, transparency, and security, blockchain technology has become a game-changing invention. This documentationoffers a thoroughexamination of the use of blockchain technology to create decentralized apps, a social media dApp and a photo storage dApp. The socialnetworkingdApppresentedheremakesuseofEthereum blockchain-basedsmart contracts. Interactionsbetweenusers are governedbysmart contracts, which allowfor the trustless and automated implementation of several tasks like publishing, commenting, and user authentication. Users may interact with the dApps safely thanks to the inclusion of the MetaMaskwallet, which guaranteesasmoothuserexperience. The Interplanetary File System (IPFS) is used by the picture storage dApps toprovide decentralizedandimmutableimage storage. The dApps no longer depends on centralized servers thanks to IPFS, which increases data availability and robustness. Users of the dApps can safely upload, store, and retrievephotographs, andcontent-addressedstorage ensures data integrity and censorship protection. A scalable and effectiveuser interface for frictionless interactions isprovided by the use of ReactJS. Writing Solidity code, testing, and deploying contracts to the Ethereum blockchain are all steps in the development of smart contracts. For each application, mathematical models are offered that detail the sequential steps and anticipated results. These models give a thorough insight of how dApps function inside, assisting academics and developers in duplicating and extending the functionality. These programs act as a starting point for additional study and creation in the developing field of decentralized technology.

Key Words: Token, Transaction, Metamask, Blockchain, Ethereum

1.INTRODUCTION

Blockchaintechnologyoffersnumerous desirablefeatures suchasdecentralization,autonomy,integrity,immutability, verification, fault-tolerance, anonymity, auditability, and transparency. This is achieved by storing data on a distributedledger,whichallowsparticipantsinthenetwork toread,write,andverifytransactionsthatarerecordedina decentralizedmanner.TheWeb3.0systemissecuredusing cryptographicprimitivesandprotocolslikehashfunctions,

digital assets, and digital signatures, which ensure the integrity and protection of transactions recorded in the blockchain.

Onlinesocialmedianetworksarehighlypopularbutsuffer from the negative consequences of a centralized architecture,includingcensorshipissues,privacyconcerns, regulations, and a lack of trust in the OSN provider. Blockchaintechnologycanavoidtheeconomicpressuresto monetize user data beyond their interests by reducing relianceoncentralauthorities.Decentralizationistheonly availableconcepttoaddressprivacy,trust,andcensorship issues,makingdistributedanddecentralizedsystemswidely accepted.

Decentralized applications offer low latency, high throughput, better performance, lower transaction fees, maintenanceflexibility,andnodataredundancy.Theyaimto distribute critical components that store parts of infrastructure or data in various nodes or peers. Transactions are added to the blockchain ledger upon verification and agreement among the parties in the network. Blockchain applications run on a peer-to-peer computer network, which increases security by decentralizingboththefrontendandbackend.Decentralized applications, or dApps, are a type of application that uses blockchain technology and operates on a peer-to-peer network of computers rather than a single server. This means that both the front-end and back-end of the applicationworkindependentlyandinadistributedwayon allnodesofthenetwork.

Developers interested in building dApps on blockchain platformshaverecentlyturnedtheirattentiontoEthereum infrastructure.Ethereumisa popularblockchainplatform thatsupportsthecreationofdecentralizedapplicationsand smartcontracts.

TheportalconsistsofWeb3.0applicationswhichenhance theuseabilityofthecustomers.TheSocialMediaapplication acceptsthepostfromusersinformoftextandimages.The postmadebyusersareminted.Moretheimagesmintedthey appear at the top. Blockchain based network has every transactionin distributedledgerthatisauthorizedbythe digitalsignatureoftheowner,whichmakesauthentication of transaction and safeguards it from tampering. This drastically increases the security of the application, as all

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 05 | May 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page705
Pranav Gore1, Krushna Modhave2, Abhishek Doifode3 , Shubham Gaikwad4, S. D. Dighe5 1,2,3,4 SPPU, Department of Computer Engineering, Sinhgad Institute Of Technology And Science, Pune, Maharashtra, India 5 Assistant Prof, Department of Computer Engineering, Sinhgad Institute Of Technology And Science, Pune, Maharashtra, India
***

partiescantrusttheintegrityofthetransactionsrecorded ontheblockchain.

Smartcontractsinherittheirfeaturesfromtheunderlying blockchaintechnologyandaredecentralizedprogramsthat extend the use of the blockchain network. They are selfenforcingandself-executingprogramsthatactuatetheterms and conditions of a particular agreement using software codesandcomputationalinfrastructure.Thetransparencyof smart contracts is one of their most significant distinguishing features as the code defined in smart contracts is visible to all intervening parties and public entities.

2. RELATED WORK

Decentralizedapplications(dApps)areanideathathasbeen aroundforawhile.Numerousalready-existingdAppshave served as an invaluable resource for this project. For this project, two well-known decentralized storage networks, FilecoinandIPFS,weretakenintoconsideration.Filecoinisa decentralized storage network that enables users to store, retrieve,andsharedataviaadistributednetwork,whereas IPFSisapeer-to-peerprotocolforcontent-addressedstorage and file sharing. Several blockchain-based social media networks,includingSteemitandMinds,havebeencreatedin terms ofsocial media platforms. While Mindsisa privacyfocused social network where users may share their ideas and views, Steemit is a decentralized blogging and social media platform that pays members in cryptocurrency for theircontributions.

Thedecentralizedstoragespacehasseentheemergenceof Filecoin and IPFS as leading contenders. Users can store, retrieve,andsharedataviaadistributednetworkofstorage providersusingthedecentralizedFilecoinstoragenetwork. Participantsareencouragedtoofferstorageresources,andin exchange,theyaregivencryptocurrency.Thepeer-to-peer IPFSprotocol,whichstandsforInterplanetaryFileSystem,is usedforcontent-addressedstorageandfilesharing.Filesare identifiablebytheircontentratherthantheirlocationina distributedanddecentralizedstoragearchitecture.IPFSuses adistributednetworkofnodestoguaranteedataavailability andresiliency.

3. Methodology

Theusageofelectronicgadgets,program,andwebsiteshas becomeessentialtodailylivinginthedigitalage.Duetothe fact that they enable users to register accounts, establish relationships,shareposts,uploadmediafiles,andcarryouta numberofotheractions,socialnetworkingsiteshavegained alotofpopularity,especiallyamongtheyoungergeneration. However,theseproceduresproduceenormousamountsof data, which are kept in a central database under the full control of a single entity. As the central organization can utilizetheuser'sdatatodevelopthesocialmediaalgorithm

toincreaserevenue,suchasituationraisesdifficultieswith dataprivacyandmonopolies.

Decentralization, a novel strategy that eliminates the system's centralized authority and transfers power to the peopleasneeded,hasarisenasaresponsetothisscenario. Users can own and control their data thanks to decentralization,andnoothercentralbodycanstepin.Users inadecentralizednetworkarerewardedforsharingmaterial, andtheyhavecontrol overtheadvertsandtheflowofthe advertising, in contrast to typical social networking sites, whereonlythecentralentityprofitsfromadmoney.Tokens, whichareacomponentofthenetworkandserveasitsfuel, aretherewardforsharingcontent.

Currently,allinteractionsbetweenpeople,whetherpersonal orbusiness-related,callfortheparticipationofathirdparty, such as the government or other organizations. These procedures typically take a long time since they call for numerousdocumentationsteps,andcurrencyconversionis alsoexpensivebecauseitnecessitatesusingintermediaries whodemandlargefees..Inordertoconnectwiththeuser,the logiccodeiswrittenontheblockchainusingsmartcontracts. Selectingthetokentoconvertandenteringtheappropriate amountarerequiredstepsintheprogram.Thetransactionis then recorded on the blockchain and validated by various minersornodes.Peoplemustpayalittleprice(inthiscase,a gasfee)inordertocompletetheirtransaction.Theprocessis extremely fast and secure because there are no problems withdataleaks.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 05 | May 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page706

3.1 Methods for Social Media Application:

Thereareseveralstepsinvolvedintheimplementationofthe socialmediadAppsusingblockchain.First,weusedReactJS toconstructthedAppsuserinterface,andweintegratedthe MetaMask wallet to handle user authentication and transactionprocessing.Theuserdata,posts,andNFTswere thenstoredinsmartcontractsfortheEthereumblockchain. Solidity, a programming language for building smart contracts for the Ethereum blockchain, was used to write these smart contracts. We used IPFS (Interplanetary File System),adecentralizedfilestoragesystemthatenablesfiles to be saved and retrieved without a centralized server, to storethepostscontributedbytheusers.

Thisguaranteedthedecentralizedandunchangeablestorage of user-added postings, ensuring the data's security and transparency.OntheEthereumblockchain,theuserprofiles pictureswereaddedasNFTs(Non-FungibleTokens).Digital artandotheruniquedigitalgoodscanbekeptinNFTs,which are one-of-a-kind digital assets that are saved on the blockchain and cannot be duplicated. We made sure that profile images would be simple for users to access and retrievebystoringtheminNFTs.

UsingEthereumtokens,userscouldaddpostsandmintthem as NFTs. This was accomplished by using the MetaMask wallet to invoke the smart contract functionality. A post's placementinthesocialnetworkincreasedwiththenumber of times it was shared, incentivizing users to produce valuableandinterestingcontent.WesetupthedAppsonthe test network to make sure it runs without a hitch. Before launchingthedAppsontheprimaryEthereumnetwork,we wereabletotestitinasimulatedsettingandfindandcorrect any faults or errors. Designing a user-friendly interface, developing smart contracts on the Ethereum blockchain, utilizingIPFStostoreposts,andusingNFTstostoreprofile photographswereallnecessarystepsintheconstructionof the social networking dApps using blockchain. We encouraged users to produce high-quality content and securedthesecurityandtransparencyofthedatabyminting postingsasNFTsusingEthereumtokens.

Mathematicalmodelforthesocialmediaapplicationisgiven below:

S={I,O,F,DD,NDD,Success,Failure}

where,

I={text,image};

O={Succesfullogin,storeINBlockchain&IPFS}

F={createAcc(),upload(),share()};

DD={null};

Success:Successfulloginandauthentication.

ImageaddedasNFT

TextandimagespostedonApplication

MoreMintedpostsappearontop

Failure:Incorrecttextleadtounsuccessfulauthentication

ImagesnotstoredinIPFS

3.2 Method for Photo Storage Application:

The blockchain image storage and retrieval process was madeeasierbythePhotoStoragecontract.Itmadeuseofthe decentralized,immutableIPFS(InterplanetaryFileSystem) tostoretherealimagefiles.Eachimage'sIPFShashaswellas metadataliketheuploader'saddressandtimestampswere includedinthecontract.Bysubmittingtheirphotographsand retrieving them inaccordance withtheirownership, users might engage with the contract. The decentralized photo storagefeaturewassupportedbythePhotoStoragecontract. Itmadeiteasiertosaveandgetphotosfromtheblockchain. Thecontractmadeuseofthedecentralized,distributedfile storage technology known as IPFS to do this. A user's

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 05 | May 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page707
Fig - 3.1:SystemArchitecture

uploadedimagewastransformedintoanIPFShashbythe dApps,whichservedastheimage'sdistinctiveidentification. The IPFS hash and pertinent metadata, including the uploader's address and timestamps, were saved in the contract.Thisstrategymadesurethattheactualimagefiles weredecentralizedandimmutablystoredoff-chain,whilethe blockchainwasusedtoholdtheessentialreferences.

The dApps used IPFS called Pinata, a decentralized and distributedfilestoragesystem,toenableefficientandsafe picture storage. Auser's uploaded image was transformed into an IPFS hash by the dApps and saved on the IPFS network. The user's photo record on the blockchain was connected to the IPFS hash, which acted as an exclusive identification for the image. The dApps achieved decentralization and did away with the requirement for a centralizedservertostoreandretrievephotosbyutilizing IPFS. Because the photos were dispersed across the IPFS network, eliminating weak points and guaranteeing immutability,thisstrategyimproveddatasecurity.

Images saved on the blockchain were accessible and shareableunderthecontroloftheAccessControlcontract.By sharing their public keys, users might grant other users access to their saved photos. The agreement preserved a relationshipbetweentheowner'saddressandtheaddresses ofuserswhoweregivenaccesstotheirimages.Thephotos could only be accessed by persons who also had the authorizedpublickeys.

We used IPFS, a decentralized file storage system, to guarantee secure and effective image storage. A user's uploadedimagewastransformedintoanIPFShashbythe dappandsavedontheIPFSnetwork.Theuser'sphotorecord ontheblockchainwasthenconnectedtotheIPFShash.With thisstrategy,immutabilityanddistributedstorageofimages werebothguaranteed,preventingsinglepointsoffailure.The uploadedphotoswerekeptinadecentralizedstoragesystem with restrictedaccess for the sake ofprivacyandsecurity. Onlyuserswiththeappropriateauthorizationcouldseeand download the photographs thanks to the access control mechanismenforcedbytheAccessControl contract.Users hadcompletecontroloverthesharingandstorageoftheir photosbecausetothis.

Mathematical model for the decentralized photo storage applicationisgivenbelow:

S={I,O,F,DD,NDD,Success,Failure}

where,

I={image,gif ,};

O ={conversion of Image to NFT ,failed conversion , successfulupload,Transactionconfirm}

F={conversion(),upload(),transact(),share(),access()};

DD={null};

Success:SuccessfuluploadoflocalphotostoIPFS

Imageaddressaddedtoblockchain

TransactionconfirmationbyMetaMask

Failure: Incorrectfiletypeleadtostoragefailure.

Incorrectpublicaddressleadtoaccessdenial.

4. Results:

Theoutcomesofourimplementationresearchshowthata decentralizedsocialnetworkingplatformanddecentralized photostoragesystemhavebeendevelopedsuccessfully.The screenshotsoftheInterfacesaregivenbelow:

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 05 | May 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page708
Fig - 4.1:InterfaceforSocialMediaApplication Fig - 4.2:ProfileCreationonSocialMedia

By examining the availability and immutability of saved images, data integrity was assessed. We made guaranteed that the uploaded photographs remained undamaged and reachable even in the event of node failures or attacks by using IPFS for decentralized photo storage. Our analysis verifiedtheaccuracyandintegrityoftheimagesthatwere stored. We evaluated how quickly the social networking platformrespondedtovarioususeractions,suchasposting, commenting, and updating profiles. The platform is responsiveandoffersaseamlessuserexperiencebecausethe averageresponsetimefortheseoperationswasfoundtobe withinanacceptablerange.

Theresultsoftheexaminationofperformance,usability,and effectivenessmeasuresshowthatthesolutionsadoptedare scalable,user-friendly,anddata-integritycompliant.These outcomesconfirmtheeffectivenessofourapproachandlaya solid platform for future developments in decentralized applicationsandstoragearchitectures.

5. CONCLUSIONS

The project's implementation has effectively shown the possibility of using smart contracts and blockchain technology in a number of applications, including a social mediaplatform,cryptocurrencytrading,anddecentralized photostorage.Theproject'sgoalsofofferingsafe,open,and effectivesolutionsineachapplicationdomainhavebeenmet thanks to the creation of user-friendly interfaces, smart contractlogic,interactionwithMetaMaskwallets,andusage of IPFS for decentralized storage.The benefits of decentralizationandimmutabilityhavebeendemonstrated by the social networking application built on blockchain technology. Users can safely link their MetaMask wallets, makeprofiles,andaddprofileimagesasnon-fungibletokens byutilizingsmartcontracts.ByutilizingblockchainandIPFS technologies,thedecentralizedphotostorageapplicationhas addressed the issues with centralized storage services. Imagesuploadedbyuserscanbesafelykeptoff-chainonthe

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 05 | May 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page709
Fig - 4.3:Postsaddedontheapplication Fig - 4.4:MetaMaskconnectionforPhotoStorage Fig - 4.5:ConfirmationfromMetaMaskwallet Fig -4.6:Sharingofaccessofphotostorage

IPFSnetwork.Bysharingtheirpublickeys,userscangrant permissionstoparticularpeoplewhenusingsmartcontracts foraccesscontrol.Theseprogramsprovideground-breaking answerstoproblemswithconventionalcentralizedsystems. Thesuccessfulimplementationoftheseapplicationscreates freshopportunitiesforuser-centric,decentralizedplatforms acrossnumerousdomains.

REFERENCES

[1] Mahesh Kini M Karthik Pai Department of network scienceShanghaiJiaoTongUniversity.”MakeWeb3.0 Connected”In2022

[2] Ting Cai Ph.D. degree at the School of Data and ComputerScience,SunYat-senUniversity,Guangzhou, China. “Social Chain: Decoupling Social DataandApplicationstoReturnYourDataOwnership” In2021

[3] SajjadKhan,MuhammadBilalAminCollegeofSciences andEngineering, University ofTasmania, Hobart, TAS 7005, Australia “A Blockchain based Autonomous DecentralizedOnlineSocialNetwork”In2021K.Elissa, “Titleofpaperifknown,”unpublished.

[4] Ningyuan Chen, David Siu Faculty of Science and Engineering Department of Electrical and Electronic Engineering University of Nottingham Ningbo ChinaNingbo,China“ABlockchainbasedAutonomous DecentralizedOnlineSocialNetwork”In2021

[5] FarhanaAkterSunny,DepartmentofComputerScience andEngineering,GreenUniversityofBangladesh,Dhaka 1207,Bangladesh“ASystematicReviewofBlockchain Applications”In2022

[6] ShuaiZeng,YongYuan,InstituteofAutomation,Chinese Academy of Sciences, Beijing, China “A decentralized socialnetworkingarchitectureenhancedbyblockchain” In2019

[7] Ruhi Tas Computer Engineering Ankara University Ankara, Turkey “Building ADecentralized Application ontheEthereumBlockchain”In2019

[8] eo Besancon, Catarina Ferreira Da Silva, Parisa Ghodous, iris,Univ yon,Universite ClaudeBernard yon 1, 69100 Villeurbanne, France “A Blockchain OntologyforDAppsDevelopment”In2022

[9] Muhammad Irfan Khalid, Ibtisam Ehsan and Ayman Khallel Al-Ani 1Department of Information and Electrical Engineering and Applied Mathematics, University of Salerno, 84084 Fisciano, Italy “A Comprehensive Survey on Blockchain-Based DecentralizedStorageNetworks”In2022

[10] GabinHeo,DanaYangDivisionofArtificialIntelligence andSoftware, Ewha WomansUniversity, Seoul, Korea “Efficient and Secure Blockchain System for Digital ContentTrading”In2021SITS,B.E.(Computer)2015 Course,ProjectStageI,2022-2336

[11] Yan Zhu, Chunli Lv and Zichuan ZengCollege of Information and Electrical Engineering, China AgricultureUniversity,

[12] 100083Beijing,China.”Blockchain-basedDecentralized StorageScheme”In2022

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 05 | May 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page710

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.