/db3

DB3: open-source decentralized firebase firestore alternative . Please star ⭐️

Primary LanguageRustApache License 2.0Apache-2.0

A star ⭐️ is welcome.

GitHub Workflow Status (with event) coverage GitHub commit activity contribution GitHub issues GitHub issues by-label GitHub release (latest SemVer) Twitter Follow GitPOAP Badge Discord

English | 中文

What's DB3 Network

DB3 Network is an open-source decentralized firebase firestore alternative to build dapps quickly with minimal engineering effort.

position_web3

Why DB3 Network

why db3

when you want to build a dapp that has custom data to store and query, you have two choices at currently

1st. use a centralized data architecture .e.g firebase or MongoDB to store the custom data. this is friendly for developers but will break the law of decentralization

2nd. use Ethereum or other blockchains to store the custom data and use thegraph to index data. this can keep the decentralization but will cost a lot of engineering effort

with the db3 network, you can get both advantages of those two choices.

Features

Schemaless

You can store your custom data to the db3 network without any changes

High Performance

Currently,decentralization means terrible performance, but DB3 is trying to improve significantly:

  • Merkdb is the storage engine of the DB3 network, and it has high performance and also fast-proof generation.
  • Geo distribution: the nodes in every storage shard are geo-distributed, and the clients can execute queries against the nearest storage node.
  • Query session, the first decentralized query protocol to resolve performance and incentive perfectly.

Data Ownership

We proposed the document level ownership, and every document has its owner, while only the owner who holds the private key can update/delete the record. DB3 network generates the proofs and provides signatures to prove the membership (db3 has the specific document) and ownership.

Programmable

Dapp developers can develop data processing contracts and deploy them to the DB3 network just like developing data backend in web2.

Ethereum Guarded Security

DB3 network is a layer2 network on Ethereum and Ethereum guards all the assets.

Getting Started

Start A Local Testnet

git clone https://github.com/dbpunk-labs/db3.git
cd db3 && bash install_env.sh && cargo build
# start localnet
cd tools &&  sh start_localnet.sh

Start building

/*
|----------------------------|
| use db3js open a database  |
|----------------------------|
*/

// build sign function
const sign = await getSign()

// build database factory
const dbFactory = new DB3Factory({
    node: 'http://127.0.0.1:26659',
    sign,
    nonce
})

// open database with an address
const db = dbFactory.open("0x5ca8d43c15fb366d80e221d11a34894eb0975da6")

for more please go to db3.js

Project assistance

  • Add a GitHub Star⭐️ to the project.
  • Tweet about how to use DB3 network.
  • Write blogs about the project on Dev.to, Medium or your personal blog.

Together, we can make db3 network better!

The internal of db3

relationship

The Architecture

arch

How it works

Other Decentralized Database

  • the graph, a decentralized on-chain indexer
  • Locutus, a decentralized key-value database
  • ceramic network, a decentralized data network that brings unlimited data composability to Web3 applications
  • kwil, the first permissionless SQL database for the decentralized internet
  • spaceandtime, a decentralized data Warehouse
  • OrbitDB is a serverless, distributed, peer-to-peer database

Thanks support

I stood on the shoulders of giants and did only simple things. Thank you for your attention.


Protocol Labs

Filecoin

License

Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. See CONTRIBUTING.md.