git ssb

0+

ev / microbay



forked from Dominic / patchbay

Commit 07d1033148aa6926c91d3815e5f7f7d0c2776d72

simplify readme and remove first unnecessary things

Ev Bogue committed on 9/13/2016, 12:39:02 AM
Parent: 5ed0ef75a42972670b29aada99be810a8bde7b80

Files changed

README.mdchanged
config.jschanged
graph.svgdeleted
README.mdView
@@ -1,64 +1,40 @@
1-# patchbay
1 +## Microbay
22
3-Prototype of a pluggable patchwork.
3 +...Is an experimental fork of Patchbay. I continue to be a newb coder, and I think there's a lot to learn from Patchbay. But I often have no idea what is going on when I am looking at the code.
44
5-`patchbay` is an secure-scuttlebutt client interface
6-that is fully compatible with [patchwork](https://github.com/ssbc/patchwork)
5 +Microbay attempts to fix this situation by removing any unnecessary pieces in order to get clear on what is going on. When I break something, then I have to fix it!
76
8-I started `patchbay` to experiment with a different internal architecture
9-based on [depject](https://github.com/dominictarr/depject). The goal was
10-to make it easier to develop new features, and enable or disable features.
11-This has so far been quite successful!
7 +This is a teardown.
128
13-This makes in very easy to create say, a renderer for a new message type,
14-or switch to a different method for choosing user names.
9 +Also I want to remove Electron because have a theory that it's garbage bloatware.
1510
16-## Running
11 +## Install this shiz
1712
1813 ```
19-npm install scuttlebot@latest -g
20-# make sure you have secure-scuttlebutt@15.2.0
21-npm ls secure-scuttlebutt -g
22-sbot server
23-# if you are already running patchwork, that also works.
24-# (must have at least >= 2.8)
14 +% npm install scuttlebot
15 +% sbot server
16 +```
2517
26-# then in another tab (these must be 3 separate commands)
27-sbot plugins.install ssb-links
28-sbot plugins.install ssb-query
29-sbot plugins.install ssb-ws
30-# restart sbot server (go back to previous tab and kill it)
18 +In a new terminal you need to install three necessary sbot plugins.
19 +
3120 ```
32-now clone and run patchbay.
21 +% sbot plugins.install ssb-links
22 +% sbot plugins.install ssb-query
23 +% sbot plugins.install ssb-ws
3324 ```
34-git clone https://github.com/dominictarr/patchbay.git
35-cd patchbay
36-npm install
37-npm install electro electron-prebuilt -g
38-npm run build
39-electro index.js
40-```
4125
42-## how to add a feature
26 +Restart sbot by going back to your first terminal `ctrl-c`ing and `sbot server`ing again.
4327
44-To add a new message type, add add a js to `./modules/` that
45-exports a function named `message_content` (it should return an html element)
46-To add a new tab, export a function named `screen_view` (returns an html element)
28 +Now clone this down and run it
4729
48-To add a new detail, that appears above a message,
49-export a function named `message_meta`.
30 +```
31 +% git clone
32 +% cd folder
33 +% npm install
34 +% electro index.js # until I can figure out how to get rid of electron
35 +```
5036
51-see the code for more examples.
52-
53-## module graph
54-
55-patchbay uses [depject](http://github.com/dominictarr/depject) to manage it's modules.
56-here is a graph of the current connections between them. (round shows module,
57-square shows api, arrow direction points from user to provider)
58-
59-[module graph](./graph.svg)
60-
6137 ## License
6238
6339 MIT
6440
config.jsView
@@ -1,32 +1,11 @@
11
22 var URL = require('url')
33
44 module.exports = function () {
5- var remote = 'undefined' === typeof localStorage
6- ? null //'ws://localhost:8989~shs:' + require('./keys')
7- : localStorage.remote
85
6 + blobsUrl = 'http://localhost:8989/blobs/get'
97
10- //TODO: use _several_ remotes, so if one goes down,
11- // you can still communicate via another...
12- // also, if a blob does not load, use another pub...
13-
14- //if we are the light client, get our blobs from the same domain.
15- var blobsUrl
16- if(remote) {
17- var r = URL.parse(remote.split('~')[0])
18- //this will work for ws and wss.
19- r.protocol = r.protocol.replace('ws', 'http')
20- r.pathname = '/blobs/get'
21- blobsUrl = URL.format(r)
22- }
23- else
24- blobsUrl = 'http://localhost:8989/blobs/get'
25-
26- return {
27- remote: remote,
28- blobsUrl: blobsUrl
29- }
8 + return { blobsUrl: blobsUrl }
309 }
3110
3211
graph.svg
graph.svg

Built with git-ssb-web