- This is a clone of Substrate Front End Template
- Released under The Unlicense
- Provides exploring a DID URI, Create a DID, Resolves a DID within TrackBack, Update a DID and Revoke a DID
- Please develop further and use in production environment.
- Please use git tag 0.0.4 with TrackBack Node version 0.0.7
The codebase is installed using git and yarn. This tutorial assumes you have installed yarn globally prior to installing it within the subdirectories. For the most recent version and how to install yarn, please refer to yarn documentation and installation guides.
# Clone the repository
git clone https://github.com/substrate-developer-hub/did-book.git
cd did-book
yarn install
You can start the template in development mode to connect to a locally running node
yarn start
You can also build the app in production mode,
yarn build
and open build/index.html
in your favorite browser.
The template's configuration is stored in the src/config
directory, with
common.json
being loaded first, then the environment-specific json file,
and finally environment variables, with precedence.
development.json
affects the development environmenttest.json
affects the test environment, triggered inyarn test
command.production.json
affects the production environment, triggered inyarn build
command.
Some environment variables are read and integrated in the template config
object,
including:
REACT_APP_PROVIDER_SOCKET
overridingconfig[PROVIDER_SOCKET]
REACT_APP_DEVELOPMENT_KEYRING
overridingconfig[DEVELOPMENT_KEYRING]
More on React environment variables.
When writing and deploying your own front end, you should configure:
- Custom types as JSON in
src/config/types.json
. See Extending types. PROVIDER_SOCKET
insrc/config/production.json
pointing to your own deployed node.DEVELOPMENT_KEYRING
insrc/config/common.json
be set tofalse
. See Keyring.
There are two ways to specify it:
- With
PROVIDER_SOCKET
in{common, development, production}.json
. - With
rpc=<ws or wss connection>
query paramter after the URL. This overrides the above setting.