Skip to main content

Lesson's Progress0 / 5

0%

Building Blocks of Decentralized Apps

Decentralized applications (also known as dApps or Web3 apps) are made up of four different components that work together to provide an awesome user experience:

  1. A decentralized network that keeps everything running smoothly
  2. Accounts & Smart Contracts that store data and funds
  3. Wallets to manage the account
  4. A Frontend that users interact with

Infrastructure Level

At the infrastructure level, we have the decentralized network that keeps accounts and smart contracts secure and operational.

The Decentralized Network

Decentralized networks such as NEAR Protocol are made up of many independent computers that work together to provide secure and transparent services

No single entity controls the network, making it censorship-resistant and highly secure

Accounts & Contracts

The decentralized network hosts all users accounts, each of which can have a small program called smart contracts

Contracts can, for example, automate investment payments or store digital art. They are completely transparent - anyone can see what code is running


User Level

On the user side, we have wallets that allow you easily manage your accounts and assets, and the applications (frontend) that provides the user interface to interact with everything.

Wallets

Wallets are applications that allow you to easily create and access your accounts, and its associated digital keys and assets.

You can access multiple accounts from a single wallet, or use different wallet apps to access the same account.

The Frontend

The website or mobile apps you interact with are what we call frontends. These applications can be hosted anywhere, be that some cloud service or your local computer

The frontend of a decentralized app knows how to:


How It All Works Together

Let's walk through a simple example on how these pieces fit together using a digital guestbook where people can leave messages:

Main view of our Guest Book example app

  1. You visit the app - The frontend shows you a simple interface to leave a message
  2. You connect your NEAR wallet - If you don't have one, you'll be prompted to create one
  3. You write a message - The app shows you a form to enter your greeting
  4. Your message is stored forever - It's now permanently saved on the blockchain

The beautiful thing is that once your message is stored, it can't be deleted, changed, or lost. Even if the frontend disappears, your message will remain stored in the guestbook smart contract.


Quiz

Who runs the decentralized network that powers Web3 apps?

A. A single company

B. Many independent computers around the world

C. A single government

D. A single app developer