Query about Couchbase topology

Hi,

My application is currently built using CouchDB / PouchDB. The app runs in the browser, on Android and on iOS - built using cordova. I’m looking into swapping out the database and am considering couchbase server.

From my basic understanding of couchbase at the moment, I have the following in mind:

  1. Mobile apps use Couchbase-Lite-PhoneGap-Plugin hooked up to Couchbase Lite server - they need to be offline first.
  2. Browser uses straightforward Couchbase server.

Will this behave in a similar way to the couchdb / pouchdb setup I have?
Also with regards to documentation, the above plugin refers to a page https://developer.couchbase.com/documentation/mobile/current/installation/phonegap/index.html but that doesn’t discuss phonegap so is this still supported / a good move forward?

You are missing Sync Gateway in your architecture

  1. Mobiles Apps running Couchbase Lite will sync to Sync Gateway that talks to Couchbase Server (There is no “Couchbase Lite server”. )
  2. browser talks to Sync Gateway via REST API that talks to Couchbase Server

On Couchbase Lite 2,x , you will implement Cordova native plugin on top of Android and iOS APIs. For simplicity, I recommend keeping to scoped to the app that you are building instead of general purpose plugin.
This blog discusses how you can implement that.
Direct links to tutorials :

We do not have browser based database so if you are using PouchDB for offline browser storage , then you will have to implement your own local storage and sync to Sync Gateway via the REST API