1

I want to build a progressive web app which should work offline.

+----------------+                +---------------+
|  Browser       |                |  Server       |
|                |                |               |
|   +---------+  |                |               |
|   |         |  |                |               |
|   |  GUI    |  |                |               |
|   |         |  |                |               |
|   |         |  |                |  +----------+ |
|   +---------+  |                |  |   DB     | |
|       |        |                |  |          | |
|       |        |                |  |          | |
|   +---------+  |                |  |          | |
|   |   DB    |  |    Internet    |  |          | |
|   |         |  | -------------- |  |          | |
|   |         |  |      https     |  |          | |
|   +---------+  |                |  +----------+ |
+----------------+                +---------------+

I am searching a DB which works in modern browsers and which can be provide a ORM to JS like active record does for ruby or django does for python.

I have a strong Python and PostgreSQL background, but I want to improve my JS skills with this project.

Required features:

  • persistent DB storage
  • usable via an existing JS ORM
  • syncing between DB in browser and on server
  • open source
  • Should work at least in one browser (chrome only is enough)
  • no plugins should be required in the browser
1

PouchDB has a sync feature: https://pouchdb.com/guides/replication.html

The diagram is similar to he one in the question: pouch-db-sync-

The PouchDB is a Javascript implementation of CouchDB which is API compatible with it. So you can use CouchDB on the server side and Pouch in the application itself and once the application comes online you can sync both. This is especially useful for progressive web applications who rely on an offline first approach.

PouchDB provides a fully asynchronous API. This ensures that when you talk to PouchDB, the UI doesn't stutter, because the DOM is not being blocked by database operations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.