- Egress App Front-End
The Egress web application is an add-on solution that enables management of data egress requests from the Trusted Research Environment (TRE).
The front-end is a single page web application built with React.
Follow these instructions to deploy the Egress App Frontend.
Follow these instructions to operate the Egress App Frontend.
The source code for the egress app frontend contains all the JavaScript, HTML, and GraphQL code required to build and deploy the application.
Scripts and folders of importance:
The root of the application which provides the entry point for all the components and where top level imports are defined.
This file contains the code required to render the egress requests in the form of a table, while providing sort and search capabilities. On render, the script makes an API call to AWS AppSync to fetch the egress requests from the database. The script also interacts with another API to allow for download of egress request objects.
To render webpage components such as the table, buttons, and modals, the React library called Material Design for Boostrap is utilised.
Column headers of the egress request table are predefined here.
Note: To add/remove headers rendered on the page, you can modify this file
This file contains the code to render the top header bar on the page which contains the application title.
This folder contains all of the graphql scripts and components to interact with the AppSync API. The schema.graphql contains the schema definition of the API
The mutations.js and queries.js scripts contain the GraphQL code, which the webapp uses to fetch or modify data from the API.
Note: This requires installation of Amplify CLI - instructions
- Any changes to the GraphQL schema should be made inside egress_backend/graphql/schema.graphql in the backend.
- Remove any existing files inside src/graphql/schema.graphql in the frontend.
- Copy the schema.graphql from the backend to src/graphql/schema.graphql in the frontend.
- Run the command
amplify add codegen
in src/graphql to generate the updated models for the frontend client to use. - You should see updated queries.js and mutations.js files in the same location.
This project was bootstrapped with Create React App.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
To learn about code splitting, view this guidance
To learn about analysing the bundle size, view this guidance
To learn about making a progressive web app, view this guidance
To learn about advanced configurations, view this guidance
To learn about deployments, view this guidance
To troubleshoot issues when npm build fails to minify, view this guidance