Skip to main content

Global Back End

The 'global' back end concept applies to both the Web 2 and Web 3 paradigms. In the Web 2 architecture, a front end library like minimal-slp-wallet or bch-js would connect directly to the Web 2 back end via bch-api.

In the Web 3 architecture, the same thing happens, but bch-consumer connects first to the local back end. ipfs-bch-wallet-service (the local back end) then proxies the data from IPFS to bch-api.

Both architectures ultimately talk to bch-api, and the lower end of the stack is the same for both. The primary difference between the two back end architectures is scale. In Web 2, the back end is centralized and uses both horizontal and vertical cloud scaling (expensive). In Web 3, the global back end is decentralized. Web 3 stacks either operate alone and self-sufficiently, or they rely on a community of incentivized operators to donate their resources.

Web 2 vs Web 3 Back End Comparing Web 2 vs Web 3 Back End Architectures

Installation

The back end services all run inside Docker containers. Links to the docker containers (as well as pre-synced databases) can be downloaded from the CashStrap page. The pre-synced databases make it much faster to set up your own infrastructure. Walk-through videos on installing the entire back end are available in the Dev Ops & Infrastructure section of the PSF Videos page.

bch-api

bch-api is a REST API server based on node.js and the Express.js framework. It abstracts the full node and indexer layers into a single, common REST interface. This means front-end developers do not need to know any of the specifics of operating a full node or the indexers. They can interface with those services by studying the REST API documentation.

Fulcrum

Fulcrum is the most performant indexer available for BTC, BCH, and eCash (BCHA) blockchains. It implements the Electrumx protocol used by Electron Cash wallet. This indexer provides UTXO, address balance, and transaction history needed by any wallet app.

psf-slp-indexer

The psf-slp-indexer crawls the blockchain data and tracks tokens that follow the SLP specification for tokens. This includes both fungible and non-fungible tokens (NFTs).

ipfs-bch-wallet-service

ipfs-bch-wallet-service is the mirror image to ipfs-bch-wallet-consumer. Together they bridge the IPFS network to pass transaction and blockchain data, in order to bridge the front and back ends of an application. This IPFS bridge is the main difference between the Web 2 and Web 3 architectures.