📄 | .gitignore |
📄 | LICENSE.md |
📄 | README.md |
📁 | doc |
📄 | enable-plugin.js |
📄 | index.js |
📁 | lib |
📄 | package.json |
📄 | server.js |
📁 | static |
patchfoo
Plain SSB web UI. Uses HTML forms instead of client-side JS. Designed for use on low-power and low-resource computers.
Goals
- Support all message schemas commonly used in the main SSB network.
- Make efficient use of screen space, memory, and CPU.
- Run well in dillo browser.
- Serve as a place for experimenting with new HTML-based SSB UIs.
Features
- Render messages with author name and icons.
- Render core ssb message types, git-ssb message types, and raw messages.
- View public log, private log, user feeds, channels, and search.
- Paginate views bidirectionally.
- Compose, preview and publish public and private messages.
- and more
Joining SSB with Patchfoo
Find this guide on github or on SSB.
Requirements
Install
patchfoo can run either as a standalone process or as an ssb-server plugin.
Running as a ssb-server plugin is faster and uses less resources. But it requires you to run ssb-server from the command-line, or use a ssb-server distribution that allows installing ssb-server plugins.
Running as a standalone process can work while you are running a ssb-server distribution such as Patchwork, Patchbay, or Oasis. It also could potentially work with ssb-server implementations other than the Node.js one.
Install as a standalone process
git clone ssb://%YAg1hicat+2GELjE2QJzDwlAWcx0ML+1sXEdsWwvdt8=.sha256 patchfoo
cd patchfoo
ssb-npm install --production --branch %rI/Nt+iF8aRSwof9Ky26c2EGOrcMFUS0aeRiI4dqhiE=.sha256
npm start
Install as a ssb-server plugin
cd ~/.ssb/node_modules
git clone ssb://%YAg1hicat+2GELjE2QJzDwlAWcx0ML+1sXEdsWwvdt8=.sha256 patchfoo
cd patchfoo
ssb-npm install --production --branch %rI/Nt+iF8aRSwof9Ky26c2EGOrcMFUS0aeRiI4dqhiE=.sha256
node enable-plugin.js
Install extras
To most effectively render things, patchfoo needs the ssb-backlinks
and ssb-private
ssb-server plugins. If you are using a ssb-server distribution like Patchwork, Patchbay or Oasis's ssb-server, these are already included. If you are using ssb-server from the command-line, the plugins have to be installed separately:
sbot plugins.install ssb-backlinks
sbot plugins.install ssb-private
Config
Pass config options with args
e.g. npm start -- --patchfoo.port 8027
if running standalone,
or sbot server --patchfoo.port 8027
if running as an sbot plugin.
To make config options persistent, set them in ~/.ssb/config
, e.g.:
{
"patchfoo": {
"port": 8027,
"host": "::",
"filter": "all",
"showPrivates": true,
"previewVotes": true,
"voteBranches": false,
"ooo": true,
"nav": [
"new",
"public",
"private",
"mentions",
"peers",
"status",
"channels",
"tags",
"friends",
"search"
"live",
"compose",
"drafts",
"emojis",
"self",
"searchbox"
],
"dir": "patchfoo",
"scriptDir": "script",
"draftsDir": "drafts"
}
}
Config options
port
: port for the server to listen on. default:8027
host
: host address for the server to listen on. default:localhost
base
: base url that the app is running at. default:/
blob_base
: base url for links to ssb blobs. default: same asbase
img_base
: base url for blobs embedded as images. default: same asbase
emoji_base
: base url for emoji images. default: same asbase
encode_msgids
: whether to URL-encode message ids in local links. default:true
auth
: HTTP auth password. default:null
(no password required)allowAddresses
: Array of IP addresses allowed to connect. default:null
(allow any to connect). Note if host islocalhost
then this setting is useless.allowHosts
: Array of hostnames allowed that patchfoo may be connected at, or*
to allow using any hostname. Default is to allow patchfoo's configured port, at patchfoo's configured host,localhost
,127.0.0.1
or::1
. If hostname includes trailing colon without port, it means use patchfoo's server port.*
for the port means allow connections at any port. If hostname begins with.
, subdomains under it are allowed too.trustedReferers
: Array of URL patterns allowed as base of HTTP Referers for POST & PUT requests to patchfoo, or*
to allow any. Default ishttp://
followed by patchfoo's host and port, orlocalhost
,127.0.0.1
or[::1]
at patchfoo's port. Port may be wildcard (*
) to allow any port, or blank (trailing:
) for patchfoo's port. Subdomains can be allowed by beginning the hostname with a period (.
). patchfoo subpaths which may contain arbitrary blob content are excluded from the set of allowed referers.filter
: Filter setting."all"
to show all messages."invert"
to show messages that would be hidden by the default setting. Otherwise the default setting applies, which is so to only show messages authored or upvoted by yourself or by a feed that you you follow. Exceptions are that if you navigate to a user feed page, you will see messages authored by that feed, and if you navigate to a message page, you will see that message - regardless of the filter setting. Thefilter
setting may also be specified per-request as a query string parameter.showPrivates
: Whether or not to show private messages. Default istrue
. Overridden byfilter=all
.previewVotes
: Whether to preview creating votes/likes/digs (true
) or publish them immediately (false
). default:false
previewContacts
: Whether to preview creating contact/(un)follow/block messages (true
) or publish them immediately (false
). default:false
voteBranches
: whether to publish vote messages with threadbranch
androot
properties, and includevote
messages inbranch
properties of a posts. default:false
.ooo
: if true, usessb-ooo
to try to fetch missing messages in threads. also can set per-request with query string?ooo=1
. default:false
codeInTextareas
: iftrue
, render markdown code blocks in textareas. iffalse
, render them inpre
tags. default:false
nav
: array of nav links. Each item may be a string, object or special value. Special values are"searchbox"
and"self"
, which are the search field box, and link to the current feed id's page, respectively. Any other string is interpretted to be a link to the page of that name prefixed with a forward slash. An object may have propertiesname
andurl
, and that will be interpretted as a link with given name and URL (withtoUrl
conversions applied). default is the list in the readme above.dir
: name of directory in~/.ssb/
to use for patchfoo things. default:"patchfoo"
.scriptDir: name of directory in patchfoo's directory (as set by
patchfoo.dirconfig option above) to use for user scripts. default:
"script"`.draftsDir: name of directory in patchfoo's directory (as set by
patchfoo.dirconfig option above) to use for message draft data. default:
"drafts"`.newLimit: limit of messages to show on
/newpage. Default: 500. Overridable with query string parameter
limit=...`.dualMarkdownPreview
: Preview messages in composer in multiple SSB markdown implementations,ssb-marked
andssb-markdown
>= 3. Overridable with query string parameterdualMd=1
.replyMentionFeeds
: Mention thread branch authors in "reply" property, like Patchwork. Defaulttrue
.
TODO
- Add more sophisticated private messages view.
- Count digs
- Show network status
- Add UI for using pub invites
Certifications
patchfoo received the Troglodita Seal of Approval in %w+oNAm1...
License
Copyright (C) 2017-2019 Secure Scuttlebutt Consortium
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Built with git-ssb-web