Skip to content

Commit 57646af

Browse files
committed
adding co-pilot insstructions
Signed-off-by: Tim Ireland <[email protected]>
1 parent 77a693b commit 57646af

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

.github/copilot-instructions.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Copilot Instructions for NHS Notify Supplier API
2+
3+
## Project Overview
4+
5+
- This repository provides the NHS Notify Supplier API for print suppliers to integrate with NHS Notify message queueing.
6+
- Major components: OpenAPI specification (`specification/api/notify-supplier.yml`), SDKs (`sdk/`), server implementations (`server/`, `src/server/host`), and Lambda handlers (`lambdas/`).
7+
- Data flows: API requests are modeled via OAS, processed by server/Lambda code, and may interact with AWS services (e.g., S3, database).
8+
9+
## Developer Workflows
10+
11+
- **Build SDKs and Docs:**
12+
- Run `make clean && make build` to generate Python/TypeScript SDKs and HTML docs from the OAS spec.
13+
- Serve docs locally with `make serve` [default](http://localhost:3050).
14+
- **CI/CD:**
15+
- PRs trigger CI via GitHub Actions (`.github/workflows/cicd-1-pull-request.yaml`).
16+
- Merging to `main` creates a pre-release; deployments use `.github/workflows/cicd-3-deploy.yaml`.
17+
- **Dev Environment:**
18+
- Use the provided devcontainer for setup and configuration. Avoid manual SDK changes; always rebuild.
19+
20+
## Project-Specific Conventions
21+
22+
- **SDKs:**
23+
- Never manually edit files in `sdk/`; always regenerate from the OAS spec.
24+
- SDK folder is excluded from git and built/released via CI.
25+
- **Servers:**
26+
- Server code is generated at build time from OAS specs. See `server/` and `src/server/host` for custom logic.
27+
- **Test Data:**
28+
- Use `scripts/test-data` to generate and upload test letters to S3. Example command:
29+
30+
```bash
31+
npm run cli -- create-letter --supplier-id ... --environment ... --awsAccountId ... --letter-id ... --group-id ... --specification-id ... --status PENDING
32+
```
33+
34+
## Integration Points
35+
36+
- **External Services:**
37+
- AWS S3 and database for test data and letter storage.
38+
- OpenAPI Generator CLI for SDK/server generation.
39+
- **Documentation:**
40+
- Latest [docs](https://nhsdigital.github.io/nhs-notify-supplier-api/)
41+
- Local docs: `make serve`
42+
43+
## Key Files & Directories
44+
45+
- `specification/api/notify-supplier.yml`: Main API spec
46+
- `sdk/`: Generated SDKs (Python, TypeScript, CSharp)
47+
- `server/`, `src/server/host`: Server implementations
48+
- `lambdas/`: Lambda handlers
49+
- `scripts/test-data/`: Test data generation scripts
50+
- `docs/`: Documentation source
51+
52+
## Patterns & Examples
53+
54+
- Always regenerate SDKs/servers after spec changes.
55+
- Use Makefile targets for all build/test workflows.
56+
- Reference the README for up-to-date workflow and integration details.
57+
58+
---
59+
For unclear or missing conventions, consult `/README.md` or ask maintainers for guidance.

scripts/config/vale/styles/config/vocabularies/words/accept.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ bot
44
Cognito
55
Cyber
66
Dependabot
7+
Dev
78
devcontainer
89
draw.io
910
drawio
@@ -16,6 +17,7 @@ Gitleaks
1617
Grype
1718
idempotence
1819
Jira
20+
Makefile
1921
OAuth
2022
Octokit
2123
onboarding

0 commit comments

Comments
 (0)