Please see CONTRIBUTING_GUIDE.md for more information.
Basier Circle
and Gilroy
used in the production version are commercial fonts. This repository only contains open fonts and uses Open Sans
as a replacement for the commercial ones.
If you have licensed copies of Basier Circle
and Gilroy
, you can add them to fonts folder. If you don't have the fonts, you need to remove lines 25 - 81 of type.css. After that, the build
and dev
npm scripts run without any errors.
git clone https://github.com/LiskHQ/lisk-desktop.git
cd lisk-desktop
npm install
npm run dev
For ease of development, you can set the following query string to see network options in login page:
http://localhost:8080/#/?showNetwork=true
If you are actively developing in a specific route, and want to be automatically signed in every time you reload the page, please add the following input pairs to your localStorage:
loginKey: a valid passphrase
Add the above pair using the storage tab in your dev tools or via JavaScript command:
localStorage.setItem('loginKey', 'wagon stock borrow episode laundry kitten salute link globe zero feed marble') // desired account passphrase
When developing with hardware wallet, this will sign you in using the first account on the first connected hardware wallet:
localStorage.setItem('hwWalletAutoLogin', true);
You can use the same approach to define a desired network to which Lisk Desktop connects:
localStorage.setItem('liskCoreUrl', 'http://localhost:4000') // desired node to log in into
To build the project simply run
npm run build
Under the hood, this script runs
npm run build-prod
to build the React app under src/
and
npm run build-electron
to build the electron app under app/
using webpack. You can run the above scripts individually if you're looking to see the changes solely on one of the two said applications.
If you have already built the application as described above, you can launch Electron using
npm run start
To launch a version which supports hardware wallets, you can run
npm run dev-hardware-wallet
or to launch electron and receive live updates from already running webpack-dev-server
on port 8080
and you can run
LISK_HUB_URL="http://localhost:8080" DEBUG=true npm run start
This comes with Redux dev tools.
Build package for Windows (on Windows in Git BASH).
npm run pack:win
Build package for macOS (on macOs)
npm run pack
Build package for Linux (on Linux).
npm run pack
npm run test
npm run test-live
In order to run e2e tests you need to install lisk-core
Setup a lisk test node as described in Preparing Node headline under the tests section of Lisk Framework README.
Run lisk test node with pm2 on localhost:4000
Start the development version of Lisk:
npm run dev
Apply blockchain snapshot
./test/e2e-test-setup.sh ~/git/lisk/
(replace ~/git/lisk/
with your path to lisk core)
Run e2e tests
npm run cypress:run
To launch storybook sandbox with components run
npm run storybook
and navigate to
βββ __mocks__/ # Modules used to mock dependencies for testing purpose.
βββ .storybook/ # React storybooks reside here.
βββ app/ # Electron based application that launces the react app.
βββ build/ # Build specific materials.
βββ config/ # Automation scripts (Webpack configurations, i18n scanner, etc)
βββ coverage/ # Results of Jest test coverage.
βββ dist/ # Platform specific built outputs.
βββ docs/ # Project documentations such as contribution guides and development guidelines.
βββ i18n/ # Localization files inluding setup scripts and translation json files.
βββ libs/ # Modules which can be consumed individually in other projects.
βββ node_modules/ # 3rd-party libraries and utilities.
βββ src/ # Application source code.
β βββ actions/ # Store actions reside here and are broken into script files dedicated to each system entity.
β βββ app/ # The bootstrap React application
β βββ assets/ # Static files (images, fonts, etc)
β βββ components/ # React presentational components are located here.
β β βββ screens/ # These are the component that represent screens with dedicated URL.
β β βββ shared/ # These are the React components used at least in 2 other components (calendar, liskAmount, etc)
β β βββ toolbox/ # Basic elements with basic styles and functionality which are used in numerous places (button, input, etc)
β βββ constants/ # Names, addresses, static configurations and other values used throughout the application
β βββ context/ # React context configuration files
β βββ hooks/ # React custom hooks
β βββ store/ # Redux store resides here.
β β βββ middlewares/ # All the Redux middlewares are places here and have their dedicated script files based on the system entities.
β β βββ reducers/ # Redux reducers are located here. similar to actions and reducers, they are placed in script files named after the entity they represent.
β βββ utils/ # Utility functions
βββtest/ # E2E tests written with Cypress.io and Cucumber; also some helpers used by unit test that live in /src
See contributors section.
Copyright Β© 2016-2018 Lisk Foundation
This program is free software: you can redistribute it and/or modify it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.