{"id":13630172,"url":"https://github.com/ssbc/patchbay","last_synced_at":"2025-09-10T07:42:35.643Z","repository":{"id":8466484,"uuid":"58505248","full_name":"ssbc/patchbay","owner":"ssbc","description":"An alternative Secure Scuttlebutt client interface that is fully compatible with Patchwork","archived":false,"fork":false,"pushed_at":"2023-01-06T01:32:49.000Z","size":8751,"stargazers_count":385,"open_issues_count":34,"forks_count":78,"subscribers_count":30,"default_branch":"master","last_synced_at":"2024-04-14T08:48:38.555Z","etag":null,"topics":["chess","patchbay","sbot"],"latest_commit_sha":null,"homepage":"http://www.scuttlebutt.nz","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ssbc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-11T01:38:55.000Z","updated_at":"2024-01-19T10:24:04.000Z","dependencies_parsed_at":"2023-01-13T14:49:09.656Z","dependency_job_id":null,"html_url":"https://github.com/ssbc/patchbay","commit_stats":null,"previous_names":[],"tags_count":89,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbc%2Fpatchbay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbc%2Fpatchbay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbc%2Fpatchbay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbc%2Fpatchbay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssbc","download_url":"https://codeload.github.com/ssbc/patchbay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223757203,"owners_count":17197515,"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":["chess","patchbay","sbot"],"created_at":"2024-08-01T22:01:32.571Z","updated_at":"2025-04-17T13:31:45.665Z","avatar_url":"https://github.com/ssbc.png","language":"JavaScript","funding_links":["https://opencollective.com/patchbay/contribute","https://opencollective.com/patchbay","https://opencollective.com/patchbay/organization/0/website","https://opencollective.com/patchbay/organization/1/website","https://opencollective.com/patchbay/organization/2/website","https://opencollective.com/patchbay/organization/3/website","https://opencollective.com/patchbay/organization/4/website","https://opencollective.com/patchbay/organization/5/website","https://opencollective.com/patchbay/organization/6/website","https://opencollective.com/patchbay/organization/7/website","https://opencollective.com/patchbay/organization/8/website","https://opencollective.com/patchbay/organization/9/website"],"categories":["JavaScript","Projects"],"sub_categories":["Decentralized applications"],"readme":"# Patchbay\n\nPatchbay is a scuttlebutt client designed to be easy to modify and extend.\nIt uses the same database as [Patchwork](https://github.com/ssbc/patchwork) and [Patchfoo](https://github.com/ssbc/patchfoo), so you can easily take it for a spin with your existing identity.\n\n![](./screenshot.png)\n\nPatchbay was created by Dominic Tarr towards the end of the life of Patchwork v1.\nIt was born our out of the observation that maintaining a large client apps can be really hard work.\nPatchbay was designed to sidestep this by using some technology ([`depject`](https://github.com/dominictarr/depject)) to make parts easier to swap and extend.\n\nPatchbay now shares a common core library ([`patchcore`](https://github.com/ssbc/patchcore)) with Patchwork, and connects this in using the `depject`\nThis is another experiment in sharing useful code and maintenance.\n\nCurrent features boasted:\n- gatherings - a booking system\n- chess - p2p chess games and chat\n- bookblub - a book review interface\n- blogs - can read blogposts created in [Ticktack](https://github.com/ticktackim/ticktack-workplan)\n\n## Install\n\nDownload easy installer for Mac / Windows / Linux here : https://github.com/ssbc/patchbay/releases\n\nIf you'd like to hack on Patchbay, check out the Developer Install below.\n\n## Keyboard shortcuts\n\n[See here](./app/page/SHORTCUTS.md) or in patchbay for to the page `/shortcuts`\n---\n\n## Developer Install\n\nLibsodium has some build dependencies. On ubuntu systems the following might help:\n\n```sh\nsudo apt-get install m4 libtool eclipse-cdt-autotools\n```\n\nYou also might need these for the spellchecker:\n```sh\nsudo apt-get install libxext-dev libxtst-dev libxkbfile-dev\n```\n\nOn MacOS you may need the following packages installed (in this example, via [Homebrew](https://brew.sh/)):\n```sh\nbrew install libtool automake autoconf\n```\n\n### Embedded sever (recommended)\n\nThis runs an embedded sbot with all the right plugins already installed.\n\n```sh\ngit clone https://github.com/ssbc/patchbay\ncd patchbay\nnpm install\n```\n\nPatchbay doesn't give you a way to join pubs yet, so this is good if you've already done that with another client (like Patchwork).\n\n\n### External server\n\nThis method runs the ssb-server as a standalone command-line driven server.\nThe danger in this is that you don't install the right plugin versions, and the server won't necessarily be started with the right config\n (unless you add it to ~/.ssb/config etc).\n\nFor this reason I wouldn't currently recommend this approach.\nNote that core devs aren't often running things this way, so if this is broken we wouldn't know, and might not be keen to fix it right now.\n\nInstall a standalone ssb-server (your gossip server)\n```sh\nnpm install ssb-server@latest -g\n```\n\n```sh\nsbot server\n\n# then in another tab (these must be separate commands)\nsbot plugins.install ssb-about\nsbot plugins.install ssb-backlinks\nsbot plugins.install ssb-unread\nsbot plugins.install ssb-suggest\nsbot plugins.install ssb-search # for search\nsbot plugins.install ssb-chess-db # for chess\nsbot plugins.install ssb-private # for private messages\nsbot plugins.install ssb-meme # for image search\n\n# restart sbot server (go back to previous tab and kill it)\n```\n\nRestart your sbot, then (optionally) use an invite code. This will give you your first friend, from which point you can find others:\n```sh\nsbot invite.accept LONG_INVITE_CODE_MAYBE_IN_QUOTES\n```\n\nInstall Patchbay\n```sh\ngit clone https://github.com/ssbc/patchbay\ncd patchbay\nnpm install\n```\n\n## Running the desktop app\n\nEasy mode (embedded sbot):\n```sh\n# from the patchbay repo folder\nnpm start\n```\n\nHarder mode:\n```sh\nssb-server start\n\n# from the patchbay repo folder\nnpm run lite\n```\n\n## Development\n\n### Key depject modules in Patchbay\n\nHere's a quick high level overview of the depject modules you're going to want to know about:\n\n#### `app.html.app`\n\nThe top level module which starts the front end js.\n\n#### `app.sync.initialise`\n\nA collection of function which are called on app start.\nDoes things like load css into the app, set up custom listeners, set default settings\n\n#### `app.sync.goTo(location)`\n\nThe function you call when you want to open a new location.\n`location` can be a string (like a message or blob id) or an object.\n\nNote - some locations are _normalised_ before being passed onto the router.\nCheck out `router.async.normalise` for explicit detail.\n\n#### `router.sync.router`\n\nThis is the module where you can add routes to the app.\nThis is ultimately reduced along with all other `router.sync.router` modules into the final router.\n\n#### `app.html.settings`\n\nGiving modules here will add settings sections to the settings page (`app.page.settings`).\n\n\n### Requiring the core of patchbay\n\nIf you don't want the default modules, you can grab the main part of patchbay and pick and choose modules like this:\n\n```js\nconst patchcore = require('patchcore')\nconst patchbay = require('patchbay/main')\nconst combine = require('depject')\nconst entry = require('depject/entry')\nconst nest = require('depnest')\n\nconst sockets = combine(\n  require('patchbay-dark-crystal'), // the module(s) you want\n  patchbay,\n  patchcore // required\n)\n\nconst api = entry(sockets, nest('app.html.app', 'first'))\ndocument.body.appendChild(api.app.html.app())\n```\n\nYou'll need to be running your own sbot and launch this with electro / electron. See `index.js` to see that\n\n### How to add a new page\n\ne.g. to add a 'cats' page to the app:\n\n- Add a file `app/page/cats.js` which gives `app.page.cats`\n- Tell the router to send people browsing to location `{page: 'cats'}` to send them to this page\n  - route will look like `[location =\u003e location.page === 'cats', api.app.page.cats]`\n  - Note the normaliser will automaticall turn location `/cats` to `{page: 'cats'}`\n- Add a link somewhere which will trigger that route:\n  - e.g. activate`api.app.sync.goTo('/cats')` onclick\n  - e.g. add a link `\u003ca href='/cats'\u003eCats!\u003c/a\u003e` (which will be clicked up by listeners)\n\n\n\n## Contributors\n\n### Code Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n\u003ca href=\"https://github.com/ssbc/patchbay/graphs/contributors\"\u003e\u003cimg src=\"https://opencollective.com/patchbay/contributors.svg?width=890\u0026button=false\" /\u003e\u003c/a\u003e\n\n### Financial Contributors\n\nBecome a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/patchbay/contribute)]\n\n#### Individuals\n\n\u003ca href=\"https://opencollective.com/patchbay\"\u003e\u003cimg src=\"https://opencollective.com/patchbay/individuals.svg?width=890\"\u003e\u003c/a\u003e\n\n#### Organizations\n\nSupport this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/patchbay/contribute)]\n\n\u003ca href=\"https://opencollective.com/patchbay/organization/0/website\"\u003e\u003cimg src=\"https://opencollective.com/patchbay/organization/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/patchbay/organization/1/website\"\u003e\u003cimg src=\"https://opencollective.com/patchbay/organization/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/patchbay/organization/2/website\"\u003e\u003cimg src=\"https://opencollective.com/patchbay/organization/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/patchbay/organization/3/website\"\u003e\u003cimg src=\"https://opencollective.com/patchbay/organization/3/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/patchbay/organization/4/website\"\u003e\u003cimg src=\"https://opencollective.com/patchbay/organization/4/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/patchbay/organization/5/website\"\u003e\u003cimg src=\"https://opencollective.com/patchbay/organization/5/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/patchbay/organization/6/website\"\u003e\u003cimg src=\"https://opencollective.com/patchbay/organization/6/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/patchbay/organization/7/website\"\u003e\u003cimg src=\"https://opencollective.com/patchbay/organization/7/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/patchbay/organization/8/website\"\u003e\u003cimg src=\"https://opencollective.com/patchbay/organization/8/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/patchbay/organization/9/website\"\u003e\u003cimg src=\"https://opencollective.com/patchbay/organization/9/avatar.svg\"\u003e\u003c/a\u003e\n\n## License\n\nAGPL-3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssbc%2Fpatchbay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssbc%2Fpatchbay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssbc%2Fpatchbay/lists"}