Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b6c172a
Version update to 0.0.8
ShahanaFarooqui Jun 5, 2025
639b3cf
Set env var `GENERATE_SOURCEMAP` to false for avoiding sourcemap warn…
ShahanaFarooqui Jun 5, 2025
e48aab8
Update git action upload artifact to version 4
ShahanaFarooqui Jun 5, 2025
bc945bf
Account Event timestamp should be set to the latest event timestamp
ShahanaFarooqui Jun 5, 2025
ca99c77
Add space in bkpr tooltip
ShahanaFarooqui Jun 5, 2025
d41c978
Build with misc fixes
ShahanaFarooqui Jun 5, 2025
36adcc1
Update bkpr date format from `YYYY-MM-DD` to `DD MMM, YYYY`
ShahanaFarooqui Jun 5, 2025
96dfe0d
Update Date Format in Tests
ShahanaFarooqui Jun 5, 2025
4c9307b
Build with updated date format
ShahanaFarooqui Jun 5, 2025
534c0de
Remove suffix from Node Aliases
ShahanaFarooqui Jun 5, 2025
457c752
Build after removing alias suffix
ShahanaFarooqui Jun 5, 2025
4e2fabc
Lint fixes after un-setting `no-unused-vars`
ShahanaFarooqui Jun 9, 2025
c2942bc
Misc Changes
ShahanaFarooqui Jun 9, 2025
cad6aea
Lazy load Transactions lists for faster UI rendering
ShahanaFarooqui Jun 5, 2025
0f42099
Infinite Scroll for CLN Transactions
ShahanaFarooqui Jun 9, 2025
f4729aa
Infinite Scroll for CLN Offers
ShahanaFarooqui Jun 9, 2025
0a02fa3
Infinite Scroll for BTC Transactions
ShahanaFarooqui Jun 9, 2025
86ec389
Build after infinite scroll
ShahanaFarooqui Jun 10, 2025
0e0d2db
Remove loader when node has zero bitcoin transactions
ShahanaFarooqui Jun 12, 2025
f66fd05
Fix graph screen widths
ShahanaFarooqui Jun 13, 2025
91ab194
Remove pre-compiled folders (build, dist) from Git tracking
ShahanaFarooqui Jun 17, 2025
45aa5ab
Update .gitignore to exclude build/dist folders
ShahanaFarooqui Jun 17, 2025
b8059d2
Remove artifact from Github action for Release
ShahanaFarooqui Jun 17, 2025
1dac7cf
Update documentation to build project before start
ShahanaFarooqui Jun 17, 2025
1b59da0
Configure Commando Websocket with WSS Proxy & cert
ShahanaFarooqui Jun 18, 2025
9f38bd7
Show WS Protocol on Connect Wallet
ShahanaFarooqui Jun 18, 2025
2c33efa
Update Connect Wallet Tests
ShahanaFarooqui Jun 18, 2025
1a65749
Add environment variable documentation
ShahanaFarooqui Jun 18, 2025
2c9525d
Environment Variables Overhaul Documentation
ShahanaFarooqui Jul 9, 2025
6889a10
Code cleanup
ShahanaFarooqui Jul 9, 2025
6d7255d
Update Backend to read new Env variables
ShahanaFarooqui Jul 9, 2025
36a8416
Breakup Connect Wallet for cleaner code
ShahanaFarooqui Jul 9, 2025
3700120
Zoom in/zoom out QR Code
ShahanaFarooqui Jul 9, 2025
9e0c999
Store update with connect URL
ShahanaFarooqui Jul 9, 2025
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
30 changes: 1 addition & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,11 @@
name: Build artifact and package
name: Build and Release Pakage

on:
release:
types: [released]
workflow_dispatch:

jobs:
artifact:
runs-on: ubuntu-22.04
steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Cache build frontend
uses: actions/cache@v3
id: cache-build-frontend
with:
path: apps/frontend
key: ${{ runner.os }}-frontend-${{ github.sha }}

- name: Cache build backend
uses: actions/cache@v3
id: cache-build-backend
with:
path: apps/backend
key: ${{ runner.os }}-backend-${{ github.sha }}

- name: Compress files
run: tar -czf /tmp/clnapp.tar.gz apps/frontend/build apps/backend/dist package.json package-lock.json

- uses: actions/upload-artifact@v3
with:
name: clnapp-build$VERSION
path: /tmp/clnapp.tar.gz

build:
name: Build image
runs-on: ubuntu-22.04
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ application-cln.log
.commando
release
env-local.sh
apps/frontend/build
apps/backend/dist
74 changes: 47 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,46 +39,66 @@
tar -xzf v0.0.1.tar.gz
```

- ### Dependency Installation
- ### Dependency Installation and Compile

```
cd cln-application-0.0.1
npm install --force --omit=dev
npm install
npm run build
npm prune --omit=dev
```

- ### Environment Variables
This application accepts & depends upon these variables to be passed through environment:

```
- SINGLE_SIGN_ON: Flag to bypass application level authentication (valid values: true/false, default: false)
- LOCAL_HOST: Device url for connect url links (optional; for connect wallet screen)
- DEVICE_DOMAIN_NAME: Device name/IP for lnmessage connect url feature (optional; for connect wallet screen)
- BITCOIN_NODE_IP: IP address of bitcoin node container (required)
- BITCOIN_NETWORK: Bitcoin network type (optional; for entrypoint.sh; valid values: bitcoin/signet/testnet/regtest)
- APP_CONFIG_DIR: Path for cln-application's configuration file (required; config.json)
- APP_MODE: Mode for logging and other settings (valid values: production/development/testing, default: production)
- APP_CONNECT: Choose how to connect to CLN (valid values: COMMANDO/REST/GRPC, default: COMMANDO)
- APP_PROTOCOL: Protocol on which the application will be served (valid values: http/https, default: http)
- APP_IP: IP address of this application (cln-application) container (required)
- APP_PORT: Port on which this application should be served (required)
- LIGHTNING_IP: IP address of Core lightning node container (required)
- LIGHTNING_PATH: Path for core lightning (optional; required for entrypoint.sh)
- HIDDEN_SERVICE_URL: REST hidden service url (optional; for connect wallet screen; Used for Tor Domain also)
- COMMANDO_CONFIG: Full Path including file name for commando auth with PUBKEY & RUNE (required)
- LIGHTNING_WEBSOCKET_PORT: Core lightning's websocket port (required; from cln's config.json; starting with `bind-addr=ws:`)
- LIGHTNING_REST_PROTOCOL: Protocol on which REST is served (valid values: http/https, default: https)
- LIGHTNING_REST_PORT: REST server port (required if APP_CONNECT is REST)
- LIGHTNING_CERTS_DIR: Path for core lightning certificates (Required if APP_CONNECT is REST/GRPC with PROTOCOL 'https')
- LIGHTNING_GRPC_PROTOCOL: Core lightning's GRPC protocol (valid values: http/https, default: http)
- LIGHTNING_GRPC_PORT: Core lightning's GRPC port (Required if APP_CONNECT is GRPC)
- BITCOIN_HOST: Hostname/IP address of bitcoin node container (configurable to run lightningd with `--bitcoin-rpcconnect`, default: `localhost`)
- BITCOIN_NETWORK: Bitcoin network type (for entrypoint.sh and lightningd with `--network`; valid values: bitcoin/signet/testnet/regtest; default: `bitcoin`)

- APP_SINGLE_SIGN_ON: Flag to bypass application level authentication (valid values: true/false, default: false)
- APP_PROTOCOL: Protocol on which the application will be served (valid values: http/https, default: `http`)
- APP_HOST: Hostname/IP address of cln-application's container (default: `localhost`)
- APP_PORT: Port on which this application should be served (default: `2103`)

- APP_CONFIG_FILE: Path for cln-application's configuration file (default: `./config.json`)
- APP_LOG_FILE: Path for cln-application's log file (default: `./application-cln.log`)
- APP_MODE: Mode for logging and other settings (valid values: production/development/testing, default: `production`)
- APP_CONNECT: Choose how to connect to CLN (valid values: COMMANDO/REST/GRPC, default: `COMMANDO`)

- LIGHTNING_DATA_DIR: Path for core lightning (used by entrypoint.sh, default: ``)
- LIGHTNING_HOST: IP address of Core lightning node container (used for `COMMANDO` APP_CONNECT, default: `localhost`)
- LIGHTNING_TOR_HOST: REST hidden service url (default: ``)

- LIGHTNING_VARS_FILE: Full Path including the file name for connection auth with LIGHTNING_PUBKEY & LIGHTNING_RUNE (defult: `./.commando-env`)
- LIGHTNING_WS_PROTOCOL: Core lightning's web socket is serving on ws or serving via WSSProxy (valid values: ws/wss, default: `ws`)
- LIGHTNING_WS_PORT: Core lightning's websocket port (used by `COMMANDO` APP_CONNECT; with `bind-addr=ws:`/`wss-bind-addr` in CLN config; default: `5001`)
- LIGHTNING_WS_CLIENT_KEY_FILE: Client key file path including file name for websocket TLS authentication (used by `COMMANDO` APP_CONNECT and `wss` LIGHTNING_WS_PROTOCOL; default: `./client-key.pem`)
- LIGHTNING_WS_CLIENT_CERT_FILE: Client certificate file path including file name for websocket TLS authentication (used by `COMMANDO` APP_CONNECT and `wss` LIGHTNING_WS_PROTOCOL; default: `./client.pem`)
- LIGHTNING_WS_CA_CERT_FILE: CA certificate file path including file name for websocket TLS authentication (default: `./ca.pem`)

- LIGHTNING_REST_PROTOCOL: Protocol on which REST is served (valid values: http/https, default: `https`)
- LIGHTNING_REST_HOST: IP address/hostname of Core Lightning REST interface (used if APP_CONNECT is `REST`, default: `localhost`)
- LIGHTNING_REST_TOR_HOST: Tor hidden service URL for Core Lightning REST interface (default: ``)
- LIGHTNING_REST_PORT: REST server port (used if APP_CONNECT is `REST`; default: `3010`)
- LIGHTNING_REST_CLIENT_KEY_FILE: Client key file path including file name for REST TLS authentication (default: `./client-key.pem`)
- LIGHTNING_REST_CLIENT_CERT_FILE: Client certificate file path including file name for REST TLS authentication (default: `./client.pem`)
- LIGHTNING_REST_CA_CERT_FILE: CA certificate file path including file name for REST TLS authentication (used by `REST` APP_CONNECT and `https` LIGHTNING_REST_PROTOCOL; default: `./ca.pem`)

- LIGHTNING_GRPC_HOST: IP address/hostname of Core Lightning GRPC interface (used if APP_CONNECT is `GRPC`, default: `localhost`)
- LIGHTNING_GRPC_TOR_HOST: Tor hidden service URL for Core Lightning GRPC interface (default: ``)
- LIGHTNING_GRPC_PORT: Core lightning's GRPC port (used if APP_CONNECT is `GRPC`; default: `9736`)
- LIGHTNING_GRPC_PROTO_PATH: URL to directory containing CLN gRPC protocol definitions (default: `https://github.com/ElementsProject/lightning/tree/master/cln-grpc/proto`)
- LIGHTNING_GRPC_CLIENT_KEY_FILE: Client key file path including file name for GRPC TLS authentication (used by `GRPC` APP_CONNECT; default: `./client-key.pem`)
- LIGHTNING_GRPC_CLIENT_CERT_FILE: Client certificate file path including file name for GRPC TLS authentication (used by `GRPC` APP_CONNECT; default: `./client.pem`)
- LIGHTNING_GRPC_CA_CERT_FILE: CA certificate file path including file name for GRPC TLS authentication (used by `GRPC` APP_CONNECT; default: `./ca.pem`)
```

Set these variables either via terminal OR by env.sh script OR by explicitly loading variables from .env files.
Important Note: Environment variables take precedence over config.json variables. Like `SINGLE_SIGN_ON` will take higher precedence over
Important Note: Environment variables take precedence over config.json variables. Like `APP_SINGLE_SIGN_ON` will take higher precedence over
`singleSignOn` from config.json.

- ### Application Configuration
This is the config.json file which is required by application's frontend. If the file named `config.json` is missing at `APP_CONFIG_DIR` location, one like below will be auto created:
This is the default `config.json` file which is required by application's frontend. If the file `APP_CONFIG_FILE` is missing at the location, one like below will be auto created:

```
{
Expand All @@ -94,8 +114,8 @@

- ### Commando Authentication
- This application utilizes [lnmessage](https://github.com/aaronbarnardsound/lnmessage) and [commando](https://docs.corelightning.org/reference/lightning-commando) for connecting with core lightning node. The connection is trustless and end-to-end encrypted. Commando manages authentication and authorization through runes, which can grant either full or fine-grained permissions.
- The backend server reads `LIGHTNING_PUBKEY` & `LIGHTNING_RUNE` from the `COMMANDO_CONFIG` file for this communication.
- Values can either be set manually or script `entrypoint.sh` can be used to call `getinfo` and `createrune` methods and save values in `COMMANDO_CONFIG`.
- The backend server reads `LIGHTNING_PUBKEY` & `LIGHTNING_RUNE` from the `LIGHTNING_VARS_FILE` file for this communication.
- Values can either be set manually or script `entrypoint.sh` can be used to call `getinfo` and `createrune` methods and save values in `LIGHTNING_VARS_FILE`.
- `entrypoint.sh` can only run for the locally installed lightning. If `cln-application` is running remotely then pubkey and
rune can be set manually.
- Sample commando config should look like:
Expand Down
118 changes: 0 additions & 118 deletions apps/backend/dist/controllers/auth.js

This file was deleted.

42 changes: 0 additions & 42 deletions apps/backend/dist/controllers/lightning.js

This file was deleted.

Loading