Skip to content

app: rename client app to Lightning Terminal (LiT) #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ VOLUME /root/.lnd
EXPOSE 8443 10009 9735

# Copy the binaries and entrypoint from the builder image.
COPY --from=builder /go/bin/lightning-terminal /bin/
COPY --from=builder /go/bin/litd /bin/
COPY --from=builder /go/bin/lncli /bin/
COPY --from=builder /go/bin/frcli /bin/
COPY --from=builder /go/bin/loop /bin/
Expand All @@ -55,4 +55,4 @@ RUN apk add --no-cache \
ca-certificates

# Specify the start command and entrypoint as the lightning-terminal daemon.
ENTRYPOINT ["lightning-terminal"]
ENTRYPOINT ["litd"]
100 changes: 50 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Shushtar
# Lightning Terminal (LiT)

![CI](https://github.com./lightninglabs/shushtar/workflows/CI/badge.svg)
![CI](https://github.com./lightninglabs/lightning-terminal/workflows/CI/badge.svg)

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

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 Terminal (LiT) 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.
Expand All @@ -24,61 +24,61 @@ You can configure the UI to classify channels according to your node's operating

## Architecture

Shushtar is packaged as a single binary which contains the
LiT 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.
only need to download one executable and run one command to get LiT up and running. We
include the CLI binaries `lncli`, `loop` and `frcli` for convenience in the downloadable
archives as well.

## Installation

There are two options for installing Shushtar: download the published binaries for your
There are two options for installing LiT: download the published binaries for your
platform, or compile from source code.

#### Download Binaries

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.
LiT binaries for many platforms are made available on the GitHub
[Releases](https://github.com./lightninglabs/lightning-terminal/releases) page in this
repo. There you can download the latest version and extract the archive into a directory
on your computer.

#### Compile from Source Code

To compile from source code, you'll need to have some prerequisite developer tooling
installed on your machine.

- **Go**: Shushtar's backend web server is written in Go. Instructions for installing Go
for your operating system can be found on the
- **Go**: LiT'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.
- **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.
- **NodeJS**: LiT'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.
- **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.

Once you have the necessary prerequisites, Shushtar can be compiled by running the
following commands:
Once you have the necessary prerequisites, LiT can be compiled by running the following
commands:

```
git clone https://github.com./lightninglabs/shushtar.git
cd shushtar
git clone https://github.com./lightninglabs/lightning-terminal.git
cd lightning-terminal
make && make install
```

This will produce the `shushtar` executable and add it to your `GOPATH`.
This will produce the `litd` executable and add it to your `GOPATH`.

## Configuration

Shushtar only has a few configuration parameters itself.
LiT only has a few configuration parameters itself.

#### Required

Expand All @@ -94,18 +94,18 @@ provided by [LetsEncrypt](https://letsencrypt.org/). This is recommended if you
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
to verify that you own the domain name. LiT 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. You can permit the
On some linux-based platforms, you may need to run LiT with superuser privileges since
port 80 is a system port. You can permit the
[`CAP_NET_BIND_SERVICE`](https://www.man7.org/linux/man-pages/man7/capabilities.7.html)
capability using `setcap 'CAP_NET_BIND_SERVICE=+eip' /path/to/shushtar` to allow binding
on port 80 without needing to run the daemon as root.
capability using `setcap 'CAP_NET_BIND_SERVICE=+eip' /path/to/litd` to allow binding on
port 80 without needing to run the daemon as root.

> 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
> Note: LiT only serves content over **HTTPS**. If you do not use `letsencrypt`, LiT 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.

```
Expand All @@ -121,19 +121,19 @@ Application Options:
certificate (default: /Users/jamal/Library/Application Support/Lnd/letsencrypt)
```

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.`
In addition to the LiT 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.

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

```
$ ./shushtar \
$ ./litd \
--httpslisten=0.0.0.0:443 \
--uipassword=My$trongP@ssword \
--letsencrypt \
Expand Down Expand Up @@ -208,7 +208,7 @@ The default location for the `lnd.conf` file will depend on your operating syste
### Upgrade Existing Nodes

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.
them to the LiT single executable while keeping all of your past data.

For `lnd`:

Expand All @@ -230,7 +230,7 @@ For `lnd`:
```

- if you use command line arguments for configuration, add the `lnd.` prefix to each
argument to `shushtar`
argument to `litd`

Before:

Expand All @@ -241,13 +241,13 @@ For `lnd`:
After:

```
$ shushtar lnd.lnddir=~/.lnd --lnd.alias=merchant ...
$ litd lnd.lnddir=~/.lnd --lnd.alias=merchant ...
```

For `loop`:

- 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
`lnd.conf` file that `litd` uses, and add the `loop.` prefix to each of the
configuration parameters.

Before: (in `loop.conf`)
Expand All @@ -265,7 +265,7 @@ For `loop`:
```

- if you use command line arguments for configuration, add the `loop.` prefix to each
argument to `shushtar`
argument to `litd`

Before:

Expand All @@ -276,14 +276,14 @@ For `loop`:
After:

```
$ shushtar --loop.loopoutmaxparts=5 --loop.debuglevel=debug ...
$ litd --loop.loopoutmaxparts=5 --loop.debuglevel=debug ...
```

For `faraday`:

- 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.
store the parameters into the `lnd.conf` file that `litd` uses. Just add the `faraday.`
prefix to each of the configuration parameters.

Before: (from command line)

Expand All @@ -299,7 +299,7 @@ For `faraday`:
```

- if you use command line arguments for configuration, add the `faraday.` prefix to each
argument to `shushtar`
argument to `litd`

Before:

Expand All @@ -310,7 +310,7 @@ For `faraday`:
After:

```
$ shushtar --faraday.min_monitored=48h --faraday.debuglevel=debug...
$ litd --faraday.min_monitored=48h --faraday.debuglevel=debug...
```

### Troubleshooting
Expand All @@ -320,8 +320,8 @@ If there are errors relating to one of the embedded servers, then you should ope
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.
web app, then you should open an
[issue](https://github.com./lightninglabs/lightning-terminal/issues) here in this repo.

#### Server

Expand Down
6 changes: 3 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "shushtar",
"name": "lightning-terminal",
"version": "0.0.1",
"description": "Dashboard for LND and Loop",
"repository": "https://github.com./lightninglabs/shushtar",
"description": "Lightning Terminal",
"repository": "https://github.com./lightninglabs/lightning-terminal",
"private": true,
"scripts": {
"start": "BROWSER=none react-scripts start",
Expand Down
2 changes: 1 addition & 1 deletion app/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
crossorigin="anonymous"
/>
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>Lightning Dashboard</title>
<title>Lightning Terminal</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
3 changes: 2 additions & 1 deletion app/src/__tests__/App.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ describe('App Component', () => {
// ensure init is called in the store so the UI is displayed
Object.defineProperty(config, 'IS_TEST', { get: () => false });
const { findByText } = renderApp();
expect(await findByText('Shushtar')).toBeInTheDocument();
expect(await findByText('Lightning')).toBeInTheDocument();
expect(await findByText('Terminal')).toBeInTheDocument();
expect(await findByText('logo.svg')).toBeInTheDocument();
// revert IS_DEV
Object.defineProperty(config, 'IS_TEST', { get: () => true });
Expand Down
3 changes: 2 additions & 1 deletion app/src/__tests__/Routes.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ describe('Routes Component', () => {

it('should display the Auth page by default', async () => {
const { findByText, store } = await render();
expect(await findByText('Shushtar')).toBeInTheDocument();
expect(await findByText('Lightning')).toBeInTheDocument();
expect(await findByText('Terminal')).toBeInTheDocument();
expect(store.router.location.pathname).toBe('/');
});

Expand Down
9 changes: 6 additions & 3 deletions app/src/__tests__/components/auth/AuthPage.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ describe('AuthPage ', () => {

it('should display the title', () => {
const { getByText } = render();
expect(getByText('Shushtar')).toBeInTheDocument();
expect(getByText('Lightning')).toBeInTheDocument();
expect(getByText('Terminal')).toBeInTheDocument();
});

it('should display the password field', () => {
Expand All @@ -36,9 +37,11 @@ describe('AuthPage ', () => {

it('should display nothing when the store is not initialized', () => {
const { getByText, queryByText } = render();
expect(getByText('Shushtar')).toBeInTheDocument();
expect(getByText('Lightning')).toBeInTheDocument();
expect(getByText('Terminal')).toBeInTheDocument();
store.initialized = false;
expect(queryByText('Shushtar')).not.toBeInTheDocument();
expect(queryByText('Lightning')).not.toBeInTheDocument();
expect(queryByText('Terminal')).not.toBeInTheDocument();
});

it('should display an error when submitting an empty password', async () => {
Expand Down
2 changes: 1 addition & 1 deletion app/src/__tests__/components/loop/LoopPage.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('LoopPage component', () => {

it('should display the page title', () => {
const { getByText } = render();
expect(getByText('Lightning Loop')).toBeInTheDocument();
expect(getByText('Lightning Terminal')).toBeInTheDocument();
});

it('should display the network badge', () => {
Expand Down
3 changes: 2 additions & 1 deletion app/src/components/auth/AuthPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ const AuthPage: React.FC = () => {
<Background gradient>
<Wrapper>
<Logo />
<Title>{l('title')}</Title>
<Title>{l('lightning')}</Title>
<Title>{l('terminal')}</Title>
<Subtitle>{l('subtitle')}</Subtitle>
<Form onSubmit={handleSubmit}>
<Input
Expand Down
5 changes: 3 additions & 2 deletions app/src/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"enums.BalanceMode.receive": "Receiving",
"enums.BalanceMode.send": "Sending",
"enums.BalanceMode.routing": "Routing",
"cmps.auth.AuthPage.title": "Shushtar",
"cmps.auth.AuthPage.lightning": "Lightning",
"cmps.auth.AuthPage.terminal": "Terminal",
"cmps.auth.AuthPage.subtitle": "Efficiently manage Lightning node liquidity",
"cmps.auth.AuthPage.passLabel": "Enter your password in the field above",
"cmps.auth.AuthPage.submitBtn": "Submit",
Expand Down Expand Up @@ -33,7 +34,7 @@
"cmps.loop.SelectedChannels.useAnyChannel": "Automatic channel selection",
"cmps.loop.LoopActions.loopMinimumNote": "Minimum Loop amount is {{min}}",
"cmps.loop.LoopActions.loopInNote": "Currently, multiple channel Loop In is supported only with a single peer.",
"cmps.loop.LoopPage.pageTitle": "Lightning Loop",
"cmps.loop.LoopPage.pageTitle": "Lightning Terminal",
"cmps.loop.LoopHistory.emptyMsg": "After performing swaps, you will see ongoing loops and history here.",
"cmps.loop.LoopTiles.history": "Loop History",
"cmps.loop.LoopTiles.inbound": "Total Inbound Liquidity",
Expand Down