The dBranch protocol allows journalists to publish articles via IPFS and use the Cardano blockchain as a wire service to announce the existence of new articles and audit publication history.
dBranch is currently in prototype phase and uses the Cardano testnet.
Overtime this protocol will become blockchain agnostic. The longterm goal is to use the immutable history of the blockchain to increase transparency and auditability, to create transparent versioning of articles and source information, and to use content addressing via IPFS to fix link rot in the citation process.
This repository is for the dbranch-node. It contains a docker file for dbranch-backend and a compose file that creates all of the necessary services for running a dBranch node.
Currently the dBranch software ecosystem consists of two user facing software apps and a node that contains all of the backend processes.
dbranch-desktop - Trustless app allowing users to draft and publish articles directly into IPFS as well as browse, discover and read news articles and sources.
dbranch-website - A website for hosting published content. In the future this will be reusable so individual creators or news outlets can build their own websites. The current site is live at dbranch.news.
The dbranch-node repository (this one) contains the docker files that run the node, it consists of the dbranch-backend and several 3rd party docker images.
The dbranch-backend repository is used to create two docker services:
- dbranch-api-server (backend for dbranch website)
- The dbranch-curator daemon which follows the blockchain history and curates (copies and hosts via ipfs daemon) articles from configured addresses.
- ipfs daemon: host ipfs content
- cardano-node: (official docker image) to connect to cardano blockchain network
- cardano-wallet: (official docker image) used to sign articles and publish records to blockchain
- cardano-db-sync: (official docker image) indexes data to postgres from cardano-node
- postgres: (official docker image) used by cardano-db-sync
- Using dbranch-desktop an author drafts an article and publishes it into IPFS
- Taking the IPFS CID returned from step 1, the author signs the article using the dbranch-curator cli (future versions will include signing via dbranch-desktop UI). Signing an article means the author submits a transaction with metadata that includes the article CID and name, the transaction sends 1 ADA from the author's wallet to their own wallet, effectively a moot transaction which serves simply to announce to the network that the article CID exists, creating an immutable publication history to create transparency and auditability.
- The CLI connects to the cardano-wallet server which submits the transaction
- The cardano-node receives the transaction request from the previous step and submits the transaction to the mem pool for processing, once the transaction is accepted into the blockchain it is published forever.
- The dbranch-curator runs continuously as a daemon and talks to the postgres instance to discover new articles published by configured cardano addresses.
- The postgres instance is updated in the background by the official cardano-db-sync docker image
- cardano-db-sync pulls its data from cardano-node
- When new articles arrive they are published via ipfs
- Users navigate to the dbrach-website, currently this only hosts content by the dbranch creators, but will eventually be reusable so creators can host and/or curate their own content.
- A future build will allow users to browse curators on the dbranch network using the dbranch-desktop application.
- The dbranch-api-server gets its content from ipfs.
The IPFS network is decentralized, however public gateways and the bootstrap peer system that seeds the network become a bottleneck and possible source of bias. To enhance decentralization, IPFS swarm can be used to create a co-op network that augments the default peering system.
This is still a concept, eventaully the dbranch-desktop and possibly dbrach-website will be configured to use a direct swarm connection to the IPFS host, for more information on how this enhances speed, read this blog post by piñata.