The frontend is built in React. The code can be found in the
When running Crossfeed locally, the frontend is served from the container
crossfeed_frontend_1. We use the following technologies
on the frontend:
- AWS Cognito
- AWS Amplify
- Elastic Search UI
- Material UI
src folder contains all the React components.
Some React components contain tests, which are located in the
To configure properties on the frontend (such as Cognito user pool settings), you can modify
all environment variables beginning with
REACT_APP_, which are accessbile to the frontend.
If you are running Crossfeed locally, you can just modify these variables in
.env in the root
directory. If you need to configure the frontend for deployment, you should update the
Here is a list of all environment variables:
||URL for REST API||
||Fargate log group (used for linking to the logs of ScanTasks)||
||Set to use cognito, unset to use login.gov||
||Cognito user pool ID||
||Cognito user pool client ID||
||Cookie domain (stores JWT, used to access Matomo)||
||TOTP issuer (shows up as the default name of the credential in a 2FA app)||
We use the AWS Amplify library to make REST API calls.
When a user signs in, we store the JWT for that user in the
token variable in localStorage. This JWT is
passed to all REST API endpoint calls. We do not support refresh tokens at the moment.
We use the @elastic/react-search-ui library to power our Search UI.
Most of the integration with this library can be found in the