@radicaltools/cli 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +332 -44
- package/dist/hub-catalogue/concern/concern-api-collections.radical +1136 -0
- package/dist/hub-catalogue/concern/concern-api-errors.radical +1180 -0
- package/dist/hub-catalogue/concern/concern-api-evolution.radical +449 -210
- package/dist/hub-catalogue/concern/concern-api-idempotency.radical +1218 -0
- package/dist/hub-catalogue/concern/concern-api-resource-design.radical +1102 -0
- package/dist/hub-catalogue/concern/concern-api-style-guide.radical +1210 -0
- package/dist/hub-catalogue/concern/concern-architecture-style.radical +287 -131
- package/dist/hub-catalogue/concern/concern-audit-trail.radical +1096 -0
- package/dist/hub-catalogue/concern/concern-authentication.radical +247 -37
- package/dist/hub-catalogue/concern/concern-authorization.radical +311 -89
- package/dist/hub-catalogue/concern/concern-availability.radical +287 -63
- package/dist/hub-catalogue/concern/concern-backend-stack.radical +300 -381
- package/dist/hub-catalogue/concern/concern-backup-recovery.radical +385 -129
- package/dist/hub-catalogue/concern/concern-caching.radical +1294 -0
- package/dist/hub-catalogue/concern/concern-capacity.radical +194 -81
- package/dist/hub-catalogue/concern/concern-code-documentation.radical +1397 -0
- package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +1409 -0
- package/dist/hub-catalogue/concern/concern-code-review-branching.radical +1416 -0
- package/dist/hub-catalogue/concern/concern-code-style.radical +1058 -0
- package/dist/hub-catalogue/concern/concern-communication-style.radical +473 -167
- package/dist/hub-catalogue/concern/concern-data-classification.radical +970 -0
- package/dist/hub-catalogue/concern/concern-data-consistency.radical +339 -308
- package/dist/hub-catalogue/concern/concern-data-store.radical +480 -158
- package/dist/hub-catalogue/concern/concern-decomposition.radical +260 -85
- package/dist/hub-catalogue/concern/concern-definition-of-done.radical +1214 -0
- package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +966 -0
- package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +1345 -0
- package/dist/hub-catalogue/concern/concern-deployment.radical +343 -92
- package/dist/hub-catalogue/concern/concern-encryption.radical +339 -76
- package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +1197 -0
- package/dist/hub-catalogue/concern/concern-eu-dora.radical +1321 -0
- package/dist/hub-catalogue/concern/concern-frontend-stack.radical +467 -160
- package/dist/hub-catalogue/concern/concern-incident-management.radical +1204 -0
- package/dist/hub-catalogue/concern/concern-infrastructure.radical +1300 -268
- package/dist/hub-catalogue/concern/concern-integration-resilience.radical +88 -51
- package/dist/hub-catalogue/concern/concern-messaging.radical +173 -140
- package/dist/hub-catalogue/concern/concern-module-boundaries.radical +162 -159
- package/dist/hub-catalogue/concern/concern-observability.radical +224 -275
- package/dist/hub-catalogue/concern/concern-operational-readiness.radical +1249 -0
- package/dist/hub-catalogue/concern/concern-personal-data.radical +637 -122
- package/dist/hub-catalogue/concern/concern-quality-priorities.radical +1091 -0
- package/dist/hub-catalogue/concern/concern-rate-limiting.radical +433 -141
- package/dist/hub-catalogue/concern/concern-release-versioning.radical +1358 -0
- package/dist/hub-catalogue/concern/concern-retention.radical +1399 -0
- package/dist/hub-catalogue/concern/concern-secrets.radical +332 -74
- package/dist/hub-catalogue/concern/concern-secure-coding.radical +1379 -0
- package/dist/hub-catalogue/concern/concern-secure-development.radical +1245 -0
- package/dist/hub-catalogue/concern/concern-security-detection.radical +1153 -0
- package/dist/hub-catalogue/concern/concern-supply-chain.radical +257 -183
- package/dist/hub-catalogue/concern/concern-technical-debt.radical +1450 -0
- package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +1145 -0
- package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +271 -137
- package/dist/hub-catalogue/concern/concern-test-strategy.radical +243 -224
- package/dist/hub-catalogue/concern/concern-threat-modelling.radical +1143 -0
- package/dist/index.js +10608 -6579
- package/package.json +1 -1
|
@@ -26,10 +26,38 @@
|
|
|
26
26
|
"title": "web.dev: Web Vitals (LCP, INP, CLS and their thresholds)",
|
|
27
27
|
"url": "https://web.dev/articles/vitals"
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
"title": "web.dev: Performance budgets 101",
|
|
31
|
+
"url": "https://web.dev/articles/performance-budgets-101"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"title": "web.dev: Rendering on the web",
|
|
35
|
+
"url": "https://web.dev/articles/rendering-on-the-web"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"title": "web.dev: Time to First Byte (TTFB)",
|
|
39
|
+
"url": "https://web.dev/articles/ttfb"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"title": "web.dev: Prevent unnecessary network requests with the HTTP Cache",
|
|
43
|
+
"url": "https://web.dev/articles/http-cache"
|
|
44
|
+
},
|
|
29
45
|
{
|
|
30
46
|
"title": "W3C: Web Content Accessibility Guidelines (WCAG) 2.2",
|
|
31
47
|
"url": "https://www.w3.org/TR/WCAG22/"
|
|
32
48
|
},
|
|
49
|
+
{
|
|
50
|
+
"title": "ETSI EN 301 549: Accessibility requirements for ICT products and services",
|
|
51
|
+
"url": "https://www.etsi.org/deliver/etsi_en/301500_301599/301549/03.02.01_60/en_301549v030201p.pdf"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"title": "W3C Design Tokens Community Group: Design Tokens Format Module",
|
|
55
|
+
"url": "https://tr.designtokens.org/format/"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"title": "Tailwind CSS documentation: theme variables",
|
|
59
|
+
"url": "https://tailwindcss.com/docs/theme"
|
|
60
|
+
},
|
|
33
61
|
{
|
|
34
62
|
"title": "Browserslist",
|
|
35
63
|
"url": "https://github.com/browserslist/browserslist"
|
|
@@ -82,7 +110,7 @@
|
|
|
82
110
|
{
|
|
83
111
|
"value": "htmx",
|
|
84
112
|
"label": "server-rendered HTML with htmx",
|
|
85
|
-
"description": "The back end renders HTML from templates; htmx swaps parts of the page, and Alpine.js holds small client state. Pick it for forms-and-tables applications when the team is back-end heavy and rich client-side interaction is rare."
|
|
113
|
+
"description": "The back end renders HTML from templates; htmx swaps parts of the page, and Alpine.js holds small client state. Pick it for forms-and-tables applications when the team is back-end heavy and rich client-side interaction is rare. The rendering question does not apply: every page is rendered on the server (answer SSR)."
|
|
86
114
|
}
|
|
87
115
|
]
|
|
88
116
|
},
|
|
@@ -90,23 +118,23 @@
|
|
|
90
118
|
"key": "RENDERING",
|
|
91
119
|
"title": "Rendering",
|
|
92
120
|
"label": "Where are pages rendered?",
|
|
93
|
-
"hint": "Rendering decides what the first response holds: an empty shell, the content, or a file built in advance. It sets first-load speed, search visibility and what the server must do.",
|
|
121
|
+
"hint": "Rendering decides what the first response holds: an empty shell, the content, or a file built in advance. It sets first-load speed, search visibility and what the server must do. Only when the framework is not htmx, which renders every page on the server: answer SSR there.",
|
|
94
122
|
"defaultValue": "ssr",
|
|
95
123
|
"options": [
|
|
96
124
|
{
|
|
97
125
|
"value": "spa",
|
|
98
126
|
"label": "in the browser (single-page app)",
|
|
99
|
-
"description": "The server sends a shell and the browser renders everything. Pick it for applications behind sign-in, used for long sessions, where search engines do not matter and later navigation must be instant."
|
|
127
|
+
"description": "The server sends a shell and the browser renders everything. Pick it for applications behind sign-in, used for long sessions, where search engines do not matter and later navigation must be instant. Not with htmx."
|
|
100
128
|
},
|
|
101
129
|
{
|
|
102
130
|
"value": "ssr",
|
|
103
131
|
"label": "on the server for each request (SSR)",
|
|
104
|
-
"description": "Each request gets HTML with its content, then the page becomes interactive. Pick it for public pages with personalised or fast-changing content where search and first load matter."
|
|
132
|
+
"description": "Each request gets HTML with its content, then the page becomes interactive. Pick it for public pages with personalised or fast-changing content where search and first load matter, and always with htmx."
|
|
105
133
|
},
|
|
106
134
|
{
|
|
107
135
|
"value": "static",
|
|
108
136
|
"label": "at build time (static generation)",
|
|
109
|
-
"description": "Pages are built in advance and served from a CDN, rebuilt when content changes. Pick it for content that is the same for everyone and changes at most a few times an hour (marketing, documentation, catalogues)."
|
|
137
|
+
"description": "Pages are built in advance and served from a CDN, rebuilt when content changes. Pick it for content that is the same for everyone and changes at most a few times an hour (marketing, documentation, catalogues). Not with htmx."
|
|
110
138
|
}
|
|
111
139
|
]
|
|
112
140
|
},
|
|
@@ -120,12 +148,12 @@
|
|
|
120
148
|
{
|
|
121
149
|
"value": "own",
|
|
122
150
|
"label": "our own design system",
|
|
123
|
-
"description": "Our components and design tokens, built on accessible headless primitives (Radix
|
|
151
|
+
"description": "Our components and design tokens, built on accessible headless primitives (Radix or React Aria for React, Angular CDK, Reka UI for Vue, Bits UI for Svelte; template partials with htmx), documented in Storybook. Pick it when the brand must be distinct and several applications share it, and a team can own it."
|
|
124
152
|
},
|
|
125
153
|
{
|
|
126
154
|
"value": "library",
|
|
127
155
|
"label": "an established component library",
|
|
128
|
-
"description": "An off-the-shelf library themed to the brand: MUI, Angular Material, Vuetify, PrimeNG, Fluent UI, Skeleton. Pick it for business applications where speed matters more than a distinct look."
|
|
156
|
+
"description": "An off-the-shelf library themed to the brand: MUI, Angular Material, Vuetify, PrimeNG, Fluent UI, Skeleton; with htmx a CSS library such as Bootstrap or Pico. Pick it for business applications where speed matters more than a distinct look."
|
|
129
157
|
},
|
|
130
158
|
{
|
|
131
159
|
"value": "utility",
|
|
@@ -144,7 +172,7 @@
|
|
|
144
172
|
{
|
|
145
173
|
"value": "modern",
|
|
146
174
|
"label": "the last two versions of Chrome, Edge, Firefox and Safari",
|
|
147
|
-
"description": "Only current evergreen browsers. Pick it for internal tools and applications whose users have managed, up-to-date devices."
|
|
175
|
+
"description": "Only current evergreen browsers; older ones get a notice naming the supported browsers. Pick it for internal tools and applications whose users have managed, up-to-date devices."
|
|
148
176
|
},
|
|
149
177
|
{
|
|
150
178
|
"value": "defaults",
|
|
@@ -154,7 +182,7 @@
|
|
|
154
182
|
{
|
|
155
183
|
"value": "extended",
|
|
156
184
|
"label": "an extended list, including older phones (iOS 15 and later)",
|
|
157
|
-
"description": "Over 0.2% use, last 3 versions, Firefox ESR, iOS Safari 15 and later. Pick it when analytics show many users on older phones (emerging markets, public services that must reach everyone)."
|
|
185
|
+
"description": "Over 0.2% use, last 3 versions, Firefox ESR, iOS Safari 15 and later, with release candidates tried on real old phones. Pick it when analytics show many users on older phones (emerging markets, public services that must reach everyone)."
|
|
158
186
|
}
|
|
159
187
|
]
|
|
160
188
|
},
|
|
@@ -199,7 +227,7 @@
|
|
|
199
227
|
"y": 0,
|
|
200
228
|
"kind": "brief",
|
|
201
229
|
"source": "Hub concern pack: Frontend stack",
|
|
202
|
-
"description": "People use this front end on their own devices, browsers and networks, some with disabilities and assistive technology. It has to load and respond quickly on an ordinary phone, work in the browsers its users have, be usable by everyone, look and behave consistently, and be built on a framework the team knows and that keeps receiving fixes. The choices and the numbers it is held to must be written down and checked, not rediscovered after users complain."
|
|
230
|
+
"description": "People use this front end on their own devices, browsers and networks, some with disabilities and assistive technology. It has to load and respond quickly on an ordinary phone, work in the browsers its users have, be usable by everyone, look and behave consistently, and be built on a framework the team knows and that keeps receiving fixes. The choices and the numbers it is held to must be written down and checked, not rediscovered after users complain. The checks assume one front end per repository with its package.json at the root, a versions.txt listing the endoflife.date products and cycles in use, server templates (htmx) under templates/ or src/, and a RUM table rum_events(name, value, page_group, received_at) fed by the page."
|
|
203
231
|
},
|
|
204
232
|
{
|
|
205
233
|
"id": "req-one-framework",
|
|
@@ -218,8 +246,8 @@
|
|
|
218
246
|
"x": 260,
|
|
219
247
|
"y": 130,
|
|
220
248
|
"ears_type": "ubiquitous",
|
|
221
|
-
"action": "meet, at the 75th percentile of real page loads
|
|
222
|
-
"rationale": "These are the thresholds for a \"good\" experience, measured at the 75th percentile of field data (web.dev, Web Vitals: LCP 2.5 s, INP 200 ms, CLS 0.1); they also feed search ranking."
|
|
249
|
+
"action": "meet, at the 75th percentile of real page loads over 28 days per page group, a Largest Contentful Paint within {{LCP_MS}} ms, an Interaction to Next Paint within {{INP_MS}} ms and a Cumulative Layout Shift of at most {{CLS}}",
|
|
250
|
+
"rationale": "These are the thresholds for a \"good\" experience, measured at the 75th percentile of field data over 28 days (web.dev, Web Vitals: LCP 2.5 s, INP 200 ms, CLS 0.1); they also feed search ranking."
|
|
223
251
|
},
|
|
224
252
|
{
|
|
225
253
|
"id": "req-bundle",
|
|
@@ -229,7 +257,7 @@
|
|
|
229
257
|
"y": 260,
|
|
230
258
|
"ears_type": "ubiquitous",
|
|
231
259
|
"action": "keep the JavaScript a route loads before it is interactive within {{JS_KB}} KB compressed, loading the rest on demand",
|
|
232
|
-
"rationale": "JavaScript is the costliest byte on a phone: it is downloaded, parsed and run on the main thread, which is what INP measures (web.dev,
|
|
260
|
+
"rationale": "JavaScript is the costliest byte on a phone: it is downloaded, parsed and run on the main thread, which is what INP measures (web.dev, Performance budgets 101)."
|
|
233
261
|
},
|
|
234
262
|
{
|
|
235
263
|
"id": "req-a11y",
|
|
@@ -239,7 +267,7 @@
|
|
|
239
267
|
"y": 390,
|
|
240
268
|
"ears_type": "ubiquitous",
|
|
241
269
|
"action": "conform to WCAG 2.2 level AA on every page, with 0 serious or critical automated accessibility violations, every function operable by keyboard alone, and a manual audit with a screen reader before each major release",
|
|
242
|
-
"rationale": "WCAG 2.2 AA is the level EN 301 549, the European Accessibility Act and most public-sector rules require; automated checks find only part of the failures, hence the manual audit (W3C WCAG 2.2)."
|
|
270
|
+
"rationale": "WCAG 2.2 AA is the level EN 301 549, the European Accessibility Act and most public-sector rules require; automated checks find only part of the failures, hence the keyboard journey and the manual audit (W3C WCAG 2.2; EN 301 549)."
|
|
243
271
|
},
|
|
244
272
|
{
|
|
245
273
|
"id": "req-supported",
|
|
@@ -248,8 +276,16 @@
|
|
|
248
276
|
"x": 260,
|
|
249
277
|
"y": 520,
|
|
250
278
|
"ears_type": "ubiquitous",
|
|
251
|
-
"action": "run only framework and build-tool majors under support, moving off each at least {{EOL_DAYS}} days before its end of support
|
|
252
|
-
"rationale": "Front-end frameworks support a major for a limited time (Angular 18 months, Node.js-based tooling with its runtime); after that, security fixes stop (endoflife.date
|
|
279
|
+
"action": "run only framework and build-tool majors under support, moving off each at least {{EOL_DAYS}} days before its end of support",
|
|
280
|
+
"rationale": "Front-end frameworks support a major for a limited time (Angular 18 months, Node.js-based tooling with its runtime); after that, security fixes stop (endoflife.date).",
|
|
281
|
+
"hubWhen": {
|
|
282
|
+
"FRAMEWORK": [
|
|
283
|
+
"react",
|
|
284
|
+
"angular",
|
|
285
|
+
"vue",
|
|
286
|
+
"svelte"
|
|
287
|
+
]
|
|
288
|
+
}
|
|
253
289
|
},
|
|
254
290
|
{
|
|
255
291
|
"id": "req-spa-cache",
|
|
@@ -260,10 +296,16 @@
|
|
|
260
296
|
"ears_type": "event-driven",
|
|
261
297
|
"trigger": "a new version of the single-page app is deployed",
|
|
262
298
|
"action": "serve its content-hashed assets with a one-year immutable cache and its HTML with no-cache, so that every user gets the new version on their next navigation and 0 users load a mix of versions",
|
|
263
|
-
"rationale": "A single-page app is a shell plus assets; wrong caching either serves stale code for days or downloads everything on every visit (web.dev, HTTP
|
|
299
|
+
"rationale": "A single-page app is a shell plus assets; wrong caching either serves stale code for days or downloads everything on every visit (web.dev, HTTP Cache).",
|
|
264
300
|
"hubWhen": {
|
|
265
301
|
"RENDERING": [
|
|
266
302
|
"spa"
|
|
303
|
+
],
|
|
304
|
+
"FRAMEWORK": [
|
|
305
|
+
"react",
|
|
306
|
+
"angular",
|
|
307
|
+
"vue",
|
|
308
|
+
"svelte"
|
|
267
309
|
]
|
|
268
310
|
}
|
|
269
311
|
},
|
|
@@ -275,8 +317,8 @@
|
|
|
275
317
|
"y": 780,
|
|
276
318
|
"ears_type": "event-driven",
|
|
277
319
|
"trigger": "a page is requested",
|
|
278
|
-
"action": "answer with HTML that already holds the page's main content, with a Time to First Byte within 800 ms at the 75th percentile",
|
|
279
|
-
"rationale": "Server rendering pays off only if the server answers quickly; 800 ms is web.dev's \"good\" Time to First Byte, which leaves room for LCP within budget.",
|
|
320
|
+
"action": "answer with HTML that already holds the page's main content, with a Time to First Byte within 800 ms at the 75th percentile at the peak load decided in the Capacity and scaling pack",
|
|
321
|
+
"rationale": "Server rendering pays off only if the server answers quickly; 800 ms is web.dev's \"good\" Time to First Byte, which leaves room for LCP within budget (web.dev, TTFB).",
|
|
280
322
|
"hubWhen": {
|
|
281
323
|
"RENDERING": [
|
|
282
324
|
"ssr"
|
|
@@ -291,11 +333,17 @@
|
|
|
291
333
|
"y": 910,
|
|
292
334
|
"ears_type": "event-driven",
|
|
293
335
|
"trigger": "content is published or changed",
|
|
294
|
-
"action": "rebuild the affected pages and serve them from the CDN within 15 minutes, with 100% of pages served as pre-built files",
|
|
295
|
-
"rationale": "Static pages are the fastest and cheapest to serve; the publishing delay is the price, and it must be bounded (web.dev,
|
|
336
|
+
"action": "rebuild the affected pages and serve them from the CDN within 15 minutes, with 100% of pages served as pre-built files from the CDN cache",
|
|
337
|
+
"rationale": "Static pages are the fastest and cheapest to serve; the publishing delay is the price, and it must be bounded (web.dev, Rendering on the web).",
|
|
296
338
|
"hubWhen": {
|
|
297
339
|
"RENDERING": [
|
|
298
340
|
"static"
|
|
341
|
+
],
|
|
342
|
+
"FRAMEWORK": [
|
|
343
|
+
"react",
|
|
344
|
+
"angular",
|
|
345
|
+
"vue",
|
|
346
|
+
"svelte"
|
|
299
347
|
]
|
|
300
348
|
}
|
|
301
349
|
},
|
|
@@ -307,7 +355,7 @@
|
|
|
307
355
|
"y": 1040,
|
|
308
356
|
"ears_type": "ubiquitous",
|
|
309
357
|
"action": "build every screen from the design system's components and tokens, document each component with its states in Storybook, and use 0 hard-coded colours, font sizes or spacing outside the tokens",
|
|
310
|
-
"rationale": "A design system pays off only when used everywhere; tokens make a brand or contrast change one edit instead of a search (W3C Design Tokens
|
|
358
|
+
"rationale": "A design system pays off only when used everywhere; tokens make a brand or contrast change one edit instead of a search (W3C Design Tokens Format Module).",
|
|
311
359
|
"hubWhen": {
|
|
312
360
|
"DESIGN": [
|
|
313
361
|
"own"
|
|
@@ -337,7 +385,7 @@
|
|
|
337
385
|
"y": 1300,
|
|
338
386
|
"ears_type": "ubiquitous",
|
|
339
387
|
"action": "take colours, spacing and type sizes only from the tokens in the Tailwind theme, with 0 arbitrary values in class names",
|
|
340
|
-
"rationale": "Arbitrary values bypass the theme and turn the design system back into one-off styles (Tailwind CSS documentation, theme).",
|
|
388
|
+
"rationale": "Arbitrary values bypass the theme and turn the design system back into one-off styles (Tailwind CSS documentation, theme variables).",
|
|
341
389
|
"hubWhen": {
|
|
342
390
|
"DESIGN": [
|
|
343
391
|
"utility"
|
|
@@ -380,6 +428,7 @@
|
|
|
380
428
|
"trigger": "a release candidate is built",
|
|
381
429
|
"action": "run the main journeys on real devices with the oldest supported iOS Safari and a low-end Android phone, and meet the Core Web Vitals budget on the Android phone",
|
|
382
430
|
"rationale": "Emulated browsers miss the CPU and memory limits of old phones, where an extended audience feels the budget most (web.dev, Web Vitals).",
|
|
431
|
+
"unchecked": "It runs on real phones, which no pipeline tool here drives: the release engineer runs the main journeys on the device bench (the oldest supported iPhone and a low-end Android phone) before each release candidate is promoted, and records LCP from the phone's DevTools in the release notes.",
|
|
383
432
|
"hubWhen": {
|
|
384
433
|
"BROWSERS": [
|
|
385
434
|
"extended"
|
|
@@ -392,9 +441,9 @@
|
|
|
392
441
|
"label": "Second framework refused",
|
|
393
442
|
"x": 520,
|
|
394
443
|
"y": 0,
|
|
395
|
-
"given": "the front end's
|
|
396
|
-
"when": "a change adds another UI framework",
|
|
397
|
-
"then": "the
|
|
444
|
+
"given": "the front end's package.json files",
|
|
445
|
+
"when": "a change adds another UI framework's package",
|
|
446
|
+
"then": "the framework check fails until a decision record allows it"
|
|
398
447
|
},
|
|
399
448
|
{
|
|
400
449
|
"id": "sc-vitals",
|
|
@@ -402,7 +451,7 @@
|
|
|
402
451
|
"label": "Field vitals within budget",
|
|
403
452
|
"x": 520,
|
|
404
453
|
"y": 130,
|
|
405
|
-
"given": "
|
|
454
|
+
"given": "28 days of real-user measurements per page group",
|
|
406
455
|
"when": "the 75th percentiles are computed",
|
|
407
456
|
"then": "LCP is within {{LCP_MS}} ms, INP within {{INP_MS}} ms and CLS at most {{CLS}} for every page group"
|
|
408
457
|
},
|
|
@@ -413,8 +462,8 @@
|
|
|
413
462
|
"x": 520,
|
|
414
463
|
"y": 260,
|
|
415
464
|
"given": "a pull request that adds a large library to a route",
|
|
416
|
-
"when": "
|
|
417
|
-
"then": "it fails when the route's
|
|
465
|
+
"when": "Lighthouse CI runs against the preview",
|
|
466
|
+
"then": "it fails when the route's script transfer size passes {{JS_KB}} KB"
|
|
418
467
|
},
|
|
419
468
|
{
|
|
420
469
|
"id": "sc-a11y",
|
|
@@ -423,8 +472,8 @@
|
|
|
423
472
|
"x": 520,
|
|
424
473
|
"y": 390,
|
|
425
474
|
"given": "each page of the main journeys",
|
|
426
|
-
"when": "the automated checks run and the
|
|
427
|
-
"then": "0 serious or critical violations are reported and
|
|
475
|
+
"when": "the automated checks run and the main journey is completed with the keyboard only",
|
|
476
|
+
"then": "0 serious or critical violations are reported and the journey completes"
|
|
428
477
|
},
|
|
429
478
|
{
|
|
430
479
|
"id": "sc-supported",
|
|
@@ -434,7 +483,15 @@
|
|
|
434
483
|
"y": 520,
|
|
435
484
|
"given": "a framework major whose end of support is less than {{EOL_DAYS}} days away",
|
|
436
485
|
"when": "the version check runs",
|
|
437
|
-
"then": "it fails naming the version and its end-of-support date"
|
|
486
|
+
"then": "it fails naming the version and its end-of-support date",
|
|
487
|
+
"hubWhen": {
|
|
488
|
+
"FRAMEWORK": [
|
|
489
|
+
"react",
|
|
490
|
+
"angular",
|
|
491
|
+
"vue",
|
|
492
|
+
"svelte"
|
|
493
|
+
]
|
|
494
|
+
}
|
|
438
495
|
},
|
|
439
496
|
{
|
|
440
497
|
"id": "sc-spa-cache",
|
|
@@ -448,6 +505,12 @@
|
|
|
448
505
|
"hubWhen": {
|
|
449
506
|
"RENDERING": [
|
|
450
507
|
"spa"
|
|
508
|
+
],
|
|
509
|
+
"FRAMEWORK": [
|
|
510
|
+
"react",
|
|
511
|
+
"angular",
|
|
512
|
+
"vue",
|
|
513
|
+
"svelte"
|
|
451
514
|
]
|
|
452
515
|
}
|
|
453
516
|
},
|
|
@@ -458,7 +521,7 @@
|
|
|
458
521
|
"x": 520,
|
|
459
522
|
"y": 780,
|
|
460
523
|
"given": "a public page",
|
|
461
|
-
"when": "it is requested with JavaScript disabled",
|
|
524
|
+
"when": "it is requested at the peak rate with JavaScript disabled",
|
|
462
525
|
"then": "its main content is in the HTML, and the 75th-percentile TTFB is within 800 ms",
|
|
463
526
|
"hubWhen": {
|
|
464
527
|
"RENDERING": [
|
|
@@ -474,10 +537,16 @@
|
|
|
474
537
|
"y": 910,
|
|
475
538
|
"given": "a published page",
|
|
476
539
|
"when": "its content is changed",
|
|
477
|
-
"then": "the CDN serves the rebuilt page
|
|
540
|
+
"then": "the publish run completes within 15 minutes and the CDN serves the rebuilt page from its cache",
|
|
478
541
|
"hubWhen": {
|
|
479
542
|
"RENDERING": [
|
|
480
543
|
"static"
|
|
544
|
+
],
|
|
545
|
+
"FRAMEWORK": [
|
|
546
|
+
"react",
|
|
547
|
+
"angular",
|
|
548
|
+
"vue",
|
|
549
|
+
"svelte"
|
|
481
550
|
]
|
|
482
551
|
}
|
|
483
552
|
},
|
|
@@ -517,7 +586,7 @@
|
|
|
517
586
|
"label": "Arbitrary value refused",
|
|
518
587
|
"x": 520,
|
|
519
588
|
"y": 1300,
|
|
520
|
-
"given": "a component change",
|
|
589
|
+
"given": "a component or template change",
|
|
521
590
|
"when": "it uses a class with an arbitrary value such as a hex colour in brackets",
|
|
522
591
|
"then": "the lint fails",
|
|
523
592
|
"hubWhen": {
|
|
@@ -542,7 +611,7 @@
|
|
|
542
611
|
"label": "Notice in old browser",
|
|
543
612
|
"x": 520,
|
|
544
613
|
"y": 1560,
|
|
545
|
-
"given": "a browser
|
|
614
|
+
"given": "a browser lacking a feature every supported browser has",
|
|
546
615
|
"when": "the front end is opened",
|
|
547
616
|
"then": "the notice names the supported browsers",
|
|
548
617
|
"hubWhen": {
|
|
@@ -576,7 +645,7 @@
|
|
|
576
645
|
"status": "accepted",
|
|
577
646
|
"date": "",
|
|
578
647
|
"context": "This element is a web front end that people use in their own browsers, on their own devices and networks. The forces: every kilobyte of JavaScript is downloaded, parsed and run on the user's phone, and mid-range phones on mobile networks are where most budgets break; search engines and first visits reward content in the first HTML response, while app-like screens favour rendering in the browser; a framework brings its ecosystem, hiring pool and release cadence, and its majors reach end of support on published dates; a shared design system keeps screens consistent and accessible, but costs effort to build and keep; the browsers to support decide which features and polyfills ship; and accessibility is a legal duty in many markets (European Accessibility Act, ADA, Section 508), cheap when built in and expensive when retrofitted.",
|
|
579
|
-
"decision": "The front end is built with React in TypeScript (strict). Rendering: {{RENDERING}}: Next.js (App Router, server components) for server rendering and static generation, Vite with React Router for a single-page app. Data fetching with TanStack Query; forms with React Hook Form. Design system: {{DESIGN}}. Browsers: {{BROWSERS}}. Budget: LCP {{LCP_MS}} ms, INP {{INP_MS}} ms, CLS {{CLS}} at the 75th percentile, {{JS_KB}} KB of JavaScript per route; WCAG 2.2 AA. Choosing Next.js or React Router (framework mode): Next.js for the widest ecosystem and hosting on Vercel or Node; React Router when you want web-standard loaders and fewer conventions. Versions tracked through endoflife.date (react, nextjs).",
|
|
648
|
+
"decision": "The front end is built with React in TypeScript (strict). Rendering: {{RENDERING}}: Next.js (App Router, server components) for server rendering and static generation, Vite with React Router for a single-page app. Data fetching with TanStack Query; forms with React Hook Form. Design system: {{DESIGN}}. Browsers: {{BROWSERS}}. Budget: LCP {{LCP_MS}} ms, INP {{INP_MS}} ms, CLS {{CLS}} at the 75th percentile of real page loads, {{JS_KB}} KB of JavaScript per route; WCAG 2.2 AA. Dependency updates: as decided in the Dependency hygiene pack. Choosing Next.js or React Router (framework mode): Next.js for the widest ecosystem and hosting on Vercel or Node; React Router when you want web-standard loaders and fewer conventions. Versions tracked through endoflife.date (react, nextjs), each major replaced at least {{EOL_DAYS}} days before its end of support.",
|
|
580
649
|
"consequences": "• The largest ecosystem of components and libraries, and the largest hiring pool.\n• React itself is only the view: routing, data, forms and state are choices to make and keep current.\n• Server components cut the JavaScript sent, but add a server and a new mental model.\n• Next.js majors arrive roughly yearly and change conventions; upgrades are planned work.",
|
|
581
650
|
"alternatives": "1. Angular: everything included and one way of doing it, heavier.\n2. Vue with Nuxt: similar capabilities, gentler learning curve, smaller ecosystem.\n3. Svelte with SvelteKit: smaller bundles, smaller ecosystem.",
|
|
582
651
|
"hubWhen": {
|
|
@@ -595,7 +664,7 @@
|
|
|
595
664
|
"status": "accepted",
|
|
596
665
|
"date": "",
|
|
597
666
|
"context": "This element is a web front end that people use in their own browsers, on their own devices and networks. The forces: every kilobyte of JavaScript is downloaded, parsed and run on the user's phone, and mid-range phones on mobile networks are where most budgets break; search engines and first visits reward content in the first HTML response, while app-like screens favour rendering in the browser; a framework brings its ecosystem, hiring pool and release cadence, and its majors reach end of support on published dates; a shared design system keeps screens consistent and accessible, but costs effort to build and keep; the browsers to support decide which features and polyfills ship; and accessibility is a legal duty in many markets (European Accessibility Act, ADA, Section 508), cheap when built in and expensive when retrofitted.",
|
|
598
|
-
"decision": "The front end is built with Angular in TypeScript (strict), with standalone components, signals and the Angular CLI (esbuild). Rendering: {{RENDERING}}: Angular SSR with hydration for server rendering, prerendering for static pages, the default build for a single-page app. Design system: {{DESIGN}} (Angular Material and the CDK when adopting a library). Browsers: {{BROWSERS}}. Budget: LCP {{LCP_MS}} ms, INP {{INP_MS}} ms, CLS {{CLS}} at the 75th percentile, {{JS_KB}} KB of JavaScript per route
|
|
667
|
+
"decision": "The front end is built with Angular in TypeScript (strict), with standalone components, signals and the Angular CLI (esbuild). Rendering: {{RENDERING}}: Angular SSR with hydration for server rendering, prerendering for static pages, the default build for a single-page app. Design system: {{DESIGN}} (Angular Material and the CDK when adopting a library). Browsers: {{BROWSERS}}. Budget: LCP {{LCP_MS}} ms, INP {{INP_MS}} ms, CLS {{CLS}} at the 75th percentile of real page loads, {{JS_KB}} KB of JavaScript per route; WCAG 2.2 AA. Dependency updates: as decided in the Dependency hygiene pack. The JavaScript budget is also set in angular.json budgets. Each major is supported for 18 months (6 active, 12 LTS), so the front end moves one major at a time with ng update, at least {{EOL_DAYS}} days before the end of support tracked on endoflife.date (angular).",
|
|
599
668
|
"consequences": "• Routing, forms, HTTP, testing and i18n come with the framework: one way of doing things across teams.\n• Larger initial bundles than Svelte or Vue unless routes are lazy-loaded and deferrable views used.\n• A predictable release and support schedule makes the version policy easy to plan.\n• A steeper learning curve (dependency injection, RxJS) for people new to it.",
|
|
600
669
|
"alternatives": "1. React with Next.js: larger ecosystem, more choices to make.\n2. Vue with Nuxt: lighter, less prescriptive.\n3. Server-rendered HTML with htmx: far less JavaScript for forms-and-tables applications.",
|
|
601
670
|
"hubWhen": {
|
|
@@ -614,7 +683,7 @@
|
|
|
614
683
|
"status": "accepted",
|
|
615
684
|
"date": "",
|
|
616
685
|
"context": "This element is a web front end that people use in their own browsers, on their own devices and networks. The forces: every kilobyte of JavaScript is downloaded, parsed and run on the user's phone, and mid-range phones on mobile networks are where most budgets break; search engines and first visits reward content in the first HTML response, while app-like screens favour rendering in the browser; a framework brings its ecosystem, hiring pool and release cadence, and its majors reach end of support on published dates; a shared design system keeps screens consistent and accessible, but costs effort to build and keep; the browsers to support decide which features and polyfills ship; and accessibility is a legal duty in many markets (European Accessibility Act, ADA, Section 508), cheap when built in and expensive when retrofitted.",
|
|
617
|
-
"decision": "The front end is built with Vue 3 in TypeScript, using the Composition API and single-file components. Rendering: {{RENDERING}}: Nuxt for server rendering and static generation, Vite with Vue Router for a single-page app. State in Pinia. Design system: {{DESIGN}}. Browsers: {{BROWSERS}}. Budget: LCP {{LCP_MS}} ms, INP {{INP_MS}} ms, CLS {{CLS}} at the 75th percentile, {{JS_KB}} KB of JavaScript per route; WCAG 2.2 AA. Versions tracked through endoflife.date (vue, nuxt).",
|
|
686
|
+
"decision": "The front end is built with Vue 3 in TypeScript, using the Composition API and single-file components. Rendering: {{RENDERING}}: Nuxt for server rendering and static generation, Vite with Vue Router for a single-page app. State in Pinia. Design system: {{DESIGN}}. Browsers: {{BROWSERS}}. Budget: LCP {{LCP_MS}} ms, INP {{INP_MS}} ms, CLS {{CLS}} at the 75th percentile of real page loads, {{JS_KB}} KB of JavaScript per route; WCAG 2.2 AA. Dependency updates: as decided in the Dependency hygiene pack. Versions tracked through endoflife.date (vue, nuxt), each major replaced at least {{EOL_DAYS}} days before its end of support.",
|
|
618
687
|
"consequences": "• Gentle learning curve and good performance out of the box.\n• Can be adopted gradually inside existing server-rendered pages.\n• A smaller ecosystem and hiring pool than React.\n• Nuxt majors bring migration work; plan them like framework upgrades.",
|
|
619
688
|
"alternatives": "1. React with Next.js: the largest ecosystem.\n2. Svelte with SvelteKit: smaller bundles.\n3. Angular: more included, more prescriptive.",
|
|
620
689
|
"hubWhen": {
|
|
@@ -633,7 +702,7 @@
|
|
|
633
702
|
"status": "accepted",
|
|
634
703
|
"date": "",
|
|
635
704
|
"context": "This element is a web front end that people use in their own browsers, on their own devices and networks. The forces: every kilobyte of JavaScript is downloaded, parsed and run on the user's phone, and mid-range phones on mobile networks are where most budgets break; search engines and first visits reward content in the first HTML response, while app-like screens favour rendering in the browser; a framework brings its ecosystem, hiring pool and release cadence, and its majors reach end of support on published dates; a shared design system keeps screens consistent and accessible, but costs effort to build and keep; the browsers to support decide which features and polyfills ship; and accessibility is a legal duty in many markets (European Accessibility Act, ADA, Section 508), cheap when built in and expensive when retrofitted.",
|
|
636
|
-
"decision": "The front end is built with Svelte 5 (runes) in TypeScript and SvelteKit, whose adapters cover every rendering mode. Rendering: {{RENDERING}}: adapter-node or a platform adapter for server rendering, adapter-static for static pages and single-page apps. Design system: {{DESIGN}}. Browsers: {{BROWSERS}}. Budget: LCP {{LCP_MS}} ms, INP {{INP_MS}} ms, CLS {{CLS}} at the 75th percentile, {{JS_KB}} KB of JavaScript per route; WCAG 2.2 AA. Versions tracked through endoflife.date (svelte).",
|
|
705
|
+
"decision": "The front end is built with Svelte 5 (runes) in TypeScript and SvelteKit, whose adapters cover every rendering mode. Rendering: {{RENDERING}}: adapter-node or a platform adapter for server rendering, adapter-static for static pages and single-page apps. Design system: {{DESIGN}}. Browsers: {{BROWSERS}}. Budget: LCP {{LCP_MS}} ms, INP {{INP_MS}} ms, CLS {{CLS}} at the 75th percentile of real page loads, {{JS_KB}} KB of JavaScript per route; WCAG 2.2 AA. Dependency updates: as decided in the Dependency hygiene pack. Versions tracked through endoflife.date (svelte), each major replaced at least {{EOL_DAYS}} days before its end of support.",
|
|
637
706
|
"consequences": "• Compiled components ship little JavaScript, which makes the budget easy to keep.\n• Simple syntax, quick to learn.\n• A smaller ecosystem: fewer ready-made components and integrations, more built in-house.\n• A smaller hiring pool than React, Angular or Vue.",
|
|
638
707
|
"alternatives": "1. React with Next.js: the largest ecosystem, more JavaScript.\n2. Vue with Nuxt: similar simplicity, larger ecosystem.\n3. Server-rendered HTML with htmx: even less JavaScript, less interactivity.",
|
|
639
708
|
"hubWhen": {
|
|
@@ -652,7 +721,7 @@
|
|
|
652
721
|
"status": "accepted",
|
|
653
722
|
"date": "",
|
|
654
723
|
"context": "This element is a web front end that people use in their own browsers, on their own devices and networks. The forces: every kilobyte of JavaScript is downloaded, parsed and run on the user's phone, and mid-range phones on mobile networks are where most budgets break; search engines and first visits reward content in the first HTML response, while app-like screens favour rendering in the browser; a framework brings its ecosystem, hiring pool and release cadence, and its majors reach end of support on published dates; a shared design system keeps screens consistent and accessible, but costs effort to build and keep; the browsers to support decide which features and polyfills ship; and accessibility is a legal duty in many markets (European Accessibility Act, ADA, Section 508), cheap when built in and expensive when retrofitted.",
|
|
655
|
-
"decision": "The front end is HTML rendered by the back end from templates (Thymeleaf, Razor, Jinja, templ or the back end's own), with htmx swapping parts of the page and Alpine.js for small client-side state; no client-side framework or build step beyond CSS. Rendering:
|
|
724
|
+
"decision": "The front end is HTML rendered by the back end from templates (Thymeleaf, Razor, Jinja, templ or the back end's own), with htmx swapping parts of the page and Alpine.js for small client-side state; no client-side framework or build step beyond CSS. Rendering: every page on the server, with partial updates over HTTP; the rendering question does not apply. Design system: {{DESIGN}}, delivered as template partials. Browsers: {{BROWSERS}}. Budget: LCP {{LCP_MS}} ms, INP {{INP_MS}} ms, CLS {{CLS}} at the 75th percentile of real page loads, {{JS_KB}} KB of JavaScript per route; WCAG 2.2 AA. Dependency updates: as decided in the Dependency hygiene pack. htmx and Alpine.js are pinned dependencies updated like any other; the runtime and framework that render the pages, and their support lifecycle, are decided in the Backend stack pack. Choose it while interactions are forms, tables, filters and dialogs; supersede it when screens need rich client state (offline, drag-and-drop editors, real-time collaboration).",
|
|
656
725
|
"consequences": "• Very little JavaScript, no client-side state to keep in sync, one codebase and one team for front and back end.\n• Fast first loads; every interaction is a request, so latency to the server sets how responsive it feels.\n• Rich client-side interaction is awkward and grows into hand-written JavaScript.\n• Fewer ready-made components; the design system is built as template partials.",
|
|
657
726
|
"alternatives": "1. A single-page app framework (React, Angular, Vue, Svelte): rich interaction, much more JavaScript and a second codebase.\n2. Hotwire (Turbo and Stimulus) or Phoenix LiveView: the same idea tied to Rails or Elixir.\n3. Plain server-rendered pages without htmx: simplest, full reloads.",
|
|
658
727
|
"hubWhen": {
|
|
@@ -662,87 +731,202 @@
|
|
|
662
731
|
}
|
|
663
732
|
},
|
|
664
733
|
{
|
|
665
|
-
"id": "ff-
|
|
734
|
+
"id": "ff-one-framework-react",
|
|
666
735
|
"type": "fitness-fn",
|
|
667
|
-
"label": "
|
|
736
|
+
"label": "Only React",
|
|
668
737
|
"x": 1040,
|
|
669
738
|
"y": 0,
|
|
670
|
-
"
|
|
671
|
-
"
|
|
672
|
-
"
|
|
739
|
+
"characteristic": "maintainability",
|
|
740
|
+
"scope": "atomic",
|
|
741
|
+
"cadence": "triggered",
|
|
742
|
+
"trigger": "pull-request",
|
|
743
|
+
"invocation": "automated",
|
|
744
|
+
"description": "A job in every build reads the dependencies and devDependencies of every package.json in the repository and fails when one names another UI framework's package; a second framework then arrives only with the decision record that allows it and a change to this check. Runs on Linux (git, jq, GNU xargs and grep).\n\nThreshold: 0 package.json files in the repository declare @angular/core, vue, nuxt, svelte, @sveltejs/kit\n\nTool: git with jq and grep (CI job)\n\n```bash\n#!/usr/bin/env bash\n# fails when a package.json anywhere in the repository declares another UI framework\nset -euo pipefail\nother=$(git ls-files -- '*package.json' | xargs -r jq -r '((.dependencies // {}) + (.devDependencies // {})) | keys[]' \\\n | grep -xE '@angular\\/core|vue|nuxt|svelte|@sveltejs\\/kit' || true)\n[ -z \"$other\" ] || { echo \"::error::another UI framework is declared: $(tr '\\n' ' ' <<<\"$other\")(ADR Built with React)\"; exit 1; }\n```",
|
|
745
|
+
"hubWhen": {
|
|
746
|
+
"FRAMEWORK": [
|
|
747
|
+
"react"
|
|
748
|
+
]
|
|
749
|
+
}
|
|
673
750
|
},
|
|
674
751
|
{
|
|
675
|
-
"id": "ff-
|
|
752
|
+
"id": "ff-one-framework-angular",
|
|
676
753
|
"type": "fitness-fn",
|
|
677
|
-
"label": "
|
|
754
|
+
"label": "Only Angular",
|
|
678
755
|
"x": 1040,
|
|
679
756
|
"y": 130,
|
|
680
|
-
"
|
|
681
|
-
"
|
|
682
|
-
"
|
|
757
|
+
"characteristic": "maintainability",
|
|
758
|
+
"scope": "atomic",
|
|
759
|
+
"cadence": "triggered",
|
|
760
|
+
"trigger": "pull-request",
|
|
761
|
+
"invocation": "automated",
|
|
762
|
+
"description": "A job in every build reads the dependencies and devDependencies of every package.json in the repository and fails when one names another UI framework's package; a second framework then arrives only with the decision record that allows it and a change to this check. Runs on Linux (git, jq, GNU xargs and grep).\n\nThreshold: 0 package.json files in the repository declare react, react-dom, next, vue, nuxt, svelte, @sveltejs/kit\n\nTool: git with jq and grep (CI job)\n\n```bash\n#!/usr/bin/env bash\n# fails when a package.json anywhere in the repository declares another UI framework\nset -euo pipefail\nother=$(git ls-files -- '*package.json' | xargs -r jq -r '((.dependencies // {}) + (.devDependencies // {})) | keys[]' \\\n | grep -xE 'react|react-dom|next|vue|nuxt|svelte|@sveltejs\\/kit' || true)\n[ -z \"$other\" ] || { echo \"::error::another UI framework is declared: $(tr '\\n' ' ' <<<\"$other\")(ADR Built with Angular)\"; exit 1; }\n```",
|
|
763
|
+
"hubWhen": {
|
|
764
|
+
"FRAMEWORK": [
|
|
765
|
+
"angular"
|
|
766
|
+
]
|
|
767
|
+
}
|
|
683
768
|
},
|
|
684
769
|
{
|
|
685
|
-
"id": "ff-
|
|
770
|
+
"id": "ff-one-framework-vue",
|
|
686
771
|
"type": "fitness-fn",
|
|
687
|
-
"label": "
|
|
772
|
+
"label": "Only Vue",
|
|
688
773
|
"x": 1040,
|
|
689
774
|
"y": 260,
|
|
690
|
-
"
|
|
691
|
-
"
|
|
692
|
-
"
|
|
775
|
+
"characteristic": "maintainability",
|
|
776
|
+
"scope": "atomic",
|
|
777
|
+
"cadence": "triggered",
|
|
778
|
+
"trigger": "pull-request",
|
|
779
|
+
"invocation": "automated",
|
|
780
|
+
"description": "A job in every build reads the dependencies and devDependencies of every package.json in the repository and fails when one names another UI framework's package; a second framework then arrives only with the decision record that allows it and a change to this check. Runs on Linux (git, jq, GNU xargs and grep).\n\nThreshold: 0 package.json files in the repository declare react, react-dom, next, @angular/core, svelte, @sveltejs/kit\n\nTool: git with jq and grep (CI job)\n\n```bash\n#!/usr/bin/env bash\n# fails when a package.json anywhere in the repository declares another UI framework\nset -euo pipefail\nother=$(git ls-files -- '*package.json' | xargs -r jq -r '((.dependencies // {}) + (.devDependencies // {})) | keys[]' \\\n | grep -xE 'react|react-dom|next|@angular\\/core|svelte|@sveltejs\\/kit' || true)\n[ -z \"$other\" ] || { echo \"::error::another UI framework is declared: $(tr '\\n' ' ' <<<\"$other\")(ADR Built with Vue)\"; exit 1; }\n```",
|
|
781
|
+
"hubWhen": {
|
|
782
|
+
"FRAMEWORK": [
|
|
783
|
+
"vue"
|
|
784
|
+
]
|
|
785
|
+
}
|
|
693
786
|
},
|
|
694
787
|
{
|
|
695
|
-
"id": "ff-
|
|
788
|
+
"id": "ff-one-framework-svelte",
|
|
696
789
|
"type": "fitness-fn",
|
|
697
|
-
"label": "
|
|
790
|
+
"label": "Only Svelte",
|
|
698
791
|
"x": 1040,
|
|
699
792
|
"y": 390,
|
|
700
|
-
"
|
|
701
|
-
"
|
|
702
|
-
"
|
|
793
|
+
"characteristic": "maintainability",
|
|
794
|
+
"scope": "atomic",
|
|
795
|
+
"cadence": "triggered",
|
|
796
|
+
"trigger": "pull-request",
|
|
797
|
+
"invocation": "automated",
|
|
798
|
+
"description": "A job in every build reads the dependencies and devDependencies of every package.json in the repository and fails when one names another UI framework's package; a second framework then arrives only with the decision record that allows it and a change to this check. Runs on Linux (git, jq, GNU xargs and grep).\n\nThreshold: 0 package.json files in the repository declare react, react-dom, next, @angular/core, vue, nuxt\n\nTool: git with jq and grep (CI job)\n\n```bash\n#!/usr/bin/env bash\n# fails when a package.json anywhere in the repository declares another UI framework\nset -euo pipefail\nother=$(git ls-files -- '*package.json' | xargs -r jq -r '((.dependencies // {}) + (.devDependencies // {})) | keys[]' \\\n | grep -xE 'react|react-dom|next|@angular\\/core|vue|nuxt' || true)\n[ -z \"$other\" ] || { echo \"::error::another UI framework is declared: $(tr '\\n' ' ' <<<\"$other\")(ADR Built with Svelte)\"; exit 1; }\n```",
|
|
799
|
+
"hubWhen": {
|
|
800
|
+
"FRAMEWORK": [
|
|
801
|
+
"svelte"
|
|
802
|
+
]
|
|
803
|
+
}
|
|
703
804
|
},
|
|
704
805
|
{
|
|
705
|
-
"id": "ff-
|
|
806
|
+
"id": "ff-one-framework-htmx",
|
|
706
807
|
"type": "fitness-fn",
|
|
707
|
-
"label": "
|
|
808
|
+
"label": "Only htmx",
|
|
708
809
|
"x": 1040,
|
|
709
810
|
"y": 520,
|
|
710
|
-
"
|
|
711
|
-
"
|
|
712
|
-
"
|
|
811
|
+
"characteristic": "maintainability",
|
|
812
|
+
"scope": "atomic",
|
|
813
|
+
"cadence": "triggered",
|
|
814
|
+
"trigger": "pull-request",
|
|
815
|
+
"invocation": "automated",
|
|
816
|
+
"description": "A job in every build reads the dependencies and devDependencies of every package.json in the repository and fails when one names another UI framework's package; a second framework then arrives only with the decision record that allows it and a change to this check. Runs on Linux (git, jq, GNU xargs and grep).\n\nThreshold: 0 package.json files in the repository declare react, react-dom, next, @angular/core, vue, nuxt, svelte, @sveltejs/kit\n\nTool: git with jq and grep (CI job)\n\n```bash\n#!/usr/bin/env bash\n# fails when a package.json anywhere in the repository declares another UI framework\nset -euo pipefail\nother=$(git ls-files -- '*package.json' | xargs -r jq -r '((.dependencies // {}) + (.devDependencies // {})) | keys[]' \\\n | grep -xE 'react|react-dom|next|@angular\\/core|vue|nuxt|svelte|@sveltejs\\/kit' || true)\n[ -z \"$other\" ] || { echo \"::error::another UI framework is declared: $(tr '\\n' ' ' <<<\"$other\")(ADR Built with htmx)\"; exit 1; }\n```",
|
|
817
|
+
"hubWhen": {
|
|
818
|
+
"FRAMEWORK": [
|
|
819
|
+
"htmx"
|
|
820
|
+
]
|
|
821
|
+
}
|
|
713
822
|
},
|
|
714
823
|
{
|
|
715
|
-
"id": "ff-
|
|
824
|
+
"id": "ff-lighthouse",
|
|
716
825
|
"type": "fitness-fn",
|
|
717
|
-
"label": "
|
|
826
|
+
"label": "Lab budget holds",
|
|
718
827
|
"x": 1040,
|
|
719
828
|
"y": 650,
|
|
720
|
-
"
|
|
721
|
-
"
|
|
722
|
-
"
|
|
829
|
+
"characteristic": "performance-efficiency",
|
|
830
|
+
"scope": "atomic",
|
|
831
|
+
"cadence": "triggered",
|
|
832
|
+
"trigger": "pull-request",
|
|
833
|
+
"invocation": "automated",
|
|
834
|
+
"description": "Lighthouse CI starts the preview build, runs three times per main page on its mobile profile and asserts the budget; the median run counts. The script size is the transfer size of every script the page loads, whatever the framework's output paths. INP needs real interactions, so it is checked in the field (see Field vitals). Pages behind sign-in need a puppeteerScript that signs in before the runs.\n\nThreshold: On every pull request, for each main page: script transfer size at most {{JS_KB}} KB, LCP within {{LCP_MS}} ms, CLS at most {{CLS}}, Total Blocking Time within 200 ms (the lab stand-in for INP), accessibility score at least 0.95\n\nTool: Lighthouse CI\n\n```js\n// lighthouserc.cjs\nmodule.exports = {\n ci: {\n collect: {\n startServerCommand: 'npm run preview',\n url: ['http://localhost:4173/', 'http://localhost:4173/search'],\n numberOfRuns: 3,\n // puppeteerScript: './lighthouse-login.cjs', // signs in first, for pages behind sign-in\n },\n assert: {\n assertions: {\n 'resource-summary:script:size': ['error', { maxNumericValue: {{JS_KB}} * 1024, aggregationMethod: 'median' }],\n 'largest-contentful-paint': ['error', { maxNumericValue: {{LCP_MS}}, aggregationMethod: 'median' }],\n 'cumulative-layout-shift': ['error', { maxNumericValue: {{CLS}}, aggregationMethod: 'median' }],\n 'total-blocking-time': ['error', { maxNumericValue: 200, aggregationMethod: 'median' }],\n 'categories:accessibility': ['error', { minScore: 0.95 }],\n },\n },\n upload: { target: 'temporary-public-storage' },\n },\n}\n```"
|
|
723
835
|
},
|
|
724
836
|
{
|
|
725
|
-
"id": "ff-
|
|
837
|
+
"id": "ff-field-vitals",
|
|
726
838
|
"type": "fitness-fn",
|
|
727
|
-
"label": "
|
|
839
|
+
"label": "Field vitals within budget",
|
|
728
840
|
"x": 1040,
|
|
729
841
|
"y": 780,
|
|
730
|
-
"
|
|
731
|
-
"
|
|
732
|
-
"
|
|
842
|
+
"characteristic": "performance-efficiency",
|
|
843
|
+
"scope": "holistic",
|
|
844
|
+
"cadence": "triggered",
|
|
845
|
+
"trigger": "nightly",
|
|
846
|
+
"invocation": "automated",
|
|
847
|
+
"description": "The page reports LCP, INP and CLS from real users with the web-vitals library (navigator.sendBeacon to /rum, which stores name, value and page group in rum_events). A daily job runs the query below, which computes the 75th percentile per metric and page group over the last 28 days and returns every row over budget; any row fails the job and alerts the team.\n\nThreshold: 75th percentile over 28 days per page group: LCP within {{LCP_MS}} ms, INP within {{INP_MS}} ms, CLS at most {{CLS}}; the daily query returns 0 rows\n\nTool: web-vitals (Google Chrome) in the page; a scheduled SQL query over the RUM table (PostgreSQL syntax)\n\n```sql\n-- rum_events(name text, value numeric, page_group text, received_at timestamptz); run daily, alert on any row\nWITH p75 AS (\n SELECT name, page_group, percentile_cont(0.75) WITHIN GROUP (ORDER BY value) AS p75\n FROM rum_events\n WHERE received_at > now() - interval '28 days'\n GROUP BY name, page_group\n)\nSELECT name, page_group, p75\nFROM p75\nWHERE (name = 'LCP' AND p75 > {{LCP_MS}})\n OR (name = 'INP' AND p75 > {{INP_MS}})\n OR (name = 'CLS' AND p75 > {{CLS}})\nORDER BY name, page_group;\n```"
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"id": "ff-axe",
|
|
851
|
+
"type": "fitness-fn",
|
|
852
|
+
"label": "No accessibility violations",
|
|
853
|
+
"x": 1040,
|
|
854
|
+
"y": 910,
|
|
855
|
+
"characteristic": "interaction-capability",
|
|
856
|
+
"scope": "atomic",
|
|
857
|
+
"cadence": "triggered",
|
|
858
|
+
"trigger": "pull-request",
|
|
859
|
+
"invocation": "automated",
|
|
860
|
+
"description": "A Playwright test opens each page of the main journeys, including open dialogs and error states, and runs axe-core with the WCAG A and AA tags; any serious or critical violation fails it.\n\nThreshold: 0 serious or critical axe violations against the WCAG 2.0 and 2.1 A and AA rules and the 2.2 AA rules on every page of the main journeys\n\nTool: axe-core with Playwright (@axe-core/playwright)\n\n```ts\nimport AxeBuilder from '@axe-core/playwright'\nimport { expect, test } from '@playwright/test'\n\nfor (const path of ['/', '/search', '/checkout']) {\n test(`${path} meets WCAG 2.2 AA`, async ({ page }) => {\n await page.goto(path)\n const { violations } = await new AxeBuilder({ page })\n .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa'])\n .analyze()\n expect(violations.filter((v) => v.impact === 'serious' || v.impact === 'critical')).toEqual([])\n })\n}\n```"
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"id": "ff-keyboard",
|
|
864
|
+
"type": "fitness-fn",
|
|
865
|
+
"label": "Main journey by keyboard",
|
|
866
|
+
"x": 1040,
|
|
867
|
+
"y": 1040,
|
|
868
|
+
"characteristic": "interaction-capability",
|
|
869
|
+
"scope": "atomic",
|
|
870
|
+
"cadence": "triggered",
|
|
871
|
+
"trigger": "pull-request",
|
|
872
|
+
"invocation": "automated",
|
|
873
|
+
"description": "A Playwright test walks the main journey without the mouse: it tabs to each control by its accessible name, activates it with Enter or Space, and asserts the focused element is visible after every move; a control that cannot be reached within 200 tabs fails the test.\n\nThreshold: The main journey completes with Tab, Shift+Tab, Enter, Space and the arrow keys only, and focus is visible at every step\n\nTool: Playwright\n\n```ts\nimport { expect, test, type Page } from '@playwright/test'\n\nasync function tabTo(page: Page, name: string): Promise<void> {\n for (let i = 0; i < 200; i++) {\n const focused = page.locator(':focus')\n if ((await focused.count()) && (await focused.textContent())?.includes(name)) { await expect(focused).toBeVisible(); return }\n await page.keyboard.press('Tab')\n }\n throw new Error(`${name} cannot be reached with Tab`)\n}\n\ntest('checkout completes with the keyboard alone', async ({ page }) => {\n await page.goto('/')\n for (const step of ['Search', 'Add to basket', 'Checkout', 'Place order']) {\n await tabTo(page, step)\n await page.keyboard.press('Enter')\n }\n await expect(page.getByRole('heading', { name: 'Order placed' })).toBeVisible()\n})\n```"
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"id": "ff-compat",
|
|
877
|
+
"type": "fitness-fn",
|
|
878
|
+
"label": "Features match browser list",
|
|
879
|
+
"x": 1040,
|
|
880
|
+
"y": 1170,
|
|
881
|
+
"characteristic": "compatibility",
|
|
882
|
+
"scope": "atomic",
|
|
883
|
+
"cadence": "triggered",
|
|
884
|
+
"trigger": "pull-request",
|
|
885
|
+
"invocation": "automated",
|
|
886
|
+
"description": "The browser list lives in package.json and drives the build's transpilation; eslint-plugin-compat fails on a web API one of the listed browsers lacks. Playwright runs the journeys in Chromium, Firefox and WebKit.\n\nThreshold: 0 uses of web features missing from a browser on the list without a configured polyfill\n\nTool: browserslist with eslint-plugin-compat\n\n```js\n// package.json: \"browserslist\" holds the query of the policy, e.g.\n// modern: [\"last 2 Chrome versions\", \"last 2 Edge versions\", \"last 2 Firefox versions\", \"last 2 Safari major versions\"]\n// defaults: [\"defaults\"]\n// extended: [\"> 0.2%\", \"last 3 versions\", \"Firefox ESR\", \"iOS >= 15\", \"not dead\"]\n// eslint.config.mjs\nimport compat from 'eslint-plugin-compat'\nexport default [\n compat.configs['flat/recommended'],\n { settings: { polyfills: ['fetch', 'Promise'] } }, // what the build polyfills\n]\n```"
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
"id": "ff-eol",
|
|
890
|
+
"type": "fitness-fn",
|
|
891
|
+
"label": "Framework still supported",
|
|
892
|
+
"x": 1040,
|
|
893
|
+
"y": 1300,
|
|
894
|
+
"characteristic": "maintainability",
|
|
895
|
+
"scope": "atomic",
|
|
896
|
+
"cadence": "triggered",
|
|
897
|
+
"trigger": "nightly",
|
|
898
|
+
"invocation": "automated",
|
|
899
|
+
"description": "A scheduled job and every build look up each product and cycle listed in versions.txt on endoflife.date (angular, nextjs, nuxt, vue, svelte, nodejs for the build) and fail when end of support is less than {{EOL_DAYS}} days away; versions.txt changes in the same pull request as package.json. The same script serves the Backend stack pack. Runs on Linux (GNU date).\n\nThreshold: 0 framework or build-tool majors within {{EOL_DAYS}} days of their end of support\n\nTool: endoflife.date API (curl and jq)\n\n```bash\n#!/usr/bin/env bash\n# versions.txt: \"<endoflife.date product> <cycle>\", e.g. \"angular 20\", \"nodejs 24\"\nset -euo pipefail\nLIMIT=$(( $(date +%s) + {{EOL_DAYS}} * 86400 ))\nfail=0\nwhile read -r product cycle; do\n eol=$(curl -fsS \"https://endoflife.date/api/${product}/${cycle}.json\" | jq -r '.eol')\n [ \"$eol\" = \"false\" ] && continue\n if [ \"$eol\" = \"true\" ] || [ \"$(date -d \"$eol\" +%s)\" -lt \"$LIMIT\" ]; then\n echo \"::error::$product $cycle reaches end of support on $eol\"; fail=1\n fi\ndone < versions.txt\nexit $fail\n```",
|
|
900
|
+
"hubWhen": {
|
|
901
|
+
"FRAMEWORK": [
|
|
902
|
+
"react",
|
|
903
|
+
"angular",
|
|
904
|
+
"vue",
|
|
905
|
+
"svelte"
|
|
906
|
+
]
|
|
907
|
+
}
|
|
733
908
|
},
|
|
734
909
|
{
|
|
735
910
|
"id": "ff-cache-headers",
|
|
736
911
|
"type": "fitness-fn",
|
|
737
912
|
"label": "Cache headers right",
|
|
738
913
|
"x": 1040,
|
|
739
|
-
"y":
|
|
740
|
-
"
|
|
741
|
-
"
|
|
742
|
-
"
|
|
914
|
+
"y": 1430,
|
|
915
|
+
"characteristic": "performance-efficiency",
|
|
916
|
+
"scope": "atomic",
|
|
917
|
+
"cadence": "triggered",
|
|
918
|
+
"trigger": "deploy",
|
|
919
|
+
"invocation": "automated",
|
|
920
|
+
"description": "After each deploy a check fetches the HTML, takes every script src and stylesheet href from it (absolute, root-relative or relative, whatever the framework emits) and verifies the Cache-Control header of each; a page that references no script or stylesheet fails too, so an empty loop cannot pass.\n\nThreshold: 100% of the scripts and stylesheets the HTML references are served with max-age=31536000, immutable; the HTML with no-cache\n\nTool: curl (post-deploy check)\n\n```bash\n#!/usr/bin/env bash\nset -euo pipefail\nhtml=$(curl -fsSI \"$BASE_URL/\" | tr -d '\\r' | grep -i '^cache-control' || true)\ngrep -qi 'no-cache' <<<\"$html\" || { echo \"index.html: ${html:-no cache-control}\"; exit 1; }\nassets=$(curl -fsS \"$BASE_URL/\" | grep -oE '(src|href)=\"[^\"]+\\.(js|css)(\\?[^\"]*)?\"' | sed -E 's/^[a-z]+=\"//; s/\"$//')\n[ -n \"$assets\" ] || { echo \"no script or stylesheet referenced by $BASE_URL/\"; exit 1; }\nfor asset in $assets; do\n case \"$asset\" in http*) url=$asset ;; /*) url=\"$BASE_URL$asset\" ;; *) url=\"$BASE_URL/$asset\" ;; esac\n cc=$(curl -fsSI \"$url\" | tr -d '\\r' | grep -i '^cache-control' || true)\n grep -qi 'max-age=31536000' <<<\"$cc\" && grep -qi 'immutable' <<<\"$cc\" || { echo \"$url: ${cc:-no cache-control}\"; exit 1; }\ndone\n```",
|
|
743
921
|
"hubWhen": {
|
|
744
922
|
"RENDERING": [
|
|
745
923
|
"spa"
|
|
924
|
+
],
|
|
925
|
+
"FRAMEWORK": [
|
|
926
|
+
"react",
|
|
927
|
+
"angular",
|
|
928
|
+
"vue",
|
|
929
|
+
"svelte"
|
|
746
930
|
]
|
|
747
931
|
}
|
|
748
932
|
},
|
|
@@ -751,25 +935,55 @@
|
|
|
751
935
|
"type": "fitness-fn",
|
|
752
936
|
"label": "Server answers quickly",
|
|
753
937
|
"x": 1040,
|
|
754
|
-
"y":
|
|
755
|
-
"
|
|
756
|
-
"
|
|
757
|
-
"
|
|
938
|
+
"y": 1560,
|
|
939
|
+
"characteristic": "performance-efficiency",
|
|
940
|
+
"scope": "holistic",
|
|
941
|
+
"cadence": "triggered",
|
|
942
|
+
"trigger": "release",
|
|
943
|
+
"invocation": "automated",
|
|
944
|
+
"description": "A k6 test requests the main server-rendered pages at the peak rate (PEAK_RPS from the Capacity and scaling pack's decision, passed in the environment) and checks the time to first byte (http_req_waiting) and that the HTML holds the main content.\n\nThreshold: Time to First Byte within 800 ms at the 75th percentile at the peak rate decided in the Capacity and scaling pack, with the main content in the HTML\n\nTool: Grafana k6\n\n```js\nimport http from 'k6/http'\nimport { check } from 'k6'\n\nexport const options = {\n scenarios: {\n peak: { executor: 'constant-arrival-rate', rate: Number(__ENV.PEAK_RPS), timeUnit: '1s', duration: '5m', preAllocatedVUs: 50, maxVUs: Number(__ENV.PEAK_RPS) },\n },\n thresholds: { http_req_waiting: ['p(75)<800'], http_req_failed: ['rate<0.01'] },\n}\n\nexport default function () {\n const res = http.get(`${__ENV.BASE_URL}/products`)\n check(res, { 'content rendered on the server': (r) => r.body.includes('data-testid=\"product-list\"') })\n}\n```",
|
|
758
945
|
"hubWhen": {
|
|
759
946
|
"RENDERING": [
|
|
760
947
|
"ssr"
|
|
761
948
|
]
|
|
762
949
|
}
|
|
763
950
|
},
|
|
951
|
+
{
|
|
952
|
+
"id": "ff-static-served",
|
|
953
|
+
"type": "fitness-fn",
|
|
954
|
+
"label": "Pages served from the edge",
|
|
955
|
+
"x": 1040,
|
|
956
|
+
"y": 1690,
|
|
957
|
+
"characteristic": "performance-efficiency",
|
|
958
|
+
"scope": "atomic",
|
|
959
|
+
"cadence": "triggered",
|
|
960
|
+
"trigger": "deploy",
|
|
961
|
+
"invocation": "automated",
|
|
962
|
+
"description": "After each publish a check requests every page in the sitemap twice and reads the CDN's cache header of the second response (x-cache for CloudFront, cf-cache-status for Cloudflare, x-vercel-cache for Vercel, cache-status for others); a page not served from the cache fails. It then reads the duration of the last successful publish workflow run. Runs on Linux (GNU date).\n\nThreshold: 100% of the pages in the sitemap answer from the CDN cache on the second request; the last publish run took at most 15 minutes from trigger to completion\n\nTool: curl with the GitHub CLI (post-deploy check)\n\n```bash\n#!/usr/bin/env bash\nset -euo pipefail\nfail=0\nfor url in $(curl -fsS \"$BASE_URL/sitemap.xml\" | grep -oE '<loc>[^<]+</loc>' | sed -E 's#</?loc>##g'); do\n curl -fsS -o /dev/null \"$url\" # warms the edge\n hit=$(curl -fsSI \"$url\" | tr -d '\\r' | grep -iE '^(x-cache|cf-cache-status|x-vercel-cache|cache-status):' || true)\n grep -qi 'hit' <<<\"$hit\" || { echo \"$url: not served from the CDN cache (${hit:-no cache header})\"; fail=1; }\ndone\nrun=$(gh run list --workflow publish.yml --status success --limit 1 --json createdAt,updatedAt -q '.[0]')\ntook=$(( $(date -d \"$(jq -r .updatedAt <<<\"$run\")\" +%s) - $(date -d \"$(jq -r .createdAt <<<\"$run\")\" +%s) ))\n[ \"$took\" -le 900 ] || { echo \"last publish took $((took / 60)) min (15 allowed)\"; fail=1; }\nexit $fail\n```",
|
|
963
|
+
"hubWhen": {
|
|
964
|
+
"RENDERING": [
|
|
965
|
+
"static"
|
|
966
|
+
],
|
|
967
|
+
"FRAMEWORK": [
|
|
968
|
+
"react",
|
|
969
|
+
"angular",
|
|
970
|
+
"vue",
|
|
971
|
+
"svelte"
|
|
972
|
+
]
|
|
973
|
+
}
|
|
974
|
+
},
|
|
764
975
|
{
|
|
765
976
|
"id": "ff-tokens",
|
|
766
977
|
"type": "fitness-fn",
|
|
767
978
|
"label": "Only design tokens",
|
|
768
979
|
"x": 1040,
|
|
769
|
-
"y":
|
|
770
|
-
"
|
|
771
|
-
"
|
|
772
|
-
"
|
|
980
|
+
"y": 1820,
|
|
981
|
+
"characteristic": "maintainability",
|
|
982
|
+
"scope": "atomic",
|
|
983
|
+
"cadence": "triggered",
|
|
984
|
+
"trigger": "pull-request",
|
|
985
|
+
"invocation": "automated",
|
|
986
|
+
"description": "Stylelint requires design-token variables for colour, font size and spacing properties; the token files themselves are exempt.\n\nThreshold: 0 hard-coded colours, font sizes or spacing in stylesheets outside the token files\n\nTool: Stylelint (stylelint-declaration-strict-value)\n\n```json\n{\n \"plugins\": [\"stylelint-declaration-strict-value\"],\n \"rules\": {\n \"color-no-hex\": true,\n \"scale-unlimited/declaration-strict-value\": [\n [\"/color$/\", \"font-size\", \"/^(margin|padding|gap)/\"],\n { \"ignoreValues\": [\"inherit\", \"transparent\", \"currentColor\", \"0\", \"auto\"] }\n ]\n },\n \"ignoreFiles\": [\"src/tokens/**\"]\n}\n```",
|
|
773
987
|
"hubWhen": {
|
|
774
988
|
"DESIGN": [
|
|
775
989
|
"own"
|
|
@@ -781,10 +995,13 @@
|
|
|
781
995
|
"type": "fitness-fn",
|
|
782
996
|
"label": "No library internals styled",
|
|
783
997
|
"x": 1040,
|
|
784
|
-
"y":
|
|
785
|
-
"
|
|
786
|
-
"
|
|
787
|
-
"
|
|
998
|
+
"y": 1950,
|
|
999
|
+
"characteristic": "maintainability",
|
|
1000
|
+
"scope": "atomic",
|
|
1001
|
+
"cadence": "triggered",
|
|
1002
|
+
"trigger": "pull-request",
|
|
1003
|
+
"invocation": "automated",
|
|
1004
|
+
"description": "Stylelint refuses selectors with the library's internal class prefixes, so styling goes through the theme. Adjust the patterns to the library used (MUI: .Mui, Angular Material: .mat-mdc / .mdc-, PrimeNG: .p-, Bootstrap with htmx: its component classes stay, only its internal state classes are listed).\n\nThreshold: 0 selectors targeting the component library's internal class names\n\nTool: Stylelint (selector-disallowed-list)\n\n```json\n{\n \"rules\": {\n \"selector-disallowed-list\": [\n [\"/\\\\.Mui[A-Z]/\", \"/\\\\.mat-mdc-/\", \"/\\\\.mdc-/\", \"/::ng-deep/\"],\n { \"message\": \"Style the component library through its theme (ADR Frontend stack)\" }\n ]\n }\n}\n```",
|
|
788
1005
|
"hubWhen": {
|
|
789
1006
|
"DESIGN": [
|
|
790
1007
|
"library"
|
|
@@ -796,13 +1013,61 @@
|
|
|
796
1013
|
"type": "fitness-fn",
|
|
797
1014
|
"label": "No arbitrary utility values",
|
|
798
1015
|
"x": 1040,
|
|
799
|
-
"y":
|
|
800
|
-
"
|
|
801
|
-
"
|
|
802
|
-
"
|
|
1016
|
+
"y": 2080,
|
|
1017
|
+
"characteristic": "maintainability",
|
|
1018
|
+
"scope": "atomic",
|
|
1019
|
+
"cadence": "triggered",
|
|
1020
|
+
"trigger": "pull-request",
|
|
1021
|
+
"invocation": "automated",
|
|
1022
|
+
"description": "The Tailwind ESLint plugin refuses arbitrary values in class names of JS, TS, JSX, Vue and Svelte files, so colours, spacing and type sizes come from the theme's tokens. Pin the plugin to the Tailwind major: eslint-plugin-tailwindcss 4.x for Tailwind CSS 4 (what shadcn/ui targets), 3.x for Tailwind CSS 3.\n\nThreshold: 0 arbitrary values (such as bg-[#1da1f2]) in class names of components\n\nTool: ESLint (eslint-plugin-tailwindcss)\n\n```js\n// eslint.config.mjs\nimport tailwind from 'eslint-plugin-tailwindcss'\nexport default [\n ...tailwind.configs['flat/recommended'],\n { rules: { 'tailwindcss/no-arbitrary-value': 'error', 'tailwindcss/no-custom-classname': 'warn' } },\n]\n```",
|
|
1023
|
+
"hubWhen": {
|
|
1024
|
+
"DESIGN": [
|
|
1025
|
+
"utility"
|
|
1026
|
+
],
|
|
1027
|
+
"FRAMEWORK": [
|
|
1028
|
+
"react",
|
|
1029
|
+
"angular",
|
|
1030
|
+
"vue",
|
|
1031
|
+
"svelte"
|
|
1032
|
+
]
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
"id": "ff-tailwind-templates",
|
|
1037
|
+
"type": "fitness-fn",
|
|
1038
|
+
"label": "No arbitrary utility values in templates",
|
|
1039
|
+
"x": 1040,
|
|
1040
|
+
"y": 2210,
|
|
1041
|
+
"characteristic": "maintainability",
|
|
1042
|
+
"scope": "atomic",
|
|
1043
|
+
"cadence": "triggered",
|
|
1044
|
+
"trigger": "pull-request",
|
|
1045
|
+
"invocation": "automated",
|
|
1046
|
+
"description": "ESLint never sees server templates, so a grep over the template files fails the build on a utility class with a bracketed arbitrary value; colours, spacing and type sizes come from the theme's tokens. Runs on Linux (GNU grep).\n\nThreshold: 0 arbitrary values (such as bg-[#1da1f2]) in class attributes of server templates\n\nTool: grep (CI job)\n\n```bash\n#!/usr/bin/env bash\n# fails on an arbitrary value (bg-[#1da1f2], w-[13px]) in a class attribute of a server template\nset -euo pipefail\nhits=$(grep -rnE 'class=\"[^\"]*[a-z0-9:-]+-\\[[^]]+\\]' \\\n --include='*.html' --include='*.jinja' --include='*.j2' --include='*.cshtml' --include='*.templ' templates/ src/ 2>/dev/null || true)\n[ -z \"$hits\" ] || { echo \"$hits\"; echo \"arbitrary utility values: take colours, spacing and sizes from the theme (ADR Frontend stack)\"; exit 1; }\n```",
|
|
803
1047
|
"hubWhen": {
|
|
804
1048
|
"DESIGN": [
|
|
805
1049
|
"utility"
|
|
1050
|
+
],
|
|
1051
|
+
"FRAMEWORK": [
|
|
1052
|
+
"htmx"
|
|
1053
|
+
]
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
"id": "ff-browser-notice",
|
|
1058
|
+
"type": "fitness-fn",
|
|
1059
|
+
"label": "Old browsers get the notice",
|
|
1060
|
+
"x": 1040,
|
|
1061
|
+
"y": 2340,
|
|
1062
|
+
"characteristic": "compatibility",
|
|
1063
|
+
"scope": "atomic",
|
|
1064
|
+
"cadence": "triggered",
|
|
1065
|
+
"trigger": "pull-request",
|
|
1066
|
+
"invocation": "automated",
|
|
1067
|
+
"description": "The page runs a small feature detection before the application (a plain script, so it runs in old browsers too) and renders the notice with the supported browsers when a feature every browser on the list has is missing. A unit test checks the detection both ways, so a change to the browser list is paired with a change to the detection.\n\nThreshold: The support detection returns false for a browser lacking a feature every listed browser has and true for a current one; the notice renders on false\n\nTool: Vitest\n\n```ts\nimport { describe, expect, it } from 'vitest'\nimport { isSupported, SUPPORTED } from '../src/browserSupport'\n// src/browserSupport.ts, loaded before the application as a plain script:\n// export const SUPPORTED = 'the last two versions of Chrome, Edge, Firefox and Safari'\n// export const isSupported = (w: Window) => typeof w.structuredClone === 'function' && typeof Array.prototype.at === 'function'\n\ndescribe('outdated browser notice', () => {\n it('a browser without a baseline feature is unsupported', () => {\n expect(isSupported({ structuredClone: undefined } as unknown as Window)).toBe(false)\n })\n it('a current browser is supported', () => {\n expect(isSupported(globalThis as unknown as Window)).toBe(true)\n })\n it('the notice names the supported browsers', () => {\n expect(SUPPORTED).toMatch(/Chrome, Edge, Firefox and Safari/)\n })\n})\n```",
|
|
1068
|
+
"hubWhen": {
|
|
1069
|
+
"BROWSERS": [
|
|
1070
|
+
"modern"
|
|
806
1071
|
]
|
|
807
1072
|
}
|
|
808
1073
|
}
|
|
@@ -976,6 +1241,36 @@
|
|
|
976
1241
|
"targetId": "req-old-devices",
|
|
977
1242
|
"relationType": "verifies"
|
|
978
1243
|
},
|
|
1244
|
+
{
|
|
1245
|
+
"id": "ff-one-framework-react--implements--adr-react",
|
|
1246
|
+
"sourceId": "ff-one-framework-react",
|
|
1247
|
+
"targetId": "adr-react",
|
|
1248
|
+
"relationType": "implements"
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
"id": "ff-one-framework-angular--implements--adr-angular",
|
|
1252
|
+
"sourceId": "ff-one-framework-angular",
|
|
1253
|
+
"targetId": "adr-angular",
|
|
1254
|
+
"relationType": "implements"
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"id": "ff-one-framework-vue--implements--adr-vue",
|
|
1258
|
+
"sourceId": "ff-one-framework-vue",
|
|
1259
|
+
"targetId": "adr-vue",
|
|
1260
|
+
"relationType": "implements"
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
"id": "ff-one-framework-svelte--implements--adr-svelte",
|
|
1264
|
+
"sourceId": "ff-one-framework-svelte",
|
|
1265
|
+
"targetId": "adr-svelte",
|
|
1266
|
+
"relationType": "implements"
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"id": "ff-one-framework-htmx--implements--adr-htmx",
|
|
1270
|
+
"sourceId": "ff-one-framework-htmx",
|
|
1271
|
+
"targetId": "adr-htmx",
|
|
1272
|
+
"relationType": "implements"
|
|
1273
|
+
},
|
|
979
1274
|
{
|
|
980
1275
|
"id": "ff-lighthouse--implements--adr-react",
|
|
981
1276
|
"sourceId": "ff-lighthouse",
|
|
@@ -1037,62 +1332,62 @@
|
|
|
1037
1332
|
"relationType": "implements"
|
|
1038
1333
|
},
|
|
1039
1334
|
{
|
|
1040
|
-
"id": "ff-
|
|
1041
|
-
"sourceId": "ff-
|
|
1335
|
+
"id": "ff-axe--implements--adr-react",
|
|
1336
|
+
"sourceId": "ff-axe",
|
|
1042
1337
|
"targetId": "adr-react",
|
|
1043
1338
|
"relationType": "implements"
|
|
1044
1339
|
},
|
|
1045
1340
|
{
|
|
1046
|
-
"id": "ff-
|
|
1047
|
-
"sourceId": "ff-
|
|
1341
|
+
"id": "ff-axe--implements--adr-angular",
|
|
1342
|
+
"sourceId": "ff-axe",
|
|
1048
1343
|
"targetId": "adr-angular",
|
|
1049
1344
|
"relationType": "implements"
|
|
1050
1345
|
},
|
|
1051
1346
|
{
|
|
1052
|
-
"id": "ff-
|
|
1053
|
-
"sourceId": "ff-
|
|
1347
|
+
"id": "ff-axe--implements--adr-vue",
|
|
1348
|
+
"sourceId": "ff-axe",
|
|
1054
1349
|
"targetId": "adr-vue",
|
|
1055
1350
|
"relationType": "implements"
|
|
1056
1351
|
},
|
|
1057
1352
|
{
|
|
1058
|
-
"id": "ff-
|
|
1059
|
-
"sourceId": "ff-
|
|
1353
|
+
"id": "ff-axe--implements--adr-svelte",
|
|
1354
|
+
"sourceId": "ff-axe",
|
|
1060
1355
|
"targetId": "adr-svelte",
|
|
1061
1356
|
"relationType": "implements"
|
|
1062
1357
|
},
|
|
1063
1358
|
{
|
|
1064
|
-
"id": "ff-
|
|
1065
|
-
"sourceId": "ff-
|
|
1359
|
+
"id": "ff-axe--implements--adr-htmx",
|
|
1360
|
+
"sourceId": "ff-axe",
|
|
1066
1361
|
"targetId": "adr-htmx",
|
|
1067
1362
|
"relationType": "implements"
|
|
1068
1363
|
},
|
|
1069
1364
|
{
|
|
1070
|
-
"id": "ff-
|
|
1071
|
-
"sourceId": "ff-
|
|
1365
|
+
"id": "ff-keyboard--implements--adr-react",
|
|
1366
|
+
"sourceId": "ff-keyboard",
|
|
1072
1367
|
"targetId": "adr-react",
|
|
1073
1368
|
"relationType": "implements"
|
|
1074
1369
|
},
|
|
1075
1370
|
{
|
|
1076
|
-
"id": "ff-
|
|
1077
|
-
"sourceId": "ff-
|
|
1371
|
+
"id": "ff-keyboard--implements--adr-angular",
|
|
1372
|
+
"sourceId": "ff-keyboard",
|
|
1078
1373
|
"targetId": "adr-angular",
|
|
1079
1374
|
"relationType": "implements"
|
|
1080
1375
|
},
|
|
1081
1376
|
{
|
|
1082
|
-
"id": "ff-
|
|
1083
|
-
"sourceId": "ff-
|
|
1377
|
+
"id": "ff-keyboard--implements--adr-vue",
|
|
1378
|
+
"sourceId": "ff-keyboard",
|
|
1084
1379
|
"targetId": "adr-vue",
|
|
1085
1380
|
"relationType": "implements"
|
|
1086
1381
|
},
|
|
1087
1382
|
{
|
|
1088
|
-
"id": "ff-
|
|
1089
|
-
"sourceId": "ff-
|
|
1383
|
+
"id": "ff-keyboard--implements--adr-svelte",
|
|
1384
|
+
"sourceId": "ff-keyboard",
|
|
1090
1385
|
"targetId": "adr-svelte",
|
|
1091
1386
|
"relationType": "implements"
|
|
1092
1387
|
},
|
|
1093
1388
|
{
|
|
1094
|
-
"id": "ff-
|
|
1095
|
-
"sourceId": "ff-
|
|
1389
|
+
"id": "ff-keyboard--implements--adr-htmx",
|
|
1390
|
+
"sourceId": "ff-keyboard",
|
|
1096
1391
|
"targetId": "adr-htmx",
|
|
1097
1392
|
"relationType": "implements"
|
|
1098
1393
|
},
|
|
@@ -1150,42 +1445,6 @@
|
|
|
1150
1445
|
"targetId": "adr-svelte",
|
|
1151
1446
|
"relationType": "implements"
|
|
1152
1447
|
},
|
|
1153
|
-
{
|
|
1154
|
-
"id": "ff-eol--implements--adr-htmx",
|
|
1155
|
-
"sourceId": "ff-eol",
|
|
1156
|
-
"targetId": "adr-htmx",
|
|
1157
|
-
"relationType": "implements"
|
|
1158
|
-
},
|
|
1159
|
-
{
|
|
1160
|
-
"id": "ff-renovate--implements--adr-react",
|
|
1161
|
-
"sourceId": "ff-renovate",
|
|
1162
|
-
"targetId": "adr-react",
|
|
1163
|
-
"relationType": "implements"
|
|
1164
|
-
},
|
|
1165
|
-
{
|
|
1166
|
-
"id": "ff-renovate--implements--adr-angular",
|
|
1167
|
-
"sourceId": "ff-renovate",
|
|
1168
|
-
"targetId": "adr-angular",
|
|
1169
|
-
"relationType": "implements"
|
|
1170
|
-
},
|
|
1171
|
-
{
|
|
1172
|
-
"id": "ff-renovate--implements--adr-vue",
|
|
1173
|
-
"sourceId": "ff-renovate",
|
|
1174
|
-
"targetId": "adr-vue",
|
|
1175
|
-
"relationType": "implements"
|
|
1176
|
-
},
|
|
1177
|
-
{
|
|
1178
|
-
"id": "ff-renovate--implements--adr-svelte",
|
|
1179
|
-
"sourceId": "ff-renovate",
|
|
1180
|
-
"targetId": "adr-svelte",
|
|
1181
|
-
"relationType": "implements"
|
|
1182
|
-
},
|
|
1183
|
-
{
|
|
1184
|
-
"id": "ff-renovate--implements--adr-htmx",
|
|
1185
|
-
"sourceId": "ff-renovate",
|
|
1186
|
-
"targetId": "adr-htmx",
|
|
1187
|
-
"relationType": "implements"
|
|
1188
|
-
},
|
|
1189
1448
|
{
|
|
1190
1449
|
"id": "ff-cache-headers--implements--adr-react",
|
|
1191
1450
|
"sourceId": "ff-cache-headers",
|
|
@@ -1210,12 +1469,6 @@
|
|
|
1210
1469
|
"targetId": "adr-svelte",
|
|
1211
1470
|
"relationType": "implements"
|
|
1212
1471
|
},
|
|
1213
|
-
{
|
|
1214
|
-
"id": "ff-cache-headers--implements--adr-htmx",
|
|
1215
|
-
"sourceId": "ff-cache-headers",
|
|
1216
|
-
"targetId": "adr-htmx",
|
|
1217
|
-
"relationType": "implements"
|
|
1218
|
-
},
|
|
1219
1472
|
{
|
|
1220
1473
|
"id": "ff-ttfb--implements--adr-react",
|
|
1221
1474
|
"sourceId": "ff-ttfb",
|
|
@@ -1246,6 +1499,30 @@
|
|
|
1246
1499
|
"targetId": "adr-htmx",
|
|
1247
1500
|
"relationType": "implements"
|
|
1248
1501
|
},
|
|
1502
|
+
{
|
|
1503
|
+
"id": "ff-static-served--implements--adr-react",
|
|
1504
|
+
"sourceId": "ff-static-served",
|
|
1505
|
+
"targetId": "adr-react",
|
|
1506
|
+
"relationType": "implements"
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
"id": "ff-static-served--implements--adr-angular",
|
|
1510
|
+
"sourceId": "ff-static-served",
|
|
1511
|
+
"targetId": "adr-angular",
|
|
1512
|
+
"relationType": "implements"
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
"id": "ff-static-served--implements--adr-vue",
|
|
1516
|
+
"sourceId": "ff-static-served",
|
|
1517
|
+
"targetId": "adr-vue",
|
|
1518
|
+
"relationType": "implements"
|
|
1519
|
+
},
|
|
1520
|
+
{
|
|
1521
|
+
"id": "ff-static-served--implements--adr-svelte",
|
|
1522
|
+
"sourceId": "ff-static-served",
|
|
1523
|
+
"targetId": "adr-svelte",
|
|
1524
|
+
"relationType": "implements"
|
|
1525
|
+
},
|
|
1249
1526
|
{
|
|
1250
1527
|
"id": "ff-tokens--implements--adr-react",
|
|
1251
1528
|
"sourceId": "ff-tokens",
|
|
@@ -1331,8 +1608,38 @@
|
|
|
1331
1608
|
"relationType": "implements"
|
|
1332
1609
|
},
|
|
1333
1610
|
{
|
|
1334
|
-
"id": "ff-tailwind--implements--adr-htmx",
|
|
1335
|
-
"sourceId": "ff-tailwind",
|
|
1611
|
+
"id": "ff-tailwind-templates--implements--adr-htmx",
|
|
1612
|
+
"sourceId": "ff-tailwind-templates",
|
|
1613
|
+
"targetId": "adr-htmx",
|
|
1614
|
+
"relationType": "implements"
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
"id": "ff-browser-notice--implements--adr-react",
|
|
1618
|
+
"sourceId": "ff-browser-notice",
|
|
1619
|
+
"targetId": "adr-react",
|
|
1620
|
+
"relationType": "implements"
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
"id": "ff-browser-notice--implements--adr-angular",
|
|
1624
|
+
"sourceId": "ff-browser-notice",
|
|
1625
|
+
"targetId": "adr-angular",
|
|
1626
|
+
"relationType": "implements"
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
"id": "ff-browser-notice--implements--adr-vue",
|
|
1630
|
+
"sourceId": "ff-browser-notice",
|
|
1631
|
+
"targetId": "adr-vue",
|
|
1632
|
+
"relationType": "implements"
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
"id": "ff-browser-notice--implements--adr-svelte",
|
|
1636
|
+
"sourceId": "ff-browser-notice",
|
|
1637
|
+
"targetId": "adr-svelte",
|
|
1638
|
+
"relationType": "implements"
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
"id": "ff-browser-notice--implements--adr-htmx",
|
|
1642
|
+
"sourceId": "ff-browser-notice",
|
|
1336
1643
|
"targetId": "adr-htmx",
|
|
1337
1644
|
"relationType": "implements"
|
|
1338
1645
|
}
|