0.0.1 • Published 4 years ago

cfpp v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Running the App

Prerequisites

Spin Up the Backend

  • From the project's root folder:
$ cd services
$ mvn clean install -Dmaven.test.skip=true
  • Navigate back to the project root folder and spin up all the backend services:
$ cd ..
$ ./run.sh sessionstore config-olb

Optional: If you have not pulled any backend changes, you can skip the compiling of backend code by running this instead:

$ ./run.sh --skipCompile sessionstore config-olb
  • Next, to run card services, execute the following:
$ ./runcards.sh

Shutting Down the Backend

  • From the project's root folder, run the following commands:
$ ./killcards.sh
$ docker-compose down

Running the UI

  • Navigate to the frontend directory

  • If you have pulled new UI code that has new dependencies, you will first need to remove all node_modules folders by running the following command:

$ lerna clean
  • Next, re-install all dependencies by running the following command to install all the UI dependencies for running the apps:
$ lerna bootstrap
  • Navigate to the Online Banking App folder and run the app. Note: It may take a minute to display the login screen if the backend services haven't finished spinning up. Check Kitematic to see if the containers have finished spinning up the backend services applicable
$ cd frontend/packages/apps/online-banking-app
$ yarn start
  • In a separate terminal window, navigate to the Digital Card App folder and run the app. Note: It may take a minute to display the login screen if the backend services haven't finished spinning up. Check Kitematic to see if the containers have finished spinning up the backend services applicable
$ cd frontend/packages/apps/digital-card-app
$ yarn start
  • You should have 2 apps running now, Epoxy (Online Banking App) at http://localhost:3000/ and Digital Card App at http://localhost:3001/. Before Digital Card App can pull data, you must be logged in to the Online Banking App. * Log in to the Online Banking App
  • Once logged in, you can Refresh the browser tab running Digital Card App and it should start pulling data for the user you logged in as in Online Banking App.
  • To get the Digital Card App to run inside of the Online Banking App, type the following URL in the browser tab where you are running the Online Banking App: http://localhost:3000/app/home/frame?src=http://localhost:3001

Unit Tests

The following commands should be run from the frontend directory:

Watch Mode

This will continue to watch files you make changes to and rerun tests related to those files as you develop. It is strongly recommended you utilize this command so you can see breakages before committing.

$ yarn run test packages/apps/digital-card-app --watch

Coverage

This command is a great way to see if you have gotten the coverage on your code that is needed. It uses Instanbul coverage method. If you are not familiar with Istanbul, learn more about it at https://istanbul.js.org/.

$ yarn run test packages/apps/digital-card-app --coverage

Running Storybook for Digital Card App

Storybook allows us to build components without the dependency of the app running. It also serves as a source of truth for the components, styles, etc. used in the app and demo's components abilities and their props. You do not need the Backend to run storybook, but you do need to install the frontend dependencies (see the lerna bootstrap step in the Running the UI section).

  • In a separate terminal window, navigate to the Digital Card App folder and run storybook. Note: Unlike when running the apps, storybook will not automatically open a browser tap with it running. You will have to manually enter the URL to pull up storybook in your browser. Typically, the URL provided is http://localhost:9009/. Check your terminal window for the URL to use once storybook has compiled.
$ cd frontend/packages/apps/digital-card-app
$ yarn run storybook