{"id":19686174,"url":"https://github.com/nordicsemiconductor/asset-tracker-cloud-app-aws-js","last_synced_at":"2025-04-29T06:31:22.538Z","repository":{"id":37067617,"uuid":"449253965","full_name":"NordicSemiconductor/asset-tracker-cloud-app-aws-js","owner":"NordicSemiconductor","description":"The nRF Asset Tracker Web Application for AWS is a reference single-page application (SPA) developed using TypeScript.","archived":false,"fork":false,"pushed_at":"2024-04-13T14:43:57.000Z","size":85406,"stargazers_count":1,"open_issues_count":11,"forks_count":3,"subscribers_count":3,"default_branch":"saga","last_synced_at":"2024-04-13T21:55:50.519Z","etag":null,"topics":["aws","iot","nrf-asset-tracker","react","spa","vite","web-app"],"latest_commit_sha":null,"homepage":"https://github.com/NordicSemiconductor/asset-tracker-cloud-app-aws-js#readme","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NordicSemiconductor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-01-18T11:17:06.000Z","updated_at":"2024-05-08T09:01:26.935Z","dependencies_parsed_at":"2024-02-05T10:31:47.651Z","dependency_job_id":"3ed601c7-ae4a-40a4-9a8d-2a34a837240e","html_url":"https://github.com/NordicSemiconductor/asset-tracker-cloud-app-aws-js","commit_stats":null,"previous_names":[],"tags_count":595,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NordicSemiconductor%2Fasset-tracker-cloud-app-aws-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NordicSemiconductor%2Fasset-tracker-cloud-app-aws-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NordicSemiconductor%2Fasset-tracker-cloud-app-aws-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NordicSemiconductor%2Fasset-tracker-cloud-app-aws-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NordicSemiconductor","download_url":"https://codeload.github.com/NordicSemiconductor/asset-tracker-cloud-app-aws-js/tar.gz/refs/heads/saga","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251450656,"owners_count":21591407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","iot","nrf-asset-tracker","react","spa","vite","web-app"],"created_at":"2024-11-11T18:26:32.705Z","updated_at":"2025-04-29T06:31:19.776Z","avatar_url":"https://github.com/NordicSemiconductor.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!NOTE]  \n\u003e\n\u003e This repository has been archived, because [it is considered feature-complete](https://github.com/NordicSemiconductor/asset-tracker-cloud-docs/discussions/1068). ✔️ \n\n# nRF Asset Tracker Web Application for AWS\n\n[![GitHub Actions](https://github.com/NordicSemiconductor/asset-tracker-cloud-app-aws-js/workflows/Test%20and%20Release/badge.svg)](https://github.com/NordicSemiconductor/asset-tracker-cloud-app-aws-js/actions)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)\n[![@commitlint/config-conventional](https://img.shields.io/badge/%40commitlint-config--conventional-brightgreen)](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier/)\n[![ESLint: TypeScript](https://img.shields.io/badge/ESLint-TypeScript-blue.svg)](https://github.com/typescript-eslint/typescript-eslint)\n[![React](https://github.com/aleen42/badges/raw/master/src/react.svg)](https://reactjs.org/)\n[![Bootstrap 5](https://img.shields.io/badge/Bootstrap-5-ffffff?labelColor=7952b3)](https://getbootstrap.com/docs/5.0/)\n[![CSS modules](https://img.shields.io/badge/CSS-modules-yellow)](https://github.com/css-modules/css-modules)\n[![Vite](https://github.com/aleen42/badges/raw/master/src/vitejs.svg)](https://vitejs.dev/)\n\nThe nRF Asset Tracker Web Application for AWS is a reference single-page\napplication (SPA) developed with [React](https://reactjs.org/) in\n[TypeScript](https://www.typescriptlang.org/).\n\nThe UI components are themed using\n[Bootstrap 5](https://getbootstrap.com/docs/5.0/) and\n[CSS modules](https://github.com/css-modules/css-modules). All complex UI logic\nis extracted using [React hooks](https://reactjs.org/docs/hooks-custom.html) to\nallow re-use when changing the UI framework.\n\n[Vite](https://vitejs.dev/) is used as the frontend toolchain.\n\n\u003e :information_source:\n\u003e [Read the complete nRF Asset Tracker documentation](https://docs.nordicsemi.com/bundle/nrf-asset-tracker-saga/).\n\n## Set up\n\n    npm ci\n\n## Configuration\n\nIn the\n[nRF Asset Tracker for AWS](https://github.com/NordicSemiconductor/asset-tracker-cloud-aws-js)\nfolder, run `node cli web-app-config` and store the output in a local `.envrc`\nfile. Then run `direnv allow` to allow it.\n\n```bash\n# .envrc\nexport PUBLIC_CELL_GEO_LOCATION_CACHE_TABLE_NAME=...\nexport PUBLIC_CLOUDFRONT_DISTRIBUTION_ID=...\nexport PUBLIC_FOTA_BUCKET_NAME=...\nexport PUBLIC_GEOLOCATION_API_URL=...\nexport PUBLIC_HISTORICALDATA_TABLE_INFO=...\nexport PUBLIC_IDENTITY_POOL_ID=...\nexport PUBLIC_NETWORK_SURVEY_GEOLOCATION_API_URL=...\nexport PUBLIC_NETWORKSURVEY_STORAGE_TABLE_NAME=...\nexport PUBLIC_USER_IOT_POLICY_NAME=...\nexport PUBLIC_USER_POOL_ID=...\nexport PUBLIC_USER_POOL_CLIENT_ID=...\nexport PUBLIC_WEB_APP_BUCKET_NAME=...\nexport PUBLIC_WEB_APP_DOMAIN_NAME=...\nexport PUBLIC_SENTRY_DSN=...\nexport PUBLIC_REGION=...\nexport PUBLIC_MQTT_ENDPOINT=...\n```\n\n## Running\n\n    npm start\n\n## End-to-end tests using Playwright\n\nThe frontend provides [end-to-end tests](./e2e-tests) using\n[Playwright](https://playwright.dev/).\n\n### Configure AWS credentials\n\nThe end-to-end tests run against an instance of the\n[nRF Asset Tracker for AWS](https://github.com/NordicSemiconductor/asset-tracker-cloud-aws-js).\n\nEither, use the existing authentication from setting up the solution, or enable\nthe Web App CI feature and use the dedicated credentials created for this task.\nThe latter option is the recommended approach since it limits the permission\nscope to only the needed ones. They can also be used to\n[run the end-to-end tests on GitHub Actions](#running-end-to-end-tests-using-github-actions).\n\nAdd these environment variables to your `.envrc`. Then run `direnv allow` to\nallow it.\n\n```bash\n# .envrc\nexport AWS_REGION=...\nexport AWS_ACCESS_KEY_ID=...\nexport AWS_SECRET_ACCESS_KEY=...\nexport WEBAPP_STACK_NAME=...\n```\n\n### Running the tests\n\nYou can then run the tests using\n\n    npm run test:e2e\n\n### Running individual tests\n\n    npx playwright test authenticated/map/locationHistory/gnss.spec.ts\n\n### Playwright Inspector\n\nFor developing tests it is helpful to run the\n[Playwright Inspector](https://playwright.dev/docs/inspector).\n\nYou can enabled the inspector during the tests by running\n\n    PWDEBUG=1 npm run test:e2e\n\n### Running end-to-end tests using GitHub Actions\n\n[This workflow](./.github/workflows/test-and-release.yaml) runs the end-to-end\ntests for every commit. For this to work a running instance of\n[nRF Asset Tracker for AWS](https://github.com/NordicSemiconductor/asset-tracker-cloud-aws-js)\nis needed. The tests will be run against this instance. Typically it will be the\nproduction instance, to ensure that the web application works with the current\nproduction setup.\n\nIn order for the test runner to interact with the instance for retrieving the\napp configuration and for providing test data you need to configure AWS\ncredentials as\n[GitHub environment secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-an-environment).\n\nSet these secrets:\n\n- `AWS_REGION`\n- `AWS_ACCESS_KEY_ID`\n- `AWS_SECRET_ACCESS_KEY`\n- `WEBAPP_STACK_NAME`\n\nIf you have enabled the web application CI of the nRF Asset Tracker for AWS\n(`node cli configure context stack web-app-ci 1`) you can acquire them using the\nnRF Asset Tracker for AWS CLI:\n\n```bash\nnode cli web-app-ci -s\n```\n\nYou can set the secrets through the GitHub UI (make sure to create the\n`production`\n[environment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)\nin your repository first).\n\nAlternatively you can use the [GitHub CLI](https://cli.github.com/) using the\nenvironment settings from above:\n\n```bash\ngh secret set AWS_REGION --env production --body \"${AWS_REGION}\"\ngh secret set AWS_ACCESS_KEY_ID --env production --body \"${AWS_ACCESS_KEY_ID}\"\ngh secret set AWS_SECRET_ACCESS_KEY --env production --body \"${AWS_SECRET_ACCESS_KEY}\"\ngh secret set WEBAPP_STACK_NAME --env production --body \"${WEBAPP_STACK_NAME}\"\n```\n\n## Sentry\n\nOptionally, Sentry can be enabled for the web application. Export the\n`PUBLIC_SENTRY_DSN` environment variable.\n\nTo enable this in the continuous deployment pipeline of nRF Asset Tracker,\nconfigure the DSN using the CLI:\n\n```bash\n./cli.sh configure thirdParty sentry sentryDsn https://4f901247818d46099a3f15b6ada9390e@o4504255385174016.ingest.sentry.io/4504684789170176\n```\n\nWhen the next deployment is triggered, the DSN becomes available via\n\n```bash\n./cli.sh web-app-config\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnordicsemiconductor%2Fasset-tracker-cloud-app-aws-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnordicsemiconductor%2Fasset-tracker-cloud-app-aws-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnordicsemiconductor%2Fasset-tracker-cloud-app-aws-js/lists"}