• Stars
    star
    387
  • Rank 110,971 (Top 3 %)
  • Language
    JavaScript
  • Created over 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An alternative Secure Scuttlebutt client interface that is fully compatible with Patchwork

Patchbay

Patchbay is a scuttlebutt client designed to be easy to modify and extend. It uses the same database as Patchwork and Patchfoo, so you can easily take it for a spin with your existing identity.

Patchbay was created by Dominic Tarr towards the end of the life of Patchwork v1. It was born our out of the observation that maintaining a large client apps can be really hard work. Patchbay was designed to sidestep this by using some technology (depject) to make parts easier to swap and extend.

Patchbay now shares a common core library (patchcore) with Patchwork, and connects this in using the depject This is another experiment in sharing useful code and maintenance.

Current features boasted:

  • gatherings - a booking system
  • chess - p2p chess games and chat
  • bookblub - a book review interface
  • blogs - can read blogposts created in Ticktack

Install

Download easy installer for Mac / Windows / Linux here : https://github.com/ssbc/patchbay/releases

If you'd like to hack on Patchbay, check out the Developer Install below.

Keyboard shortcuts

See here or in patchbay for to the page /shortcuts

Developer Install

Libsodium has some build dependencies. On ubuntu systems the following might help:

sudo apt-get install m4 libtool eclipse-cdt-autotools

You also might need these for the spellchecker:

sudo apt-get install libxext-dev libxtst-dev libxkbfile-dev

On MacOS you may need the following packages installed (in this example, via Homebrew):

brew install libtool automake autoconf

Embedded sever (recommended)

This runs an embedded sbot with all the right plugins already installed.

git clone https://github.com/ssbc/patchbay
cd patchbay
npm install

Patchbay 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).

External server

This method runs the ssb-server as a standalone command-line driven server. The 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 (unless you add it to ~/.ssb/config etc).

For this reason I wouldn't currently recommend this approach. Note 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.

Install a standalone ssb-server (your gossip server)

npm install ssb-server@latest -g
sbot server

# then in another tab (these must be separate commands)
sbot plugins.install ssb-about
sbot plugins.install ssb-backlinks
sbot plugins.install ssb-unread
sbot plugins.install ssb-suggest
sbot plugins.install ssb-search # for search
sbot plugins.install ssb-chess-db # for chess
sbot plugins.install ssb-private # for private messages
sbot plugins.install ssb-meme # for image search

# restart sbot server (go back to previous tab and kill it)

Restart your sbot, then (optionally) use an invite code. This will give you your first friend, from which point you can find others:

sbot invite.accept LONG_INVITE_CODE_MAYBE_IN_QUOTES

Install Patchbay

git clone https://github.com/ssbc/patchbay
cd patchbay
npm install

Running the desktop app

Easy mode (embedded sbot):

# from the patchbay repo folder
npm start

Harder mode:

ssb-server start

# from the patchbay repo folder
npm run lite

Development

Key depject modules in Patchbay

Here's a quick high level overview of the depject modules you're going to want to know about:

app.html.app

The top level module which starts the front end js.

app.sync.initialise

A collection of function which are called on app start. Does things like load css into the app, set up custom listeners, set default settings

app.sync.goTo(location)

The function you call when you want to open a new location. location can be a string (like a message or blob id) or an object.

Note - some locations are normalised before being passed onto the router. Check out router.async.normalise for explicit detail.

router.sync.router

This is the module where you can add routes to the app. This is ultimately reduced along with all other router.sync.router modules into the final router.

app.html.settings

Giving modules here will add settings sections to the settings page (app.page.settings).

Requiring the core of patchbay

If you don't want the default modules, you can grab the main part of patchbay and pick and choose modules like this:

const patchcore = require('patchcore')
const patchbay = require('patchbay/main')
const combine = require('depject')
const entry = require('depject/entry')
const nest = require('depnest')

const sockets = combine(
  require('patchbay-dark-crystal'), // the module(s) you want
  patchbay,
  patchcore // required
)

const api = entry(sockets, nest('app.html.app', 'first'))
document.body.appendChild(api.app.html.app())

You'll need to be running your own sbot and launch this with electro / electron. See index.js to see that

How to add a new page

e.g. to add a 'cats' page to the app:

  • Add a file app/page/cats.js which gives app.page.cats
  • Tell the router to send people browsing to location {page: 'cats'} to send them to this page
    • route will look like [location => location.page === 'cats', api.app.page.cats]
    • Note the normaliser will automaticall turn location /cats to {page: 'cats'}
  • Add a link somewhere which will trigger that route:
    • e.g. activateapi.app.sync.goTo('/cats') onclick
    • e.g. add a link <a href='/cats'>Cats!</a> (which will be clicked up by listeners)

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

License

AGPL-3.0

More Repositories

1

patchwork

A decentralized messaging and sharing app built on top of Secure Scuttlebutt (SSB).
JavaScript
3,582
star
2

ssb-server

The gossip and replication server for Secure Scuttlebutt - a distributed social network
JavaScript
1,677
star
3

ssb-db

A database of unforgeable append-only feeds, optimized for efficient replication for peer to peer protocols
JavaScript
1,175
star
4

scuttlebutt-protocol-guide

Protocol documentation for Secure Scuttlebutt
HTML
213
star
5

go-ssb-room

Room server implemented in Go
Go
187
star
6

handbook.scuttlebutt.nz

ssb handbook: A guide to the Secure Scuttlebutt key concepts and influences (see also, new website: https://gitlab.com/ssbc/scuttlebutt.nz/)
CSS
165
star
7

go-ssb

Go implementation of ssb (work in progress!)
Go
155
star
8

epidemic-broadcast-trees

bandwidth efficient broadcast gossip
JavaScript
120
star
9

multiserver

A single interface that can work with multiple protocols, and multiple transforms of those protocols (eg, security layer)
JavaScript
103
star
10

muxrpc

lightweight multiplexed rpc
JavaScript
98
star
11

chloride

JavaScript
90
star
12

secret-stack

connect peers to each other using secret-handshakes
JavaScript
89
star
13

patchcore

A shared library of depject modules to build Secure Scuttlebutt social network apps
JavaScript
75
star
14

docs

Documentation repo
Shell
61
star
15

patchfoo

Plain SSB web UI. Uses HTML forms instead of client-side JS. Designed for use on low-power and low-resource computers.
54
star
16

scuttle-shell

A system tray app for running Secure Scuttlebutt and providing sbot features to your local system
JavaScript
54
star
17

jitdb

A database on top of a log with automatic index generation and maintenance
JavaScript
49
star
18

ssb-db2

A new database for secure-scuttlebutt
JavaScript
47
star
19

ssb-client

client library to scuttlebot
JavaScript
46
star
20

bipf

Binary json codec optimized for in-place access
JavaScript
45
star
21

go-secretstream

Go port of secret-handshake
Go
44
star
22

ssb-keys

keyfile operations for ssb
JavaScript
36
star
23

dgram-broadcast

Formerly known as "broadcast-stream" on npm
JavaScript
34
star
24

dynamic-dijkstra

JavaScript
31
star
25

tinySSB

tinySSB is "Secure Scuttlebutt over LoRa and BLE"
C
29
star
26

ssb-peer-invites

A new ssb invite system to create invites without having a pub
JavaScript
26
star
27

ssb-tribes

JavaScript
26
star
28

go-muxrpc

js/muxrpc in golang (for interfacing ssb/scuttlebot)
Go
23
star
29

ssb-friends

Manages the SSB social graph
JavaScript
23
star
30

ssb-config

standard configuration for ssb
JavaScript
23
star
31

packet-stream

JavaScript
23
star
32

ssb-tunnel

create a p2p link tunneled through a pub server
JavaScript
22
star
33

ssb-ahoy

An onboarding mini-app - gets you all set up, and caught up on the gossip before you set out on your adventure
JavaScript
22
star
34

sips

Secure Scuttlebutt Implementation Protocols
HTML
22
star
35

netsim

secure scuttlebutt network simulator
Go
21
star
36

rooms2

Design doc for the next edition of SSB Room servers
HTML
21
star
37

dev.scuttlebutt.nz

The go-to place for updated developer information on the SSB stack in different languages
20
star
38

ssb-threads

Scuttlebot plugin for fetching messages as threads
JavaScript
20
star
39

multiblob

A content-addressable-store that supports multiple hashing algorithms, and pull-streams
JavaScript
20
star
40

envelope-spec

JavaScript
18
star
41

patchlite

[WIP] A browser lite client for the Scuttlebutt network
JavaScript
18
star
42

ssb-ebt

secure scuttlebutt replication with epidemic-broadcast-trees
JavaScript
18
star
43

ssb-identities

manage multiple identities as sbot plugin
JavaScript
18
star
44

ssb2-discussion-forum

not quite tiny, also not quite large
17
star
45

ssb-uri-spec

Specification of SSB URIs
16
star
46

async-append-only-log

A new append-only-log for SSB purposes
JavaScript
16
star
47

visual-docs

Diagrams and animations documenting Secure Scuttlebutt (scuttlebutt.nz) and Δ€hau (ahau.io)
JavaScript
16
star
48

ssb-conn

SSB plugin for establishing and managing peer connections
TypeScript
16
star
49

ssb-typescript

Contains type definitions for common SSB concepts
TypeScript
16
star
50

margaret

a flume-like persisted append-only log implementation
Go
16
star
51

ssb-spec-drafts

A collection of protocol specifications for Secure Scuttlebutt
HTML
15
star
52

ssb-first-aid-kit

A user-friendly app for diagnosing and fixing problems with your Scuttlebutt installation
Vue
15
star
53

fusion-identity-spec

14
star
54

ssb-ooo

retrive ssb messages Out Of Order
JavaScript
14
star
55

ssb-subset-replication-spec

14
star
56

private-group-spec

JavaScript
13
star
57

ssb-graphviz

visualize your ssb network graph
JavaScript
12
star
58

ssb-viewer

JavaScript
12
star
59

ssb-validate

better ssb validator
JavaScript
12
star
60

ssb-group-exclusion-spec

12
star
61

ssb-query

JavaScript
12
star
62

ssb-hello-ws

simplest example to get a ssb-client working over websockets
HTML
12
star
63

envelope-js

new message encryption for ssb
JavaScript
12
star
64

layered-graph

JavaScript
11
star
65

ssb-blobs

blob gossiping ssb-subprotocol
JavaScript
11
star
66

ssb-buttwoo-spec

Spec for a new binary feed format for SSB
11
star
67

ssb-backup-tool

A backup tool for the Scuttleverse
JavaScript
11
star
68

scuttlebot.io

Source repo for https://scuttlebot.io
JavaScript
11
star
69

ssb-meta-feeds-spec

Design doc for subfeeds in SSB
HTML
11
star
70

ssb-usage-stats

Generate statistics about network use (number of users, growth, retention, etc)
JavaScript
11
star
71

ssb-meta-feeds

JavaScript
10
star
72

ssb-ws

ssb-ws & http server for ssb
JavaScript
10
star
73

ssb-uri2

Utilities for recognizing and converting SSB URIs
JavaScript
10
star
74

ssb-fixtures

Generate a simulated .ssb folder
TypeScript
10
star
75

ssb-gossip

Schedule connections randomly with a peerlist constructed from config, multicast UDP announcements, feed announcements, and API-calls
JavaScript
10
star
76

scuttle-testbot

JavaScript
10
star
77

ssb-bfe-rs

Binary Field Encodings (BFE) for Secure Scuttlebutt (SSB)
Rust
10
star
78

ssb-http-auth-spec

Specification of SSB HTTP Authentication
HTML
10
star
79

ssb-backlinks

scuttlebot plugin for indexing all link mentions of messages
JavaScript
10
star
80

ssb-markdown

patchwork's markdown parser
JavaScript
9
star
81

bipf-spec

Spec for bipf
9
star
82

ssb-bfe-spec

JavaScript
9
star
83

ssb-links

ssb-plugin that indexes all the links!
JavaScript
9
star
84

ssb-replicate

ssb legacy replication, previously built into ssb-server
JavaScript
8
star
85

ssb-conn-hub

Module that manages active connections to SSB peers
TypeScript
8
star
86

ssb-tribes2

SSB private groups with ssb-db2
JavaScript
8
star
87

ssb-device-address

announce a public address for yourself
JavaScript
8
star
88

stack-diagram

A diagram detailing the core components utilized in the SSB stack
8
star
89

ssb-sort

JavaScript
8
star
90

ssb-serve-blobs

Sbot plugin to serve blobs from a local http server
JavaScript
8
star
91

packet-stream-codec

JavaScript
8
star
92

ssb-search2

Full-text search in SSB using ssb-db2
TypeScript
8
star
93

ssb-replication-scheduler

Plugin to trigger replication of feeds identified as friendly in the social graph
JavaScript
8
star
94

ssb-tangle

JavaScript
8
star
95

ssb-private

scuttlebot plugin for indexed private messages
JavaScript
8
star
96

ssb-invite

"followbot" style invite codes for ssb
JavaScript
8
star
97

ssb-meta-feeds-migration-spec

How to migrate from classic SSB to metafeeds
7
star
98

ssb-caps

The default "Caps" keys for accessing the SSB protocol using secret handshake
7
star
99

go-metafeed

A go implementation of the bendy-butt format spec to support ssb metafeeds
Go
7
star
100

ssb-meme

JavaScript
7
star