Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 2.03 KB

File metadata and controls

56 lines (35 loc) · 2.03 KB

NBS Modernization Frontend

Running

  1. From the apps/modernization-ui directory, execute

    npm install
  2. Make sure the modernization-api is running, either via the gradle modernization-api:bootRun task, or via a container

  3. Then execute to start the application. Default url is http://localhost:3000

    npm run start

Auto Generating Endpoints

The UI code utilizes gql-typescript-generator and graphql-code-generator to auto generate GraphQL API requests.

Workflow:

  1. Update the API .graphqls schema files
  2. Run the following command in the modernization-ui folder while the API is running
    npm run generate
    
  3. Use the newly generated methods to make API calls from typescript

Storybook

Storybook is a UI framework that provides the ability to construct "stories" that allow us to view, interact, and test reusable React components like button, checkbox, table, as well as richer components like forms and menus. Currently we have implemented stories for all of our Design System components.

Run storybook locally to see what components are already available.

npm run storybook

The no lint option is to ensure there aren't any lint errors as of now. This could be an effort going forward.

Containerizing

The frontend application can be packaged as a Docker container by executing the following command from the apps/modernization-ui directory.

docker build .

Database Migrations

Liquibase is used in development to manage database migrations. They can be found in src/main/resources/db. Only sqlFile migrations should be created to ensure it is always an option to manually apply migrations instead of via automatic tooling.

In production, liquibase is not enabled by default. This is controlled by the liquibase.enabled property.