Merge branch 'dev' into feat/lam-1291/stress-testing

* dev: (85 commits)
  chore: console.log debug leftovers
  fix: third level navigation links
  fix: show subheader on refresh
  fix: machines/:id routing
  fix: customer route
  chore: update wallet nodes
  feat: shorten long addresses in funding page
  feat: shorten long addresses
  refactor: support copied text different from presented text
  chore: udpate react, downshift and routing
  refactor: use Wizard component on first route
  fix: autocomplete component rendering
  feat: skip2fa option on .env
  fix: drop contraint before dropping index
  chore: stop using alias imports
  fix: re-instate urlResolver
  chore: server code formatting
  chore: reformat code
  chore: adding eslint and prettier config
  chore: typo
  ...
This commit is contained in:
siiky 2025-05-20 11:57:32 +01:00
commit e10493abc6
1398 changed files with 60329 additions and 157527 deletions

View file

@ -2,7 +2,7 @@
## Preliminaries for Ubuntu 16.04
Installation for other distros may be slightly different. This assumes NodeJS 8.3 or higher and npm 5.6 are already installed. All of this is done in the lamassu-server directory.
Installation for other distros may be slightly different. This assumes NodeJS 22 or higher is already installed. All of this is done in the lamassu-server directory.
### Packages
@ -18,33 +18,18 @@ sudo -u postgres createdb lamassu
sudo -u postgres psql postgres
```
In ``psql``, run the following and set password to ``postgres123``:
In `psql`, run the following and set password to `postgres123`:
```
\password postgres
ctrl-d
```
## Preliminaries for MacOS
### Postgres
Use Postgres.app: https://postgresapp.com/
**psql** is automatically installed. You won't need to set up users.
### NodeJS
```
curl -L https://git.io/n-install | bash -s -- -y lts
. ~/.bash_profile
```
## Installation
### Install node modules
Make sure you're running NodeJS 8.3 or higher. Ignore any warnings.
Make sure you're running NodeJS 22 or higher. Ignore any warnings.
```
npm install
@ -53,25 +38,25 @@ npm install
### Generate certificates
```
bash tools/cert-gen.sh
bash packages/server/tools/cert-gen.sh
```
Notes:
- This will create a ``.lamassu`` directory in your home directory.
Notes:
- This will create a `.lamassu` directory in your home directory.
### Set up database
Important: lamassu-migrate currently gripes about a QueryResultError. Ignore this, it works anyway.
```
node bin/lamassu-migrate
node packages/server/bin/lamassu-migrate
```
### Run new-lamassu-admin
```
cd new-lamassu-admin/
npm install
cd packages/admin-ui/
npm run start
```
@ -80,7 +65,7 @@ npm run start
In a second terminal window:
```
node bin/lamassu-admin-server --dev
node packages/server/bin/lamassu-admin-server --dev
```
### Register admin user
@ -88,7 +73,7 @@ node bin/lamassu-admin-server --dev
In a third terminal window:
```
node bin/lamassu-register admin@example.com superuser
node packages/server/bin/lamassu-register admin@example.com superuser
```
You'll use this generated URL in the brower in a moment.
@ -104,39 +89,38 @@ Go to all the required, unconfigured red fields and choose some values. Choose m
### Run lamassu-server
```
node bin/lamassu-server --mockScoring
node packages/server/bin/lamassu-server --mockScoring
```
### Add a lamassu-machine
Click on ``+ Add Machine`` in the sidebar. Type in a name for your machine and click **Pair**. Open up development tools to show the JavaScript console and copy the totem. You will use this to run lamassu-machine. This pairing totem expires after an hour.
Click on `+ Add Machine` in the sidebar. Type in a name for your machine and click **Pair**. Open up development tools to show the JavaScript console and copy the totem. You will use this to run lamassu-machine. This pairing totem expires after an hour.
Now continue with lamassu-machine instructions from the ``INSTALL.md`` file in [lamassu-machine repository](https://github.com/lamassu/lamassu-machine).
Now continue with lamassu-machine instructions from the `INSTALL.md` file in [lamassu-machine repository](https://github.com/lamassu/lamassu-machine).
### Run a local coin node (BTC supported)
Run `node bin/lamassu-coins` in the project root and select `Bitcoin`. This process will require the existence of certain environment variables that the setup will warn about.
Run `node packages/server/bin/lamassu-coins` in the project root and select `Bitcoin`. This process will require the existence of certain environment variables that the setup will warn about.
Once that is done, the node needs to be run in a terminal with the following command `<YOUR_BLOCKCHAIN_DIR_ENV_VAR>/bin/bitcoind -datadir=<YOUR_BLOCKCHAIN_DIR_ENV_VAR>/bitcoin`
## Subsequent runs
To start the Lamassu server run:
```
node bin/lamassu-server --mockScoring
node packages/server/bin/lamassu-server --mockScoring
```
To start the Lamassu Admin run:
```
node bin/lamassu-admin-server --dev
node packages/server/bin/lamassu-admin-server --dev
```
and
```
cd new-lamassu-admin/
cd packages/admin-ui/
npm run start
```