Skip to content

DiamondLightSource/scaup-frontend

Repository files navigation

Code CI Apache License

Scaup (frontend)

Configuration

Configuration is done through environment variables:

  • NEXTAUTH_URL: NextAuth instance URL. Usually the application's path, followed by /nextauth
  • NEXTAUTH_SECRET: Random string used for generating the encrypted NextAuth JWT. Do not use the secret in .example.env in production
  • OAUTH_CLIENT_ID: OIDC client ID
  • OAUTH_CLIENT_SECRET: OIDC client secret
  • OAUTH_COOKIE_NAME: Authentication token cookie name
  • OAUTH_DISCOVERY_ENDPOINT: OIDC discovery endpoint
  • OAUTH_PROFILE_INFO_ENDPOINT: Microauth's profile endpoint. May be removed in the future if our auth solution provides profile info as well.
  • SERVER_API_URL: Scaup API URL from the server perspective. Note that relative paths such as /api cannot be used, since the user has no concept of relative paths. Paths must be absolute. This can be modified at runtime/deploy time.
  • CONTACT_EMAIL: Email for application support (like international shipments)
  • NEXT_PUBLIC_API_URL: SCAUP API URL
  • NEXT_PUBLIC_DEV_CONTACT: Developer contact email
  • NEXT_PUBLIC_APP_VERSION: App version
  • PATO_URL: URL of the PATo instance you want to target for redirects
  • SYNCHWEB_URL: URL of the SynchWeb instance you want to target for redirects

Building

Building the distribution files:

yarn install
yarn build

Testing

Unit Tests

  • Run yarn test

End-to-End Tests

  • Create two environment variables, PLAYWRIGHT_USERNAME and PLAYWRIGHT_PASSWORD containing the username and password you use to authenticate to Scaup.
  • Deploy the backend and frontend. Keep in mind that since these are full E2E tests, Expeye/Microauth must also be available.
  • Run yarn e2e

Development

To run Next in development mode, run yarn dev. If you don't have certificates set up, or if you're using self-signed certificates, Node might throw up errors and block connections. To avoid that, run NODE_TLS_REJECT_UNAUTHORIZED=0 yarn dev

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •  

Languages