Running / Building the Application ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Scripts for running, testing, and building the application are provided as part of the standard configuration. These are run using YARN and listed in the scripts section of the package.json file. Backend services ================ The UI requires two backend base URLs during normal operation: - `REACT_APP_BACKEND_URL_OST` for OST APIs that expose ODA entities such as SBDs, SBIs, and EBs. - `REACT_APP_BACKEND_URL_OET` for OET APIs that handle execution, procedure status, and operator actions. Both URLs must be available when running the application without mocked data. Runtime environment variables ============================= Typical local configuration is: - `REACT_APP_USE_LOCAL_DATA`: Uses mocked UI data instead of live backend APIs when set to `true`. - `REACT_APP_BACKEND_URL_OET`: Base URL for OET execution endpoints. - `REACT_APP_BACKEND_URL_OST`: Base URL for OST entity lookup endpoints. - `REACT_APP_SUBARRAY_COUNT`: Number of subarrays made available in the UI. - `REACT_APP_MSENTRA_CLIENT_ID`: MS Entra client ID for the frontend application. - `REACT_APP_MSENTRA_API_ID`: MS Entra application ID used for OET API scopes. - `REACT_APP_MSENTRA_API_ID_OST`: MS Entra application ID used for OST API scopes. - `REACT_APP_MSENTRA_TENANT_ID`: MS Entra tenant ID for authentication. - `REACT_APP_MSENTRA_REDIRECT_URI_PATH`: Redirect URI used by the frontend after authentication events. From the project directory, you can run any of the following: - `> yarn dev` Runs the app in the development mode at [http://localhost:8090](http://localhost:8090). The app will recompile and restart if you make any edits to the source files. Any linting errors will also be shown in the console. - `> yarn skao:update` yarn will update the repository with the latest SKAO libraries - `> yarn start` Same as `yarn dev` but for some implementations it is prefixed with NODE_ENV=testing. This is used in the CI/CD Processes - `> yarn cypress` Launches Cypress which has been set up to provide component testing. For further information on the use of Cypress, see https://docs.cypress.io/guides/component-testing/overview - `> yarn test` Launches the test runner in the interactive watch mode. See the [testing](#testing) section for more information. - `> yarn build` Builds the app for production to the `build` folder. The build is minified and any JSX is transpiled to JavaScript. Your app is ready to be deployed! - `> yarn audit` Checks the dependencies to see if there are any vulnerabilities.