Skip to content

Retrieve real-time data from your long-range Nordic Semiconductor Development Kit within seconds

License

Notifications You must be signed in to change notification settings

hello-nrfcloud/web

Folders and files

NameName
Last commit message
Last commit date
Jan 21, 2025
Jan 30, 2024
Nov 16, 2023
Mar 3, 2025
Feb 18, 2025
Jan 21, 2025
Sep 24, 2024
Sep 30, 2024
Mar 3, 2025
Nov 29, 2024
Mar 3, 2025
Jul 2, 2024
Feb 3, 2023
Apr 3, 2024
Apr 3, 2024
Jan 6, 2025
Jul 1, 2024
Jun 15, 2023
Oct 16, 2023
Aug 7, 2024
Aug 10, 2023
Mar 30, 2025
Mar 30, 2025
Jun 27, 2024
Oct 8, 2024
Jun 3, 2024
Jul 14, 2024

hello.nrfcloud.com

GitHub Actions semantic-release Renovate @commitlint/config-conventional code style: prettier ESLint: TypeScript

Retrieve real-time data from your Nordic Semiconductor Development Kit within seconds.

Setup

Install the dependencies:

npm ci

Run

npm start

Running the tests

End-to-end tests are run completely without a backend using Vite's built-in dev server to serve the data.

Deploy an instance of the AWS Map resources and export the map settings as environment variables MAP_REGION, MAP_NAME, and MAP_API_KEY before running it.

Note: It's currently not possible to run test for multiple browsers in parallel since the webServer > cannot be defined per project, and there is a state in the backend mock server that gets manipulated by the tests. So by default only the chrome project is run

npm run test:e2e

Run the Playwright code generator

npx playwright codegen

Debug individual tests

PWDEBUG=1 npx playwright test e2e-tests/

Interact with the e2e backend

See ./e2e-tests/README.e2e-server.md

Deploy

npx cdk bootstrap
npx cdk deploy --all

Create map resources

Deploy https://github.com/hello-nrfcloud/aws-map and follow the instructions to acquire the necessary parameters to display the map.

Continuous Deployment with GitHub Actions

Create a GitHub environment production.

Store the registry endpoint as a GitHub Action variable:

gh variable set REGISTRY_ENDPOINT --env production --body "<registry endpoint>"
# If using a custom domain name
gh variable set DOMAIN_NAME --env production --body "<domain name>"

Store the role used for continuous deployment as a secret:

CD_ROLE_ARN=`aws cloudformation describe-stacks --stack-name ${STACK_NAME:-hello-nrfcloud-web} | jq -r '.Stacks[0].Outputs[] | select(.OutputKey == "gitHubCdRoleArn") | .OutputValue'`
gh secret set AWS_ROLE --env production --body "${CD_ROLE_ARN}"

Store the stack name and the region as a variable:

gh variable set STACK_NAME --env production --body "${STACK_NAME:-hello-nrfcloud-web}"
gh variable set AWS_REGION --env production --body "eu-west-1"

Continuous integration

Deploy an instance of the AWS Map resources to the CI AWS account and store the map settings as variables:

# Make sure that the `ci` environment exists in this repo
gh variable set MAP_REGION --env ci --body "<mapRegion>"
gh variable set MAP_NAME --env ci --body "<mapName>"
gh variable set MAP_API_KEY --env ci --body "<apiKey>"