Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backbone #134

Merged
merged 8 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Instructions

During you interaction with the user, if you find anything reusable in this project (e.g. version of a library, model name), especially about a fix to a mistake you made or a correction you received, you should take note in the `Lessons` section in the `.cursorrules` file so you will not make the same mistake again.

You should also use the `.scratchpad.md` file as a scratchpad to organize your thoughts. Especially when you receive a new task, you should first review the content of the scratchpad, clear old different task if necessary, first explain the task, and plan the steps you need to take to complete the task. You can use todo markers to indicate the progress, e.g.
[X] Task 1
[ ] Task 2

Also update the progress of the task in the Scratchpad when you finish a subtask.
Especially when you finished a milestone, it will help to improve your depth of task accomplishment to use the scratchpad to reflect and plan.
The goal is to help you maintain a big picture as well as the progress of the task. Always refer to the Scratchpad when you plan the next step.

Before you start work, think through it really carefully, write the plan in the scratchpad, and then ask questions or prompt the user for clarification.


You are an expert in TypeScript, Nunjucks, static web development for uk government with an in depth knowledge of the uk government digital service manual, the design system and the content style guide.

# Checking the work
there is a Webserver running on port 8080 that you can use to check your work, you should use it to check your work regularly.

# Code Style and Structure
- Follow a Test Driven Development (TDD) approach, write the tests first, check they execute successfully but return failing results, then write the code to pass the tests.
- Run the tests regularly to ensure the code is working as expected.
- Write concise, technical TypeScript code with accurate examples.
- Use functional and declarative programming patterns; avoid classes.
- Prefer iteration and modularization over code duplication.
- Never be afraid to refactor your code, you should do it often, if you make a change to fix things and it doesn't have the intended result, be inclined to revert the change before refactoring again.

# Naming Conventions
- Use lowercase with dashes for directories (e.g., components/auth-wizard).

# TypeScript Usage
- Use TypeScript for all code; prefer interfaces over types.
- Avoid enums; use maps instead.
- Use functional components with TypeScript interfaces.
- Use strict mode in TypeScript for better type safety.

# Syntax and Formatting
- Use the "function" keyword for pure functions.
- Use Prettier for consistent code formatting.


# Security
- Sanitize user inputs to prevent XSS attacks.


# Lessons

## User Specified Lessons

- Include info useful for debugging in the program output.
- Read the file before you try to edit it.
- Due to Cursor's limit, when you use `git` and `gh` and need to submit a multiline commit message, first write the message in a file, and then use `git commit -F <filename>` or similar command to commit. And then remove the file. Include "[Cursor] " in the commit message and PR title.
- the server is running on port 8080, you should use it to check your work regularly with curl.
- you can run `npm run build` to build the project and check the output for any build errors

## Cursor learned

- For search results, ensure proper handling of different character encodings (UTF-8) for international queries
8 changes: 7 additions & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,13 @@ module.exports = function (eleventyConfig) {
)

eleventyConfig.addCollection("catalog", (collection) =>
collection.getFilteredByGlob("src/catalog/**/*.md", "!**/index.md", "!**/tags.md").map(useExternalUrl),
collection
.getFilteredByGlob("src/catalog/**/*.md", "!**/index.md", "!**/tags.md")
.map(useExternalUrl)
.sort((a, b) => {
// Sort alphabetically by title
return a.data.title.localeCompare(b.data.title)
}),
)

eleventyConfig.addShortcode("remoteInclude", async function (url, start, end) {
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ _site
.cache/
*.css
.yarn
.scratchpad.md
6 changes: 3 additions & 3 deletions src/About/Digital-Backbone/benefits.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
layout: sub-navigation
title: Benefits
description: Benefits of the National Digital Architecture for the UK Public and Private Sectors
description: Benefits of the Digital Backbone for the UK Public and Private Sectors
eleventyNavigation:
parent: Digital Backbone
key: Benefits
sectionKey: About
---

The National Digital Architecture, encompassing the National Digital Exchange (NDX), National Digital Resilience Platform, and National Digital Code, offers several potential benefits for both the UK public and private sectors.
The Digital Backbone, encompassing the National Digital Exchange (NDX), National Digital Resilience Platform, and National Digital Code, offers several potential benefits for both the UK public and private sectors.

## Public Sector Benefits:

Expand All @@ -27,4 +27,4 @@ The National Digital Architecture, encompassing the National Digital Exchange (N
- **Enhanced Digital Resilience across the Supply Chain:** The National Digital Resilience Platform's focus on strengthening the digital supply chain will benefit businesses operating in the UK. Improved resilience measures will create a more stable and secure digital environment for all.
- **Clear Standards for Responsible Digital Citizenship:** The National Digital Code will establish clear standards for responsible and ethical digital behavior, setting a benchmark for businesses to follow. This will enhance trust and confidence in the UK as a digital marketplace.

It is important to note that these benefits are based on the information provided in the sources and represent the anticipated outcomes of the National Digital Architecture initiative. The actual realization of these benefits will depend on various factors, including successful implementation, adoption by public and private sector stakeholders, and ongoing adaptation to the evolving digital landscape.
It is important to note that these benefits are based on the information provided in the sources and represent the anticipated outcomes of the Digital Backbone initiative. The actual realization of these benefits will depend on various factors, including successful implementation, adoption by public and private sector stakeholders, and ongoing adaptation to the evolving digital landscape.
1 change: 1 addition & 0 deletions src/assets/catalog/anthropic/claude-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/catalog/aws/aws-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/assets/catalog/aws/connect-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading