Draft
Conversation
7c77114 to
ad4c34c
Compare
70c2905 to
b6d0385
Compare
There was a problem hiding this comment.
Pull request overview
Ports the Admail proof-of-concept into this NHS Notify repo template, introducing the core application stack (frontend, backend API, and a Bedrock-backed Lambda) plus local dev orchestration and supporting tooling/config updates.
Changes:
- Added a React frontend (Cognito login, upload + assessment UI, costing tool, history view) and an Express backend for S3 history/download endpoints.
- Added the
bedrock-prompt-messagerLambda (Bedrock Converse + S3 logging), plus local-server emulator and unit tests. - Updated repo/template configuration (workspaces, linting, Sonar, docs/readme, Docker Compose, Terraform component wiring), and added Playwright test scaffolding.
Reviewed changes
Copilot reviewed 112 out of 152 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/playwright/tsconfig.json | TS config for Playwright workspace |
| tests/playwright/playwright.config.ts | Playwright runner + webServer config |
| tests/playwright/package.json | Playwright workspace manifest/scripts |
| tests/playwright/login.spec.ts | Basic login page test |
| tests/playwright/.gitignore | Ignore Playwright artifacts |
| tests/.gitignore | Ignore Playwright reports under tests |
| src/jekyll-devcontainer/src/.devcontainer/Dockerfile | Devcontainer image label update |
| scripts/tests/lint.sh | Lint helper script |
| scripts/tests/integration.sh | Playwright install / integration script stub |
| scripts/githooks/check-file-format.sh | EditorConfig formatting hook changes |
| scripts/githooks/check-english-usage.sh | Vale hook: NUL-delimited file handling |
| scripts/config/vale/styles/config/vocabularies/words/accept.txt | Vale vocab update (Admail) |
| scripts/config/sonar-scanner.properties | Sonar sources/tests path updates |
| README.md | Repo renamed + badges/links updated |
| project.code-workspace | Workspace naming update |
| package.json | Root workspaces updated; deps/overrides tweaks |
| Makefile | Added dev docker-compose target |
| lambdas/example-lambda/tsconfig.json | Removed example lambda scaffolding |
| lambdas/example-lambda/src/index.ts | Removed example lambda handler |
| lambdas/example-lambda/src/tests/index.test.ts | Removed example lambda tests |
| lambdas/example-lambda/package.json | Removed example lambda package |
| lambdas/example-lambda/jest.config.ts | Removed example lambda Jest config |
| lambdas/example-lambda/.gitignore | Removed example lambda ignores |
| lambdas/example-lambda/.eslintignore | Removed example lambda eslintignore |
| lambdas/bedrock-prompt-messager/tsconfig.json | TS config for new Bedrock lambda |
| lambdas/bedrock-prompt-messager/src/types.d.ts | Types for .txt prompt imports |
| lambdas/bedrock-prompt-messager/src/system_prompt.txt | System prompt (base) |
| lambdas/bedrock-prompt-messager/src/system_prompt_extended.txt | System prompt (extended advice) |
| lambdas/bedrock-prompt-messager/src/local-server.ts | Local API Gateway emulator |
| lambdas/bedrock-prompt-messager/src/index.ts | Lambda handler (request validation + service call) |
| lambdas/bedrock-prompt-messager/src/constants.ts | Shared constants/CORS/errors/rating |
| lambdas/bedrock-prompt-messager/src/config.ts | Env-based Bedrock config loader |
| lambdas/bedrock-prompt-messager/src/bedrock-service.ts | Bedrock + guardrails + S3 logging implementation |
| lambdas/bedrock-prompt-messager/src/tests/index.test.ts | Handler unit tests |
| lambdas/bedrock-prompt-messager/src/mocks/text-file.ts | Jest mock for .txt imports |
| lambdas/bedrock-prompt-messager/README.md | Lambda README placeholder |
| lambdas/bedrock-prompt-messager/package.json | Lambda deps + build/test scripts |
| lambdas/bedrock-prompt-messager/jest.config.ts | Jest config (txt mapper, modulePaths) |
| lambdas/bedrock-prompt-messager/docker/Dockerfile | Runtime Lambda Dockerfile |
| lambdas/bedrock-prompt-messager/docker/dev.Dockerfile | Dev container for lambda local server |
| lambdas/bedrock-prompt-messager/docker/dev-entrypoint.sh | Watch build + node --watch runner |
| lambdas/bedrock-prompt-messager/build.sh | esbuild bundle updates (es2022 + txt loader) |
| lambdas/bedrock-prompt-messager/.gitignore | Lambda gitignore |
| lambdas/bedrock-prompt-messager/.dockerignore | Lambda dockerignore |
| input-docs/NHS Synthetic Business Letters/NHS Synthetic Data Blood Test 2.docx | Added synthetic input document |
| infrastructure/terraform/README | Removed template Terraform readme |
| infrastructure/terraform/components/admail/README.md | Added component README heading |
| infrastructure/terraform/components/admail/module_lambda_bedrock_messager.tf | Points lambda module at new dist dir |
| infrastructure/terraform/components/admail/locals.tf | Removed unused prompt filename local |
| infrastructure/terraform/components/admail/apprunner_service_frontend.tf | AppRunner image tag renamed to frontend |
| infrastructure/terraform/components/admail/apprunner_service_backend.tf | AppRunner image tag renamed to backend |
| eslint.config.mjs | ESLint config updates + frontend-specific overrides |
| docs/user-guides/Perform_static_analysis.md | Sonar org/project keys updated |
| docs/index.md | Docs badge link updated |
| docs/_config.yml | Docs description + GitHub repo link updated |
| docker-compose.yaml | Local dev stack (frontend/backend/lambda) |
| containers/frontend/tsconfig.json | Frontend TS config (allowJs) |
| containers/frontend/src/setupTests.js | CRA-style Jest setup |
| containers/frontend/src/reportWebVitals.js | CRA vitals helper |
| containers/frontend/src/Pages/History.js | History page (S3 results browsing) |
| containers/frontend/src/Pages/FileUploadPage.js | Upload page orchestrator |
| containers/frontend/src/index.js | CRA entrypoint + AuthProvider |
| containers/frontend/src/index.css | Base styles |
| containers/frontend/src/components/Shared.css | Shared button styling |
| containers/frontend/src/components/Login.js | Cognito login form |
| containers/frontend/src/components/Login.css | Login styling |
| containers/frontend/src/components/Header.js | Header/nav + logout |
| containers/frontend/src/components/Header.css | Header styling |
| containers/frontend/src/components/FileUpload.js | File input + DataURL extraction |
| containers/frontend/src/components/FileUpload.css | File upload styling |
| containers/frontend/src/components/Costingtool.js | Cost calculator component |
| containers/frontend/src/components/Costingtool.css | Cost tool styling |
| containers/frontend/src/components/AuthContext.js | Cognito auth context + token storage |
| containers/frontend/src/components/AIfeedback.js | Renders assessment results + markdown |
| containers/frontend/src/components/AIfeedback.css | Feedback styling |
| containers/frontend/src/App.js | Router + auth gating |
| containers/frontend/src/App.css | Layout styles |
| containers/frontend/src/api/BackendAPIClient.js | Axios client + token refresh queue |
| containers/frontend/src/tests/components/Costingtool.test.js | Frontend unit tests for costing tool |
| containers/frontend/README.md | Frontend README placeholder |
| containers/frontend/public/robots.txt | CRA robots file |
| containers/frontend/public/nhs-england-white.svg | NHS logo asset |
| containers/frontend/public/manifest.json | CRA manifest |
| containers/frontend/public/index.html | CRA HTML shell + env-config include |
| containers/frontend/public/favicon.ico | Favicon asset |
| containers/frontend/public/env-config.js | Runtime env injection stub |
| containers/frontend/package.json | Frontend deps/scripts (CRA) |
| containers/frontend/nginx.conf | Nginx SPA config + caching |
| containers/frontend/entrypoint.sh | Runtime env-config generation |
| containers/frontend/docker/Dockerfile | Multi-stage build + Nginx runner |
| containers/frontend/docker/dev.Dockerfile | Dev image for CRA server |
| containers/frontend/docker/dev-entrypoint.sh | Dev server startup script |
| containers/frontend/build.sh | Frontend build helper |
| containers/frontend/.gitignore | Frontend gitignore |
| containers/frontend/.dockerignore | Frontend dockerignore |
| containers/example-app/tsconfig.json | Removed example container scaffold |
| containers/example-app/src/server.ts | Removed example server |
| containers/example-app/src/tests/server.test.ts | Removed example server tests |
| containers/example-app/package.json | Removed example container package |
| containers/backend/tsconfig.json | Backend TS config (baseUrl/paths) |
| containers/backend/src/server.ts | Express server + CORS + auth middleware |
| containers/backend/src/s3-service.ts | S3 pagination + getObject parsing |
| containers/backend/src/s3-router.ts | /s3/history and /s3/download routes |
| containers/backend/src/constants.ts | Backend constants |
| containers/backend/src/auth.ts | Cognito JWT validation + middleware/404 |
| containers/backend/src/auth-error.ts | AuthError type |
| containers/backend/src/tests/s3-service.test.ts | S3 service unit tests |
| containers/backend/README.md | Backend README placeholder |
| containers/backend/package.json | Backend deps/scripts |
| containers/backend/jest.config.ts | Backend Jest config updates |
| containers/backend/docker/Dockerfile | Backend runtime container |
| containers/backend/docker/dev.Dockerfile | Backend dev container |
| containers/backend/docker/dev-entrypoint.sh | Backend watch + node --watch runner |
| containers/backend/build.sh | Backend build helper |
| containers/backend/.gitignore | Backend gitignore |
| containers/backend/.dockerignore | Backend dockerignore |
| AGENTS.md | Agent guidance updated for containers + lambdas |
| .github/dependabot.yaml | Dependabot config adjusted |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Tim Ireland <tim.ireland@hscic.gov.uk>
Signed-off-by: Tim Ireland <tim.ireland@hscic.gov.uk>
Signed-off-by: Tim Ireland <tim.ireland@hscic.gov.uk>
- to supress expecteded failure logs which are actually expected in tests
d2adaf9 to
d0cd3df
Compare
d0cd3df to
42cdeb2
Compare
fbc50a3 to
83f9fc7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Porting of the Proof of Concept Components into this templated NHS repo
Context
For alignment from the Proof of Concept to other Notify services
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.