Skip to main content

Structure of a dApp

Web 2.0 Apps

In traditional Web 2.0 application structure, a front-end application (like a webpage or an app) interacts with a back-end application (like an API or a database server).

Web 3.0 Apps

In Web 3.0 blockchain infrastructure, a front-end interacts directly with a blockchain network, reading the state of the chain or interacts with a back-end that connects directly to a blockchain network.

A decentralized network of computers (nodes) replaces databases and APIs used in traditional web services. The blockchain itself serves as a data store, while the application (or state machine) run by the nodes takes the place of data-store APIs (by ingesting transactions and defining transitions between states).

note

In some cases, blockchain applications can also interact with a back-end that is in connection with the blockchain network. For instance, a blockchain-connected back-end infrastructure can save information to an external database to serve complex queries that would be expensive to perform on the chain itself.

Front end

This is the Javascript, HTML, CSS user interface. It takes input from the user and builds requests to be sent to smart contracts.

Back end

The backend is the smart contracts deployed to the Cudos Blockchain. Smart contracts contain the business logic of the application.