Using a Framework to Create Your STRATO Application

Although developing a dApp from scratch allows for maximum flexibility, many platform users may find it helpful to start with a basic framework. BlockApps has developed a tool to instantiate a basic STRATO dApp, based on common application patterns that have been requested by enterprise users. To access this tool, you will need to clone the STRATO dApp respository from Github:

git clone https://github.com/blockapps/strato-dapp.git
This utility performs the following steps:

  • Sets up the OAuth configuration
  • Initializes a backend skeleton
  • Initializes a frontend REACT-based UI
  • Sets up Docker packaging

Dependencies

In addition to the STRATO dependencies, the following tools should already be installed

  • Node
  • Yarn

Usage

To use this utility, run the following command:

node <path-to-index.js>/index.js create <project-name>

This command prompts the user for OAuth details, creates a directory with the project's name (<project-name>) and initializes the STRATO dApp. After a project has been initialized, please look at the project README for instructions on how to execute the project.

Assumptions

This utility makes the following assumptions:

  • STRATO is executing on localhost on port 8080
  • The application will execute on port 80 on localhost
  • STRATO is being executed with OAUTH_ENABLED and user has OAuth details for the relevant identity server

It is possible to setup the application for a different environment by modifying the config file that is generated under project-name-server/config directory.