A Beginner’s Guide to Web 3 Architecture and Web 3 Tech Stack
Web 3.0 architecture does not have intermediaries or central authorities that can store or manipulate our data. There is no central server where the application state is present.
Instead, In Web 3, everything is stored on the Blockchain. This enables the decentralization and democratization of applications. This is possible due to the participation of honest nodes in the network.
By outlining the Web 3.0 tech stack, this article will help you understand what Web 3.0 architecture is and what fundamental skills are a must for Web 3.0 development.
Web 1 vs Web 2 vs Web 3
Web 1.0
It represents the first generation of the Internet. In the early 1990s, it was finally the first time that the Internet became a mainstream thing. This form of the Internet was around till 2004. Most of the websites in Web 1.0 were static. This means that businesses use them as their identity on the web or to showcase their services but everyday users like us could not interact with those websites.
The fundamental components of webpages were:
Web pages at the time were only designed for Desktop Computers. This is why they were unresponsive. This was mostly because smartphones did not exist at the time.
At the time, there weren’t many security procedures in place.
The user and the website did not communicate with one another. It was all read-only. Likes, comments, and following were not concepts.
The website followed a similar template. The website design was mundane and similar.
Web 2.0
Web 2.0 represents the second iteration of the Internet. The user also interacts with applications and websites in real time. The fact that we can like, and comment, on things. Downloading and as well as upload things on the internet is possible due to advancement and constant progress due to Web 2.0. Big tech giants like Facebook, Google, and Apple control and monetize user data for monetary benefits.
Unlike Web 1.0, now we can not only read information but create and even add to an existing one. Digital communication across different countries through text and video, and shopping from home are just a few examples of how Web 2.0 continues to impact our lives.
Limitations of Web 2.0
Although Web 2. It provides us with numerous benefits and continues to evolve further, it has some drawbacks too. The primary concern for us today is the security of user data and thus privacy. Data theft and fraudulent activities are more common than ever. Not just everyday users, but big corporations, banks, and even governments are fighting serious digital attacks from Hackers.
Another big problem is centralization, i.e., the accumulation of power and resources in the hands of a few multi-millionaire conglomerates. The control over huge consumer data gives them the power to manipulate what people see and interact with.
Web 3.0
The new form of the Internet that we are making a transition to is Web 3.0. It works on the principles of decentralization and immutability. Web 3 applications are built on blockchain. This means that every event that happens on the chain is time-stamped, which makes it hard for hackers to change the chain. The idea is to make an ecosystem where trust is not a necessity and maths and cryptography ensures seamless work to overcome it.
You won’t have to manage your email address and passwords on every platform, since you’ll be able to sign in safely and anonymously throughout the internet without anyone being able to trace you. You may do this thanks to your online identity.
Internet identity at its core is your unique anonymous identity on the internet. This means that no one can trace you by your ID. The data is stored in the form of distributed ledgers, and each node holds a copy of it. This ensures extra safety because hackers can not just break into a single location like a company’s database and steal anything.
Why does Web 3 matter?
Cryptocurrency is the first application of Blockchain technology and thus Web 3.0. But now various sectors apart from Fintech are adapting to it. Healthcare, Edtech, Gaming, Digital art, and music are a few of the popular domains incorporating the use of Web 3.0.
Web 3.0 provides us with the following:
Better security from Hackers
Privacy Rights
Users have control over their data.
Faster and more efficient operations
More adaptable to changes
Decentralization
Web 3.0 is the next logical step in the evolution of the internet. It not only provides decentralization but also provides more safety and control to everyday users over their data and assets on the internet.
Foundation of Web3 Development
Web 3 Applications use Blockchain Technology. But blockchain is merely a part of the spectrum. To draw a comparison, a blockchain in a Web 3 application might be similar to a database in a typical Web 2 application.
Decentralized Applications popularly known as dApps play an important role in web 3.0. Creating a dApp provides us with ownership and compostability.
Ownership means the ownership of Data and every digital asset or file that belongs to the user. Compostability allows us to make applications composable by sharing and consuming their data between different apps.
Compostability Example
Currently, every single company out there is focussing on collecting user data. The data they hold is their single biggest asset. It is also something that differentiates them from their competitors. Companies that are competing with each other, with similar UI and UX and slightly different business Logic, are valuable independently because of the data they have aggregated. This is exactly what web 3 will disrupt.
You’ll be able to share and consume data while using different applications. For example, think of a metaverse where you can buy things from Google and use them in the Microsoft ecosystem.
Web 2 Architecture
In a traditional Web 2.0 application, a user interacts through the frontend interface of the application. A load balancer closely ties the front end to the back end of the application. The API layer and authentication in between perform their respective functions between the frontend and backend.
The backend of the applications shares data with a user through the front end after conducting a series of interactions with its database and file storage. These components work hand in hand to give a seamless experience to the end user.
Web 3 Architecture
For a Web 3 application, the front end remains the same, but there are significant changes in the back end. The Blockchain node is doing the heavy lifting by managing the data on the Web 3 back end.
Since it is expensive to store data on Blockchains, we have some off-chain file storage and a p2p database facilitating data storage. Finally, to build a secure layer, we have a wallet or private key-based authentication to verify the individual’s identity.
Web 3 Tech Stack
Blockchain
It’s critical to comprehend which blockchain we should base our architecture around. Decentralization, transaction throughput, gas costs, ecosystem, interoperability, and many other variables must all be taken into account while building any project.
Although most of the time any blockchain would suffice. Few have greater user-specific performance than others, and each one has advantages and disadvantages. You can start with Ethereum as a newbie and study Solidity there.
Blockchain Node
You require a server to deploy an application. A blockchain node takes care of this task. Nodes are participants in a network or machines that run blockchain software. As a result, they are authorized to manage distributed ledgers and act as the primary points of contact for network activities.
Here, a P2P (Peer-to-peer) protocol enables nodes to exchange information about new transactions and blocks within the network. Using AWS or Azure services, you can operate your blockchain nodes, or you can purchase a node from a service provider like a fast node, moralis, infra, etc. that provides APIs to build automated flows.
P2P Database
You must be wondering why we need a database if blockchain exists already. Will it not also undermine the decentralization concept?
Because data storage on the Blockchain is sluggish and expensive, we do it. Therefore, to access data off-chain and prevent repeated access to the chain, we need a second database.
We do away with centralized database servers, blockchains, and local storage to assure decentralization by using peer-to-peer databases that host and store all the data in streams.
Decentralized File Storage
We require a specialized file storage platform for dApps, comparable to Amazon S3 for Web 2. In Web 3, IPFS is widely popular since it is the most popular P2P file system protocol and has strong community support. Another platform with a focus on long-term data storage is Arweave.
Authentication in Web 3
Web 2 applications often employ a straightforward form structure. A database stores the user details, and they are verified by cross-checking them. Additionally, services like Google and Facebook offer open authentication, allowing access to some basic data right in the app and streamlining the process.
Although this method is practical, it cannot be useful in dApps because a private key is an essential requirement to sign a transaction. In Web 3, authentication is crucial, therefore instead of using user data, there are devices called wallets, which utilize cryptographic signatures to demonstrate who owns specific blockchain addresses.
Owning a blockchain wallet is exciting because once a user loses their private key to the wallet address, no one else can retrieve it for them. This is both helpful and unsettling because Web 3.0 has web3Auth, which is akin to open authentication in Web 2.0.
It is a seemingly interesting tool that helps in bridging the web2 and web3 worlds. Its simple authentication infrastructure gives those Open Auth capabilities to web3 applications in a self-custodial way for the user. Self-custodial, here, means that the user has custody of the key and not the application or web3auth. This is done through a unique MPC architecture, and hence the private key is never stored in a single server/ node or any other method with complete access.
Implementing the Web 3 Frontend
Frontend technologies for Web 3 and Web 2 are the same. The only difference is where you need to reimagine the UX of the application because the authentication, processing in the blockchain, and general flow of the application are slightly different in web 3.0-based dApps from web 2.0-based applications.
Some good technologies you can start with include React & next.js since most developers are currently using these in the web3 world. Further, for the client-side backend, things get a bit different.
Here is where you need to understand how you can interact with the blockchain you’ve created for this, you can use web3 interaction libraries that can help you with the same, but you’ll need to first understand how they work and interact with the blockchain properly.
Web 3 Libraries and Tools
You can communicate with nodes using HTTP, IPC, or Web Socket utilizing a variety of web3 libraries. These libraries make it easier for programmers to create simple, one-line initialization methods for JSON RPC queries that communicate with the underlying chain of your choice.
Web3.js, ethers.js, and light.js are a few of the web3 libraries that Ethereum uses. Additionally, compared to public testnets, many chains’ development tools offer capabilities that enable significantly faster iteration. Tools like Ganache, Truffle, Hardhat, and Brownie are popular choices in this situation.
Conclusion
Although Web 3.0 is here to stay, web 2.0 ideas are still relevant today. A developer can only be successful in this new sector by studying the new tech stack and understanding its primary functions and qualities.
Subscribe to my newsletter
Read articles from Aviral Sharma directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Aviral Sharma
Aviral Sharma
Driven 3rd year BTech (IT) student passionate about front-end development. Eager to leverage skills in React, Redux, JavaScript, Next.js, and Tailwind CSS to contribute to a dynamic team.