Skip to content

Commit c080979

Browse files
Basic event catalog
0 parents  commit c080979

File tree

75 files changed

+56673
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+56673
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"image": "mcr.microsoft.com/devcontainers/typescript-node",
3+
4+
"customizations": {
5+
"vscode": {
6+
"extensions": ["streetsidesoftware.code-spell-checker"]
7+
}
8+
},
9+
"forwardPorts": [3000]
10+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "Ubuntu",
3+
"image": "mcr.microsoft.com/devcontainers/base:noble",
4+
"features": {
5+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
6+
"moby": true,
7+
"azureDnsAutoDetection": true,
8+
"installDockerBuildx": true,
9+
"installDockerComposeSwitch": true,
10+
"version": "latest",
11+
"dockerDashComposeVersion": "v2"
12+
},
13+
"ghcr.io/devcontainers/features/go:1": {},
14+
"ghcr.io/azutake/devcontainer-features/go-packages-install:0": {
15+
"PACKAGES": "github.com/asdf-vm/asdf/cmd/[email protected]"
16+
},
17+
"ghcr.io/devcontainers/features/python:1": {},
18+
"ghcr.io/devcontainers/features/common-utils": {
19+
"installZsh": true,
20+
"installOhMyZsh": true,
21+
"installOhMyZshConfig": true,
22+
"configureZshAsDefaultShell": true
23+
},
24+
"ghcr.io/devcontainers-extra/features/zsh-plugins:0": {
25+
"plugins": "zsh-autosuggestions zsh-syntax-highlighting",
26+
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions.git https://github.com/zsh-users/zsh-syntax-highlighting.git"
27+
},
28+
"ghcr.io/devcontainers/features/node:1": {}
29+
},
30+
"postCreateCommand": "pipx install pre-commit && make config && echo 'export GPG_TTY=$TTY' | cat - ~/.zshrc > temp && mv temp ~/.zshrc",
31+
"mounts": [
32+
"source=${localEnv:HOME}/.gnupg,target=/home/vscode/.gnupg,type=bind,consistency=cached"
33+
]
34+
}

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# WARNING: Please, DO NOT edit this section of the file! It is maintained in the repository template.
2+
node_modules
3+
.env
4+
5+
.scannerwork
6+
*cloc*report*.json
7+
*sbom*report*.json
8+
*vulnerabilities*report*.json
9+
*report*json.zip
10+
.version
11+
version.json
12+
*.code-workspace
13+
!project.code-workspace
14+
15+
# Please, add your custom content below!
16+
17+
!nhs-notify.code-workspace

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
first-time-setup:
2+
npx --yes @eventcatalog/create-eventcatalog@latest --organization-name "NHS Notify" nhsnotify
3+
4+
build:
5+
cd src/eventcatalog/nhsnotify && npm run build
6+
7+
dev:
8+
cd src/eventcatalog/nhsnotify && npm run dev
9+
10+
preview:
11+
cd src/eventcatalog/nhsnotify/dist && npx --yes http-server -p 3001
12+
13+
config:
14+
cd src/eventcatalog/nhsnotify && npm install
15+
cd src/validator && npm install
16+
17+
validate:
18+
cd src/validator && node validate-schema.js

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Event Catalogue
2+
3+
SERVER MODE
4+
5+
`make dev`
6+
`http://localhost:3000/docs`
7+
8+
STATIC MODE
9+
10+
Open in "General" dev container
11+
12+
`make build`
13+
14+
`make preview`
15+
16+
`http://localhost:3001`
17+
18+
built output is static site to the [dist](./nhsnotify/dist) folder
19+
20+
For the remote schemas to work NO LONGER WORKS WITH STATIC. IT MUST RUN IN SERVER MODE.
21+
Need to switch to using integrations to enable this ($$$).

docs/test.schema.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$id": "https://nhsdigital.github.io/nhs-notify-standards/cloudevents/example.json",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"title": "Example Event",
5+
"description": "Example event",
6+
7+
"allOf": [{ "$ref": "https://nhsdigital.github.io/nhs-notify-standards/cloudevents/nhs-notify-profile.schema.json" }],
8+
"properties": {
9+
"data": { "$ref": "https://nhsdigital.github.io/nhs-notify-standards/cloudevents/example-data.json" }
10+
}
11+
}

project.code-workspace

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
{
2+
"folders": [
3+
{
4+
"name": "NHS Notify Event Catalogue",
5+
"path": "."
6+
},
7+
{
8+
"name": "Event Catalog",
9+
"path": "./src/eventcatalog/nhsnotify"
10+
},
11+
{
12+
"name": "Application Source Code",
13+
"path": "./src"
14+
},
15+
{
16+
"name": "GitHub",
17+
"path": ".github"
18+
},
19+
{
20+
"name": "Git Hooks",
21+
"path": "./.git/hooks"
22+
},
23+
{
24+
"name": "Dev Container",
25+
"path": ".devcontainer"
26+
}
27+
],
28+
"settings": {
29+
"autoOpenWorkspace.enableAutoOpenIfSingleWorkspace": true,
30+
"githubCodeOwners.format.enabled": true,
31+
"workspace-terminals.switchTerminal": "always",
32+
"workspace-terminals.auto": "always",
33+
"markdownlint.config": {
34+
"MD013": false,
35+
"MD024": { "siblings_only": true },
36+
"MD033": false
37+
},
38+
"cSpell.words": [
39+
"ADRS",
40+
"Amaan",
41+
"Codespaces",
42+
"endfor",
43+
"Nasar",
44+
"preinstalled",
45+
"pythonist",
46+
"rossbugginsnhs",
47+
"ruleset",
48+
"Stefaniuk"
49+
],
50+
"cSpell.language": "en-GB",
51+
"editor.wordWrap": "off",
52+
"editor.formatOnSave": false,
53+
"[plaintext]": {
54+
"editor.wordWrap": "off",
55+
"editor.formatOnSave": false,
56+
"editor.unicodeHighlight.ambiguousCharacters": false,
57+
"editor.unicodeHighlight.invisibleCharacters": false
58+
},
59+
"[markdown]": {
60+
"editor.wordWrap": "off",
61+
"editor.defaultFormatter": "esbenp.prettier-vscode"
62+
},
63+
"[jsonc]": {
64+
"editor.wordWrap": "off",
65+
"editor.defaultFormatter": "esbenp.prettier-vscode"
66+
},
67+
"[html]": {
68+
"editor.wordWrap": "off",
69+
"editor.defaultFormatter": "vscode.html-language-features"
70+
},
71+
"[json]": {
72+
"editor.wordWrap": "off",
73+
"editor.defaultFormatter": "vscode.json-language-features"
74+
},
75+
"window.title": "${separator}${activeRepositoryName}${separator}${activeRepositoryBranchName}${separator}[${remoteName}]",
76+
"window.titleSeparator": " : "
77+
},
78+
"extensions": {
79+
"recommendations": [
80+
"ms-vscode.remote-server",
81+
"alefragnani.bookmarks",
82+
"AmazonWebServices.aws-toolkit-vscode",
83+
"chdsbd.github-code-owners",
84+
"davidanson.vscode-markdownlint",
85+
"dbaeumer.vscode-eslint",
86+
"donjayamanne.githistory",
87+
"editorconfig.editorconfig",
88+
"esbenp.prettier-vscode",
89+
"fvclaus.sort-json-array",
90+
"github.codespaces",
91+
"github.github-vscode-theme",
92+
"github.remotehub",
93+
"github.vscode-github-actions",
94+
"github.vscode-pull-request-github",
95+
"hediet.vscode-drawio",
96+
"johnpapa.vscode-peacock",
97+
"joshx.workspace-terminals",
98+
"maattdd.gitless",
99+
"mhutchie.git-graph",
100+
"ms-azuretools.vscode-docker",
101+
"ms-vscode-remote.remote-containers",
102+
"ms-vscode-remote.remote-wsl",
103+
"ms-vscode.hexeditor",
104+
"ms-vscode.live-server",
105+
"ms-vsliveshare.vsliveshare",
106+
"redhat.vscode-xml",
107+
"streetsidesoftware.code-spell-checker-british-english",
108+
"takumii.markdowntable",
109+
"tamasfe.even-better-toml",
110+
"tomoki1207.pdf",
111+
"vscode-icons-team.vscode-icons",
112+
"vstirbu.vscode-mermaid-preview",
113+
"wayou.vscode-todo-highlight",
114+
"yzane.markdown-pdf",
115+
"yzhang.dictionary-completion",
116+
"yzhang.markdown-all-in-one",
117+
"zoma.vscode-auto-open-workspace"
118+
],
119+
"unwantedRecommendations": []
120+
}
121+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.eventcatalog-core/
2+
.git/
3+
dist/
4+
node_modules/
5+
.gitignore
6+
.dockerignore
7+
Dockerfile
8+
README.md
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.astro
9+
out
10+
dist
11+
12+
13+
# Misc
14+
.DS_Store
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
23+
24+
.eventcatalog-core
25+
26+
.env
27+
.env-*

src/eventcatalog/nhsnotify/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
strict-peer-dependencies=false

0 commit comments

Comments
 (0)