PouchDB's alpha has been released

PouchDB is now available as Alpha version and can be downloaded here.

PouchDB is a JavaScript library that allows you to store and query data for web applications that need to work offline, and sync with an online database when you are online.

The Browser Database that Syncs

Based on the work of Apache CouchDB, PouchDB provides a simple API in which to store and retrieve JSON objects, due to the similiar API, and CouchDB’s HTTP API it is possible to sync data that is stored in your local PouchDB to an online CouchDB as well as syncing data from CouchDB down to PouchDB (you can even sync between 2 PouchDB databases).

Status & Browser Support

PouchDB is currently in alpha preview. The first version will support browsers that have implemented the HTML5 IndexedDB API. Work is being done on providing support for WebSQL as well as LocalStorage and node.js. Currently tested in:

  • Firefox 12+
  • Chrome 19+

Quick start

Download pouch.js and include in your HTML then you can start using PouchDB straight away, here is a quick example:

var authors = [
  {name: 'Dale Harvey', commits: 253},
  {name: 'Mikeal Rogers', commits: 42},
  {name: 'Johannes J. Schmidt', commits: 13},
  {name: 'Randall Leeds', commits: 9}
];
Pouch('idb://authors', function(err, db) {
  // Opened a new database
  db.bulkDocs({docs: authors}, function(err, results) {
    // Saved the documents into the database
    db.replicate.to('http://host.com/cloud', function() {
      // The documents are now in the cloud!
    });
  });
});