{"id":19504823,"url":"https://github.com/nice-digital/next-web","last_synced_at":"2026-05-14T17:42:14.007Z","repository":{"id":41870755,"uuid":"377419481","full_name":"nice-digital/next-web","owner":"nice-digital","description":"Website front-end for www.nice.org.uk using NextJS","archived":false,"fork":false,"pushed_at":"2024-04-10T16:04:44.000Z","size":4455,"stargazers_count":0,"open_issues_count":14,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-11T01:12:49.018Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nice-digital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-06-16T08:07:29.000Z","updated_at":"2024-04-15T17:35:32.428Z","dependencies_parsed_at":"2023-02-16T20:01:32.002Z","dependency_job_id":"661a928f-1289-4b1b-b5d8-38d3f33c40f1","html_url":"https://github.com/nice-digital/next-web","commit_stats":null,"previous_names":[],"tags_count":174,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fnext-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fnext-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fnext-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fnext-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nice-digital","download_url":"https://codeload.github.com/nice-digital/next-web/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240754366,"owners_count":19852189,"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":[],"created_at":"2024-11-10T22:27:19.957Z","updated_at":"2026-05-14T17:42:14.001Z","avatar_url":"https://github.com/nice-digital.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Next Web](#next-web)\n  - [Project structure](#project-structure)\n  - [Stack](#stack)\n    - [Linting](#linting)\n    - [Tests](#tests)\n  - [JotForms Integration](#jotforms-integration)\n  - [Setting up Ocelot for Storyblok](#setting-up-ocelot-for-storyblok)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n# Next Web\n\n\u003e Website front-end for www.nice.org.uk using NextJS\n\n## Project structure\n\nThe repository is set up as a monorepo. That is, there are various sub folders providing different parts of the project e.g. the web app and functional tests:\n\n| Folder            | Purpose                                |\n| ----------------- | -------------------------------------- |\n| [web](web#readme) | NextJS web app                         |\n| [aws](aws#readme) | AWS ECS hosting for the NextJS web app |\n| [api](api#readme) | Ocelot Api Cache                       |\n\n## Stack\n\nThe common components of the stack are:\n\n- [VS Code IDE](https://code.visualstudio.com/)\n  - With recommended extensions (VS Code will prompt you to install these automatically)\n- [TypeScript](https://www.typescriptlang.org/) for static type checking\n- [Prettier](https://prettier.io/) for code formatting\n- [ESLint](https://eslint.org/) for JavaScript/TypeScript linting\n- [stylelint](https://stylelint.io/) for SCSS linting\n- [Jest](https://jestjs.io/) for JS unit testing\n  - With [React Testing Library](https://testing-library.com/docs/react-testing-library/intro)\n\nThere are also more specific stacks detailed in the readme for each sub folder.\n\n### Linting\n\nWe use [Prettier](https://prettier.io/) for code formatting, [ESLint](https://eslint.org/) for JavaScript/TypeScript linting and [stylelint](https://stylelint.io/) for SCSS linting. All 3 are installed as dev dependencies and configured at the root level of this monorepo.\n\nVSCode is also configured with the necessary extensions (via [extensions.json](.vscode/extensions.json)) and settings (via [settings.json](.vscode/settings.json)) to do in-IDE linting and formatting. There's no further setup needed beyond installing the recommended extensions when you open the project. Just save source files and they'll be reformatted automatically.\n\nUsing VSCode should work for in-IDE linting but if it doesn't you can run the lint commands manually. Run `npm run lint` in the root to run Prettier, ESLint, stylelint and TS type checking against all source files. This includes source files for the NextJS web app, Jest tests and WDIO functional tests.\n\nIf you prefer using an IDE to command line, open the VSCode command palette (`Ctrl` + `Shift` + `P`) and choose _Tasks: Run Task_ then _Lint all the things_.\n\nAlternatively, run individual commands like `npm run prettier`, `npm run lint:ts`, `npm run lint:scss` or `npm run ts:check` for more granular control, although you shouldn't normally need to do this - IDE support and the single `npm run lint` command are usually enough.\n\n### Tests\n\nWe use [Jest](https://jestjs.io/) for JS unit testing with [React Testing Library](https://testing-library.com/docs/react-testing-library/intro) for testing React components.\n\n[vscode-jest](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest) is added as recommended extension (via [extensions.json](.vscode/extensions.json)). This gives you the ability in-IDE to run and debug tests.\n\nUse the command line instead if you need more granular control:\n\n1. Run `npm test` to run the Jest tests (note: this doesn't run the WDIO functional tests)\n   1. Or, run `npm run test:watch` to run the tests and watch for changes to files, to re-run the tests\n   2. Or, run `npm run test:coverage` to run the tests and output a _coverage_ folder with an lcov report.\n\n\u003e Running tests in watch mode via `npm run test:watch` is most useful when developing locally.\n\n## JotForms Integration\n\nWe use an enterprise edition of JotForms, [https://nice.jotform.com/myforms/](https://nice.jotform.com/myforms/) to host forms on the NICE Website through Storyblok.\n\nFor further information, please see [docs/jotforms-integration.md](docs/jotforms-integration.md).\n\n## Setting up Ocelot for Storyblok\n\nOcelot has been added as an alternative to Storybloks own inbuilt caching. To set up Ocelot for Storyblok locally the following steps need to be taken:\n\n1.  Ensure Redis is installed and running. Check that the redis endpoint URL is correct in the Ocelot section of appsettings.Development.json or appsettings.Production.json\n2.  There are two endpoints for clearing the Ocelot Cache, for which postman is used to access, these can be obtained from a developer or tester.\n3.  Amend the appsettings.Development.json or appsettings.Production.json so that the Ocelot.ClientSecret matches the client_secret in the Get Token postman request.\n4.  In the ocelot.development.json and/or ocelot.production.js in GlobalConfiguration add a BaseUrl key and the value is the local ocelot endpoint\n\n```\n\"GlobalConfiguration\": {\n   \"BaseUrl\": \"http://localhost:45127\"\n}\n```\n\n5. Open next-web/api/NICE.NextWeb.API.sln in Visual Studio and Run. You should be presented with a web page that says 'Not found'.\n6. Ensure that in the Storyblok's .env file STORYBLOK_OCELOT_ENDPOINT correctly matches your local Ocelot endpoint URL and has a suffix of /storyblok. i.e. `STORYBLOK_OCELOT_ENDPOINT=http://localhost:45127/storyblok`\n7. Run Storyblok, it should now use Ocelot for it's caching.\n\n## TRAC Integration\n\nWe have integrated Trac job boards with Nextweb using Storyblok. The integration allows the web content team to embed and render Trac jobs directly on the website.\n\n### Trac Component in Storyblok\n\nA Trac Embed component is available in the Storyblok space. This component is used to render a specific Trac job board on a page.\n\n### Component Fields\n\nJob Board ID\n\n1.  Required field.\n2.  This value populates the data-JobsBoardID attribute in the Trac embed script within the Nextweb TracEmbed component.\n    Example: 10000 can be used initially to test the integration with sample vacancies.\n\n### Environment Variables Setup\n\nVersion\n\n1. This is the current version of the JavaScript file referenced in the script URL. At the moment, it is v18.\n2. If the version changes in the future, you must update the value in local.yml, TeamCity, and Octopus.\n\nIntegrity Key\n\n1. The integrity key ensures the security and integrity of the Trac JavaScript file.\n2. This value remains the same across all Trac embed scripts that reference the same version of the Trac script.\n3. Whenever the Trac script version is updated, the integrity key must also be updated in local.yml, TeamCity, and Octopus.\n\nUpdate your local.yml\n\nAdd the following configuration to your local.yml to ensure the Trac jobs page renders correctly:\n\n```yaml\npublic:\n# ... more config here\ntrac:\n  version: v18\n  integrityKey: \u003cVALUE\u003e Replace it with correct value\n# ... more config here\n```\n\n### Script\n\nWe currently use the following script to render Trac job boards:\n\n`\u003cscript src=\"https://feeds.trac.jobs/js/v18/EmbeddedJobsBoard.js\" integrity=\"\u003cINTEGRITY_KEY\u003e\"\u003e\u003c/script\u003e`\n\nNotes:\n\n- If the integrity key changes, the version in the script URL may need to be updated.\n- The data-JobsBoardID attribute is dynamically populated from the Storyblok Trac component.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fnext-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnice-digital%2Fnext-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fnext-web/lists"}