Graphical User Interface allowing users to manage their funds on the Peerplays blockchain.
- React
- Electron (wrapping into desktop app)
- Redux (single source of truth state management)
- Redux dev tools (allow user to debug )
- React-Router (we use this to control navigation)
- React-Router-Redux (sync React-Router with Redux so we can handle navigation with Redux)
- ESlint (to ensure code style consistency)
- Commitlint (to ensure commit message adhere to Conventional Commits)
- SCSS (CSS preprocessor)
Peerplays-UI depends on Node.js. While it should work using versions as old as 0.12.x, it is recommended to use v8.9.x
On Ubuntu and OSX, the easiest way to install Node is to use the Node Version Manager. For Windows users there is NVM-Windows.
To install NVM for Linux/OSX, simply copy paste the following in a terminal:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
nvm install v8
nvm use v8
Once you have Node installed, you can clone the repo:
git clone https://github.com/peerplays-network/peerplays-core-gui
cd peerplays-core-gui
Initialize the application by running npm run init
. Doing so will install commitizen globally on your environment so you can later commit via git cz
.
Before running this script, ensure you have at least one environments settings configured within
./config/enpoints.js
. By default, Alice endpoint is configured and the start script will point to it. To point to another endpoint configuration, add it to theendpoints.js
file and select it with the start script like so:TARGET=notAlice npm run start
npm run start
Once the compilation is done the GUI will be available in your browser at: localhost:8082. Hot Reloading is enabled so the browser will live update as you edit the source files.
If you have run the init script, you can commit via
git cz
.
If you have not run the init script, you must commit vianpm run commit
.
If you do neither, commit message consistency will be difficult for you.
This repository uses a combination of tools to aid in consistent commit messages. The reason we do this is so we can have dynamic changelog creation and smart semantic versioning based on commits (with the ability to override).
The following tools are used:
- commitizen
Used for prompting recommended entries within a commit message to ensure it contains the necessary information.- conventional changelog
- Prompts for conventional changelog standard.
- conventional changelog
- husky
By using the hooks from this package we intercept commits being made and verify them with commitlint.- Prevent bad commits/pushes.
- commitlint
- cli
- config-conventional
- rule preset in use
This repository uses a standard version to aid in version control and release management.
When using standard version to cut a release, there is automated changelog modifitions made based on commit messages.
// If you typically use npm version to cut a new release, do this instead:
npm run release
// To cut a pre-release:
npm run pre-release // v0.2.1 to v0.2.2-rc.0
If you'd like to host your own wallet somewhere, you should create a production build and host it using NGINX or Apache. In order to create a prod bundle, simply run the following command:
npm run build
This will create a bundle in the /dist folder that can be hosted with the web server of your choice.
Building the executables for a particular operating system should be performed from that particular operating system (e.g. build the Windows executable on Windows; build the MacOS exectuable on MacOS; build the Linux executable on Linux)
The requirements assume that certain tools are already available on the system. These include Node.js and Node Package Manager (NPM) and certain build tools for your operating system including Python 2.7+.
Node.js, NPM, and python may be obtained from your operating system's typical package manager such as "apt" for Ubuntu.
.NET Framework 4.5.1 is required and is already installed on Windows 10.
Node.js and NPM may be downloaded from https://nodejs.org/en/download. You must use Node v.6.7.0 or earlier else errors will occur when downloading the dependencies of the "web" sub-directory.
The remaining build tools for Windows (see https://www.npmjs.com/package/windows-build-tools) may be obtained with the following steps:
Open a new cmd as Administrator (Run as Administrator) and run
npm install --global --production windows-build-tools
npm config set msvs_version 2015 --global
git clone https://github.com/peerplays-network/peerplays-core-gui.git
cd peerplays-core-gui
Before building the GUI you will need to install the various dependencies that are unique for each subdirectory "module":
npm install
cd ../electron; npm install
cd build/; npm install
The exectuable will appear within the "releases" folder within the "electron" folder for windows users. Linux based systems will have the releases in the root of the project after running the below script(s).
npm run dist
If building on a mac the following command are required in order to produce the linux build
brew install dpkg fakeroot
npm run dist-linux