Skip to content

Commit cb2c084

Browse files
committed
docs: reformat readme markdown
1 parent e007ea0 commit cb2c084

File tree

2 files changed

+134
-41
lines changed

2 files changed

+134
-41
lines changed

app/.prettierrc renamed to .prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
}
99
],
1010
"printWidth": 90,
11+
"proseWrap": "always",
1112
"singleQuote": true,
1213
"useTabs": false,
1314
"semi": true,
@@ -16,4 +17,4 @@
1617
"bracketSpacing": true,
1718
"jsxBracketSameLine": false,
1819
"arrowParens": "avoid"
19-
}
20+
}

README.md

Lines changed: 132 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,69 @@
44

55
![screenshot](./app/src/assets/images/screenshot.png)
66

7-
Shushtar is a browser-based interface for managing the off-chain liquidity of your `lnd` Lightning Network node. It presents a visual representation of your channels and balances, while allowing you to perform submarine swaps via the [Lightning Loop](https://lightning.engineering/loop) service using a graphical interface. With a bird's eye view of all of your open channels, you can instantly see which ones need your immediate attention.
7+
Shushtar is a browser-based interface for managing the off-chain liquidity of your `lnd`
8+
Lightning Network node. It presents a visual representation of your channels and balances,
9+
while allowing you to perform submarine swaps via the
10+
[Lightning Loop](https://lightning.engineering/loop) service using a graphical interface.
11+
With a bird's eye view of all of your open channels, you can instantly see which ones need
12+
your immediate attention.
813

914
You can configure the UI to classify channels according to your node's operating mode.
1015

11-
- **Optimize for Receiving**: For merchants who primarily receive inbound Lightning payments, the channels with high local balances will be shaded red.
12-
- **Optimize for Routing**: For routing node operators, that want to keep their channels balanced close to 50%, the channels with a high balance in either direction will be flagged.
13-
- **Optimize for Sending**: For exchanges, fiat gateways, and other operators who primarily send outgoing Lightning payments, the channels with high local balances will be shaded red.
16+
- **Optimize for Receiving**: For merchants who primarily receive inbound Lightning
17+
payments, the channels with high local balances will be shaded red.
18+
- **Optimize for Routing**: For routing node operators, that want to keep their channels
19+
balanced close to 50%, the channels with a high balance in either direction will be
20+
flagged.
21+
- **Optimize for Sending**: For exchanges, fiat gateways, and other operators who
22+
primarily send outgoing Lightning payments, the channels with high local balances will
23+
be shaded red.
1424

1525
## Architecture
1626

17-
Shushtar is packaged as a single binary which contains the [`lnd`](https://github.com/lightningnetwork/lnd), [`loopd`](https://github.com/lightninglabs/loop) and [`faraday`](https://github.com/lightninglabs/faraday) daemons all in one. It also contains an HTTP server to serve the web assets (html/js/css) and a GRPC proxy to forward web requests from the browser to the appropriate GRPC server. This deployment strategy was chosen as it greatly simplifies the operational overhead of installation, configuration and maintenance that would be necessary to run each of these servers independently. You only need to download one executable and run one command to get Shushtar up and running. We include the CLI binaries `lncli`, `loop` and `frcli` for convenience in the downloadable archives as well.
27+
Shushtar is packaged as a single binary which contains the
28+
[`lnd`](https://github.com/lightningnetwork/lnd),
29+
[`loopd`](https://github.com/lightninglabs/loop) and
30+
[`faraday`](https://github.com/lightninglabs/faraday) daemons all in one. It also contains
31+
an HTTP server to serve the web assets (html/js/css) and a GRPC proxy to forward web
32+
requests from the browser to the appropriate GRPC server. This deployment strategy was
33+
chosen as it greatly simplifies the operational overhead of installation, configuration
34+
and maintenance that would be necessary to run each of these servers independently. You
35+
only need to download one executable and run one command to get Shushtar up and running.
36+
We include the CLI binaries `lncli`, `loop` and `frcli` for convenience in the
37+
downloadable archives as well.
1838

1939
## Installation
2040

21-
There are two options for installing Shushtar: download the published binaries for your platform, or compile from source code.
41+
There are two options for installing Shushtar: download the published binaries for your
42+
platform, or compile from source code.
2243

2344
#### Download Binaries
2445

25-
Shushtar binaries for many platforms are made available on the GitHub [Releases](https://github.com/lightninglabs/shushtar/releases) page in this repo. There you can download the latest version and extract the archive into a directory on your computer.
46+
Shushtar binaries for many platforms are made available on the GitHub
47+
[Releases](https://github.com/lightninglabs/shushtar/releases) page in this repo. There
48+
you can download the latest version and extract the archive into a directory on your
49+
computer.
2650

2751
#### Compile from Source Code
2852

29-
To compile from source code, you'll need to have some prerequisite developer tooling installed on your machine.
53+
To compile from source code, you'll need to have some prerequisite developer tooling
54+
installed on your machine.
3055

31-
- **Go**: Shushtar's backend web server is written in Go. Instructions for installing Go for your operating system can be found on the [golang install](https://golang.org/doc/install) page. The minimum version supported is Go v1.13.
32-
- **NodeJS**: Shushtar's frontend is written in TypeScript and built on top of the React JS web framework. To bundle the assets into Javascript & CSS compatible with web browsers, NodeJS is required. It can be downloaded and installed by following the instructions on the [NodeJS download](https://nodejs.org/en/download/) page.
33-
- **Yarn**: a popular package manager for NodeJS application dependencies. Installation information can be found on the [Yarn Installation](https://classic.yarnpkg.com/en/docs/install) page.
56+
- **Go**: Shushtar's backend web server is written in Go. Instructions for installing Go
57+
for your operating system can be found on the
58+
[golang install](https://golang.org/doc/install) page. The minimum version supported is
59+
Go v1.13.
60+
- **NodeJS**: Shushtar's frontend is written in TypeScript and built on top of the React
61+
JS web framework. To bundle the assets into Javascript & CSS compatible with web
62+
browsers, NodeJS is required. It can be downloaded and installed by following the
63+
instructions on the [NodeJS download](https://nodejs.org/en/download/) page.
64+
- **Yarn**: a popular package manager for NodeJS application dependencies. Installation
65+
information can be found on the
66+
[Yarn Installation](https://classic.yarnpkg.com/en/docs/install) page.
3467

35-
Once you have the necessary prerequisites, Shushtar can be compiled by running the following commands:
68+
Once you have the necessary prerequisites, Shushtar can be compiled by running the
69+
following commands:
3670

3771
```
3872
git clone https://github.com/lightninglabs/shushtar.git
@@ -48,13 +82,26 @@ Shushtar only has a few configuration parameters itself.
4882

4983
#### Required
5084

51-
You must set `httpslisten` to the host & port that the https server should listen on. Also set `uipassword` to a strong password to use to login to the website in your browser. A minimum of 8 characters is required. In a production environment, it's recommended that you store this password as an environment variable.
85+
You must set `httpslisten` to the host & port that the https server should listen on. Also
86+
set `uipassword` to a strong password to use to login to the website in your browser. A
87+
minimum of 8 characters is required. In a production environment, it's recommended that
88+
you store this password as an environment variable.
5289

5390
#### Optional
5491

55-
You can also configure the HTTP server to automatically install a free SSL certificate provided by [LetsEncrypt](https://letsencrypt.org/). This is recommended if you plan to access the website from a remote computer and do not want to deal with the browser warning you about the self-signed certificate. You just need to specify the domain name you wish to use, and make sure port 80 is open in your in your firewall. LetsEncrypt requires this to verify that you own the domain name. Shushtar will listen on port 80 to handle the verification requests. On some linux-based platforms, you may need to run Shushtar with superuser privileges since port 80 is a system port.
92+
You can also configure the HTTP server to automatically install a free SSL certificate
93+
provided by [LetsEncrypt](https://letsencrypt.org/). This is recommended if you plan to
94+
access the website from a remote computer and do not want to deal with the browser warning
95+
you about the self-signed certificate. You just need to specify the domain name you wish
96+
to use, and make sure port 80 is open in your in your firewall. LetsEncrypt requires this
97+
to verify that you own the domain name. Shushtar will listen on port 80 to handle the
98+
verification requests. On some linux-based platforms, you may need to run Shushtar with
99+
superuser privileges since port 80 is a system port.
56100

57-
> Note: Shushtar only serves content over **HTTPS**. If you do not use `letsencrypt`, Shushtar will use the self-signed certificate that is auto-generated by `lnd` to encrypt the browser-to-server communication. Web browsers will display a warning when using the self-signed certificate.
101+
> Note: Shushtar only serves content over **HTTPS**. If you do not use `letsencrypt`,
102+
> Shushtar will use the self-signed certificate that is auto-generated by `lnd` to encrypt
103+
> the browser-to-server communication. Web browsers will display a warning when using the
104+
> self-signed certificate.
58105
59106
```
60107
Application Options:
@@ -69,7 +116,14 @@ Application Options:
69116
certificate (default: /Users/jamal/Library/Application Support/Lnd/letsencrypt)
70117
```
71118

72-
In addition to the Shushtar specific parameters, you must also provide configuration to the `lnd`, `loop` and `faraday` daemons. For `lnd`, each flag must be prefixed with `lnd.` (ex: `lnd.lnddir=~/.lnd`). Please see the [sample-lnd.conf](https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf) file for more details on the available parameters. Note that `loopd` and `faraday` will automatically connect to the in-process `lnd` node, so you do not need to provide them with any additional parameters unless you want to override them. If you do override them, be sure to add the `loop.` and `faraday.` prefixes.
119+
In addition to the Shushtar specific parameters, you must also provide configuration to
120+
the `lnd`, `loop` and `faraday` daemons. For `lnd`, each flag must be prefixed with `lnd.`
121+
(ex: `lnd.lnddir=~/.lnd`). Please see the
122+
[sample-lnd.conf](https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf)
123+
file for more details on the available parameters. Note that `loopd` and `faraday` will
124+
automatically connect to the in-process `lnd` node, so you do not need to provide them
125+
with any additional parameters unless you want to override them. If you do override them,
126+
be sure to add the `loop.` and `faraday.` prefixes.
73127

74128
Here is an example command to start `shushtar` on testnet with a local `bitcoind` node:
75129

@@ -97,14 +151,13 @@ $ ./shushtar \
97151
--faraday.min_monitored=48h
98152
```
99153

100-
You can also store the configuration in a persistent `lnd.conf` file so you do
101-
not need to type in the command line arguments every time you start the server.
102-
Just remember to use the appropriate prefixes as necessary.
154+
You can also store the configuration in a persistent `lnd.conf` file so you do not need to
155+
type in the command line arguments every time you start the server. Just remember to use
156+
the appropriate prefixes as necessary.
103157

104-
Also make sure to include the `lnd` general options in the `[Application Options]`
105-
section because the section name `[Lnd]` is not unique anymore because of how we
106-
combine the configurations of all daemons. This will hopefully be fixed in a
107-
future release.
158+
Also make sure to include the `lnd` general options in the `[Application Options]` section
159+
because the section name `[Lnd]` is not unique anymore because of how we combine the
160+
configurations of all daemons. This will hopefully be fixed in a future release.
108161

109162
Example `lnd.conf`:
110163

@@ -149,36 +202,48 @@ The default location for the `lnd.conf` file will depend on your operating syste
149202

150203
### Upgrade Existing Nodes
151204

152-
If you already have existing `lnd`, `loop`, or `faraday` nodes, you can easily upgrade them to the Shushtar single executable while keeping all of your past data.
205+
If you already have existing `lnd`, `loop`, or `faraday` nodes, you can easily upgrade
206+
them to the Shushtar single executable while keeping all of your past data.
153207

154208
For `lnd`:
155209

156-
- if you use an `lnd.conf` file for configurations, add the `lnd.` prefix to each of the configuration parameters.
157-
210+
- if you use an `lnd.conf` file for configurations, add the `lnd.` prefix to each of the
211+
configuration parameters.
212+
158213
Before:
214+
159215
```
160216
[Application Options]
161217
alias=merchant
162218
```
219+
163220
After:
221+
164222
```
165223
[Application Options]
166224
lnd.alias=merchant
167225
```
168-
- if you use command line arguments for configuration, add the `lnd.` prefix to each argument to `shushtar`
169-
226+
227+
- if you use command line arguments for configuration, add the `lnd.` prefix to each
228+
argument to `shushtar`
229+
170230
Before:
231+
171232
```
172233
$ lnd --lnddir=~/.lnd --alias=merchant ...
173234
```
235+
174236
After:
237+
175238
```
176239
$ shushtar lnd.lnddir=~/.lnd --lnd.alias=merchant ...
177240
```
178241

179242
For `loop`:
180243

181-
- if you use an `loop.conf` file for configurations, copy the parameters into the `lnd.conf` file that `shushtar` uses, and add the `loop.` prefix to each of the configuration parameters.
244+
- if you use an `loop.conf` file for configurations, copy the parameters into the
245+
`lnd.conf` file that `shushtar` uses, and add the `loop.` prefix to each of the
246+
configuration parameters.
182247

183248
Before: (in `loop.conf`)
184249

@@ -194,64 +259,91 @@ For `loop`:
194259
loop.loopoutmaxparts=5
195260
```
196261

197-
- if you use command line arguments for configuration, add the `loop.` prefix to each argument to `shushtar`
198-
262+
- if you use command line arguments for configuration, add the `loop.` prefix to each
263+
argument to `shushtar`
264+
199265
Before:
266+
200267
```
201268
$ loop --loopoutmaxparts=5 --debuglevel=debug ...
202269
```
270+
203271
After:
272+
204273
```
205274
$ shushtar --loop.loopoutmaxparts=5 --loop.debuglevel=debug ...
206275
```
207276

208277
For `faraday`:
209278

210-
- the standalone `faraday` daemon does not load configuration from a file, but you can now store the parameters into the `lnd.conf` file that `shushtar` uses. Just add the `faraday.` prefix to each of the configuration parameters.
279+
- the standalone `faraday` daemon does not load configuration from a file, but you can now
280+
store the parameters into the `lnd.conf` file that `shushtar` uses. Just add the
281+
`faraday.` prefix to each of the configuration parameters.
211282

212283
Before: (from command line)
284+
213285
```
214286
$ faraday --min_monitored=48h
215287
```
288+
216289
After: (in `lnd.conf`)
290+
217291
```
218292
[Faraday]
219293
faraday.min_monitored=48h
220294
```
221295

222-
- if you use command line arguments for configuration, add the `faraday.` prefix to each argument to `shushtar`
223-
296+
- if you use command line arguments for configuration, add the `faraday.` prefix to each
297+
argument to `shushtar`
298+
224299
Before:
300+
225301
```
226302
$ faraday --min_monitored=48h --debuglevel=debug ...
227303
```
304+
228305
After:
306+
229307
```
230308
$ shushtar --faraday.min_monitored=48h --faraday.debuglevel=debug...
231309
```
232310

233311
### Troubleshooting
234312

235-
If you have trouble running your node, please first check the logs for warnings or errors. If there are errors relating to one of the embedded servers, then you should open an issue in their respective GitHub repos ([lnd](https://github.com/lightningnetwork/lnd/issues), [loop](https://github.com/lightninglabs/loop/issues), [faraday](https://github.com/lightninglabs/faraday/issues). If the issue is related to the web app, then you should open an [issue](https://github.com/lightninglabs/shushtar/issues) here in this repo.
313+
If you have trouble running your node, please first check the logs for warnings or errors.
314+
If there are errors relating to one of the embedded servers, then you should open an issue
315+
in their respective GitHub repos ([lnd](https://github.com/lightningnetwork/lnd/issues),
316+
[loop](https://github.com/lightninglabs/loop/issues),
317+
[faraday](https://github.com/lightninglabs/faraday/issues). If the issue is related to the
318+
web app, then you should open an [issue](https://github.com/lightninglabs/shushtar/issues)
319+
here in this repo.
236320

237321
#### Server
238322

239-
Server-side logs are stored in the directory specified by `lnd.lnddir` in your configuration. Inside, there is a `logs` dir containing the log files in subdirectories. Be sure to set `lnd.debuglevel=debug` in your configuration to see the most verbose logging information.
323+
Server-side logs are stored in the directory specified by `lnd.lnddir` in your
324+
configuration. Inside, there is a `logs` dir containing the log files in subdirectories.
325+
Be sure to set `lnd.debuglevel=debug` in your configuration to see the most verbose
326+
logging information.
240327

241328
#### Browser
242329

243-
Client-side logs are disabled by default in production builds. Logging can be turned on by adding a couple keys to your browser's `localStorage`. Simply run these two JS statements in you browser's DevTools console then refresh the page:
330+
Client-side logs are disabled by default in production builds. Logging can be turned on by
331+
adding a couple keys to your browser's `localStorage`. Simply run these two JS statements
332+
in you browser's DevTools console then refresh the page:
244333

245334
```
246335
localStorage.setItem('debug', '*'); localStorage.setItem('debug-level', 'debug');
247336
```
248337

249-
The value for `debug` is a namespace filter which determines which portions of the app to display logs for. The namespaces currently used by the app are as follows:
338+
The value for `debug` is a namespace filter which determines which portions of the app to
339+
display logs for. The namespaces currently used by the app are as follows:
250340

251341
- `main`: logs general application messages
252342
- `action`: logs all actions that modify the internal application state
253343
- `grpc`: logs all GRPC API requests and responses
254344

255-
Example filters: `main,action` will only log main and action messages. `*,-action` will log everything except action messages.
345+
Example filters: `main,action` will only log main and action messages. `*,-action` will
346+
log everything except action messages.
256347

257-
The value for `debug-level` determines the verbosity of the logs. The value can be one of `debug`, `info`, `warn`, or `error`.
348+
The value for `debug-level` determines the verbosity of the logs. The value can be one of
349+
`debug`, `info`, `warn`, or `error`.

0 commit comments

Comments
 (0)