-
From the
apps/modernization-uidirectory, executenpm install
-
Make sure the
modernization-apiis running, either via the gradlemodernization-api:bootRuntask, or via a container -
Then execute to start the application. Default url is http://localhost:3000
npm run start
The UI code utilizes gql-typescript-generator and graphql-code-generator to auto generate GraphQL API requests.
Workflow:
- Update the API
.graphqlsschema files - Run the following command in the
modernization-uifolder while the API is runningnpm run generate - Use the newly generated methods to make API calls from typescript
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 storybookThe no lint option is to ensure there aren't any lint errors as of now. This could be an effort going forward.
The frontend application can be packaged as a Docker container by executing the following command from the apps/modernization-ui directory.
docker build .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.