etherisc / flightdelay-ui

https://flightdelay.app
Apache License 2.0
0 stars 0 forks source link

Flightdelay UI Web Application

Webapp

Configuration

The webapp is configured via environment variables. The following variables are available:

Contract generation

The webapp uses Typechain to generate smart contract bindings. The generated files are stored in the src/contracts directory (which is not commited to git, to ensure the latest artifacts are used). The generation is done automatically after running npm install.

Currently not all smart contracts are compiled automatically, due to the huge number of classes this would generate. Which contracts are compiled is defined in the package.json file in tasks typechainOpenzeppelinTypes, typechainGif and typechainFlight.

Start

npm run dev

Important: This project requires a fontawesome pro license. Please set your auth token in the FONTAWESOME_NPM_AUTH_TOKEN environment variable.

Trigger oracle via curl

curl -X POST http://localhost:3000/api/oracle -H "Content-Type: application/json" -d {} -w " %{http_code}\n"

Test

npm run test
(or)
npm run testLoop

Containzerized runtime

Via container created by executing

docker build -t flightdelay-ui-webapp .

Important: This project requires a fontawesome pro license. Please set your auth token in the FONTAWESOME_NPM_AUTH_TOKEN environment variable.

Branching Strategy

This repository uses Gitflow as branching strategy. The main branches are:

Feature branches are created from develop and merged back into develop via pull requests (or git merge). Hotfix branches are created from main and merged back into develop and main via pull requests (or git merge).

Git commands

Create a new release from develop

Assumption: the current branch is develop and the branch is up-to-date and contains the latest changes.

git switch main
git pull
git merge develop

Now the main branch contains the latest changes from develop and the production system can be updated from the main branch.

Create a hotfix branch for production

Assumption: a hotfix is required for the production system.

git switch main
git pull
git switch -c hotfix/<branch name>
# implement the hotfix on that branch 

Merge a hotfix into main and develop

Assumption: the hotfix branch is up-to-date and contains the latest changes.

git switch main
git pull
git merge hotfix/<branch name>
git switch develop
git pull
git merge hotfix/<branch name>

Now the hotfix is merged into main and develop and the hotfix branch can be deleted. Production can be updated from the main branch and the development can continue on the develop branch.