{"id":14384856,"url":"https://github.com/scottmtp/pouch-replicate-webrtc","last_synced_at":"2025-09-12T11:49:15.856Z","repository":{"id":33776371,"uuid":"37433935","full_name":"scottmtp/pouch-replicate-webrtc","owner":"scottmtp","description":"Replicate a PouchDB over a WebRTC DataChannel.","archived":false,"fork":false,"pushed_at":"2015-10-11T20:38:51.000Z","size":572,"stargazers_count":39,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-16T23:11:34.734Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scottmtp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-14T23:37:25.000Z","updated_at":"2025-01-20T23:51:20.000Z","dependencies_parsed_at":"2022-09-11T16:33:34.719Z","dependency_job_id":null,"html_url":"https://github.com/scottmtp/pouch-replicate-webrtc","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottmtp%2Fpouch-replicate-webrtc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottmtp%2Fpouch-replicate-webrtc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottmtp%2Fpouch-replicate-webrtc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottmtp%2Fpouch-replicate-webrtc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scottmtp","download_url":"https://codeload.github.com/scottmtp/pouch-replicate-webrtc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottmtp%2Fpouch-replicate-webrtc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258486134,"owners_count":22709009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-28T18:01:43.634Z","updated_at":"2025-06-13T21:34:56.377Z","avatar_url":"https://github.com/scottmtp.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"#  pouch-replicate-webrtc\n\nReplicate a PouchDB over a WebRTC DataChannel, for NodeJS and the Browser.\n\n## About\n\nBy using a WebRTC DataChannel, we can share data between browsers without storing\nthe data on a centralized server.\n\nUses [pouchdb-replication-stream](https://github.com/nolanlawson/pouchdb-replication-stream)\nfor replicating PouchDB data.\n\n## Install\n\nThis library can be used both on Serverside and on Clientside.\n\n### On Serverside, using NodeJS\n\n```\n$ npm install --save pouch-replicate-webrtc\n```\n\n### On Clientside\n\nYou can import the pouch-replicate-webrtc.min.js from the dist folder.\n\nAlternatively, you can user Bower to install it:\n```\n$ bower install --save pouch-replicate-webrtc\n```\n\n## Usage\n\nExample using [rtc-quickconnect](https://github.com/rtc-io/rtc-quickconnect):\n\n```\nvar PouchDB = require('pouchdb');\nvar PouchReplicator = require('pouch-replicate-webrtc');\nvar quickconnect = require('rtc-quickconnect');\n\nvar pouchDb = new PouchDB('myDb');\nvar replicator = new PouchReplicator('replicator', pouchDb, {batch_size: 50});\n\nreplicator.on('endpeerreplicate', function() {\n  console.log('received data from replication');\n});\n\nquickconnect('https://switchboard.rtc.io/', { room: 'qc-simple-demo' })\n  .createDataChannel('replication')\n  .on('channel:opened:replication', function(id, dc) {\n    replicator.addPeer(id, dc);\n    replicator.replicate();\n  });\n\n```\n\n## Build\n\n### Clientside\n\nTo build the Clientside version, you will need to run:\n\n```\nnpm install\nnpm run browserify\n```\n\n## License\n\nMIT © [Scott Dietrich](http://minutestopost.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottmtp%2Fpouch-replicate-webrtc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscottmtp%2Fpouch-replicate-webrtc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottmtp%2Fpouch-replicate-webrtc/lists"}