# OrbitDB > Distributed, peer-to-peer database on IPFS. [](https://circleci.com/gh/haadcode/orbit-db) [](https://waffle.io/haadcode/orbit?source=haadcode%2Forbit-db,haadcode%2Forbit-db-counterstore,haadcode%2Forbit-db-eventstore,haadcode%2Forbit-db-feedstore,haadcode%2Forbit-db-kvstore,haadcode%2Forbit-db-store,haadcode%2Fipfs-log) ## Introduction `orbit-db` is a distributed, peer-to-peer database for applications. You can use `orbit-db` for different data models: **Key-Value Store**, **Eventlog** (append-only log), **Feed** (add and remove log) and **Counters**. The database gets replicated automatically with peers who are connected to the same database. This is the Javascript implementation and it works both in **Node.js** and **Browsers**. - Client-side database to be embedded in Javascript applications - Stores all data in IPFS - Aggregation happens on client side and data is eventually consistent - Designed to work offline first Check out a visualization of the data flow at https://github.com/haadcode/proto2 Live demo: http://celebdil.benet.ai:8080/ipfs/Qmezm7g8mBpWyuPk6D84CNcfLKJwU6mpXuEN5GJZNkX3XK/  **NOTE: the README can be out of date, I'm working to get up to date. If you find a problem, please open an issue or a PR.** _Currently requires [orbit-server](https://github.com/haadcode/orbit-server) for pubsub communication. This will change in the future as soon as IPFS provides pubsub._ ## Install ``` npm install orbit-db ``` ## Data stores Currently available data stores: - [orbit-db-kvstore](https://github.com/haadcode/orbit-db-kvstore) - [orbit-db-eventstore](https://github.com/haadcode/orbit-db-eventstore) - [orbit-db-feedstore](https://github.com/haadcode/orbit-db-feedstore) - [orbit-db-counterstore](https://github.com/haadcode/orbit-db-counterstore) ## Usage ```javascript const OrbitDB = require('orbit-db') const IPFS = require('ipfs') OrbitDB.connect('178.62.241.75:3333', 'tester', null, new IPFS(), { allowOffline: true }) .then((orbitdb) => { const kvstore = orbitdb.kvstore('db name') const events = orbitdb.eventlog('db name') const feed = orbitdb.feed('db name') const counters = orbitdb.counter('db name') kvstore.put('key1', 'hello1') .then(() => kvstore.get('key1')) .then((value) => console.log(value)) // 'hello!' }) ``` Documentation for individual stores are WIP, please see each store's source code for available public methods. ## Examples *To run the examples below, make sure to run a local [orbit-server](https://github.com/haadcode/orbit-server)* ### Browser examples Build the examples: ```bash npm install npm run build:examples ``` Then open `examples/browser.html` or `examples/index.html`. See the full example [here](https://github.com/haadcode/orbit-db/blob/master/examples/browser/browser.html). ```html
``` ### Node.js examples Before running the examples, install dependencies with: ``` npm install ``` Key-Value store [example](https://github.com/haadcode/orbit-db/blob/master/examples/keyvalue.js): ``` node examples/keyvalue.js