@canonical/summon-application 0.36.0 → 0.38.0

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.
Files changed (39) hide show
  1. package/README.md +57 -7
  2. package/dist/esm/application/react/index.js +97 -35
  3. package/dist/esm/application/react/index.js.map +1 -1
  4. package/dist/esm/application/react/templates/.storybook/decorators/withRouter.tsx +3 -2
  5. package/dist/esm/application/react/templates/.storybook/preview.ts.ejs +4 -2
  6. package/dist/esm/application/react/templates/README.md.ejs +88 -5
  7. package/dist/esm/application/react/templates/index.html.ejs +25 -3
  8. package/dist/esm/application/react/templates/package.json.ejs +22 -1
  9. package/dist/esm/application/react/templates/src/client/entry.tsx.ejs +76 -17
  10. package/dist/esm/application/react/templates/src/domains/account/AccountPage.tsx.ejs +4 -5
  11. package/dist/esm/application/react/templates/src/domains/account/LoginPage.tsx.ejs +4 -5
  12. package/dist/esm/application/react/templates/src/domains/catalog/CatalogPage.tsx.ejs +16 -5
  13. package/dist/esm/application/react/templates/src/domains/catalog/ProductList.tsx.ejs +2 -2
  14. package/dist/esm/application/react/templates/src/domains/contact/ContactPage.tsx.ejs +4 -5
  15. package/dist/esm/application/react/templates/src/domains/marketing/GuidePage.tsx.ejs +4 -10
  16. package/dist/esm/application/react/templates/src/domains/marketing/HomePage.tsx.ejs +13 -5
  17. package/dist/esm/application/react/templates/src/formatDocumentTitle.ts.ejs +21 -0
  18. package/dist/esm/application/react/templates/src/i18n/ar.ts +4 -5
  19. package/dist/esm/application/react/templates/src/i18n/en.ts +4 -5
  20. package/dist/esm/application/react/templates/src/i18n/fr.ts +4 -5
  21. package/dist/esm/application/react/templates/src/lib/ExampleComponent/styles.css +13 -3
  22. package/dist/esm/application/react/templates/src/lib/index.ts.ejs +1 -1
  23. package/dist/esm/application/react/templates/src/routes.tsx.ejs +25 -3
  24. package/dist/esm/application/react/templates/src/server/entry.tsx.ejs +50 -16
  25. package/dist/esm/application/react/templates/src/styles/app.css +23 -13
  26. package/dist/esm/application/react/templates/src/styles/index.css.ejs +27 -0
  27. package/dist/esm/application/react/templates/test/e2e/servers.e2e.ts.ejs +58 -2
  28. package/dist/esm/application/react/templates/tsconfig.json.ejs +3 -0
  29. package/dist/esm/application/react/templates/vite-plugin-ds-icons.ts +69 -0
  30. package/dist/esm/application/react/templates/vite.config.ts.ejs +57 -3
  31. package/dist/esm/domain/index.js +3 -4
  32. package/dist/esm/domain/index.js.map +1 -1
  33. package/dist/esm/route/index.js +2 -3
  34. package/dist/esm/route/index.js.map +1 -1
  35. package/dist/types/application/react/index.d.ts +1 -0
  36. package/dist/types/application/react/index.d.ts.map +1 -1
  37. package/dist/types/domain/index.d.ts.map +1 -1
  38. package/dist/types/route/index.d.ts.map +1 -1
  39. package/package.json +8 -8
package/README.md CHANGED
@@ -6,12 +6,14 @@ Summon generators for scaffolding application structure: full applications, doma
6
6
 
7
7
  ### `summon application/react <name>`
8
8
 
9
- Scaffolds a complete React application with SSR, routing, Storybook, and two starter domains.
9
+ Scaffolds a complete React application with routing, Storybook, and two starter domains — server-rendered by default, or client-only with `--rendering spa`.
10
10
 
11
11
  ```bash
12
12
  summon application/react my-app
13
13
  summon application/react --no-forms my-app
14
+ summon application/react --intl my-app
14
15
  summon application/react --relay my-app
16
+ summon application/react --rendering spa my-app
15
17
  ```
16
18
 
17
19
  Produces:
@@ -27,7 +29,7 @@ my-app/
27
29
  ├── patches/ # bun dependency patches (--relay only)
28
30
  ├── src/
29
31
  │ ├── client/entry.tsx # Client hydration
30
- │ ├── server/
32
+ │ ├── server/ # (omitted with --rendering spa)
31
33
  │ │ ├── entry.tsx # SSR render
32
34
  │ │ ├── server.express.ts # Express dev server
33
35
  │ │ ├── server.bun.ts # Bun dev server
@@ -42,7 +44,8 @@ my-app/
42
44
  │ │ ├── ThemeSelector/
43
45
  │ │ ├── ExampleComponent/
44
46
  │ │ ├── LazyComponent/
45
- │ │ └── ClientOnly/ # SSR query guard (--relay only)
47
+ │ │ └── ClientOnly/ # SSR query guard (--relay only; omitted with --rendering spa)
48
+ │ ├── i18n/ # Locale config, message catalogs (--intl only)
46
49
  │ ├── relay/ # Environment factory, mock schema, __generated__ (--relay only)
47
50
  │ ├── styles/
48
51
  │ ├── routes.tsx
@@ -57,6 +60,44 @@ my-app/
57
60
 
58
61
  Form components are ON by default: the contact domain and its `contactRoutes` wiring in `routes.tsx` ship unless `--no-forms` is passed.
59
62
 
63
+ #### `--intl`: internationalisation
64
+
65
+ Off by default. `--intl` adds locale negotiation (cookie > `Accept-Language` >
66
+ default), per-locale message catalogs for `en`/`fr`/`ar` under `src/i18n/`, a
67
+ `LocaleSelector` in the chrome, the Storybook locale toolbar and its `withI18n`
68
+ decorator, and translated copy across every page. Under `--rendering spa` the same
69
+ negotiation runs in the browser (cookie, then `navigator.languages`) because no
70
+ server saw the request.
71
+
72
+ #### `--rendering spa`: client-only, no SSR layer
73
+
74
+ Off by default — a scaffolded app server-renders. `--rendering spa` is subtractive: it
75
+ emits a strict subset of the default tree, and nothing that is SPA-only.
76
+
77
+ Omitted:
78
+
79
+ - `src/server/` — the SSR entry, the compiled renderer, and the Express and Bun
80
+ dev/preview servers.
81
+ - `src/sitemap/` — `/sitemap.xml` is a server-rendered route, and its renderer
82
+ is the getters' only consumer.
83
+ - `src/lib/ClientOnly/` — an SSR-safety wrapper, so a no-op here.
84
+ - The `dev:*`, `preview:*` and `build:server` scripts, `--ssrManifest` on
85
+ `build:client`, and the `express`, `@canonical/react-ssr`, `@types/express`,
86
+ `tsx` and `bun-types` dependencies.
87
+
88
+ Kept: the e2e suite. Its harness spawns a script and polls HTTP — `vite` and
89
+ `vite preview` are servers too — so the matrix keeps its two non-SSR cells and
90
+ `bun run test:e2e` still covers `dev` and `preview`.
91
+
92
+ **What a SPA gives up.** The client router still performs the auth redirect,
93
+ the `/home` redirect and the not-found route. What is lost is the HTTP status
94
+ on a *cold* request — no 404, 301 or 302 from a server — plus `/sitemap.xml`
95
+ and the server-painted first paint (`<html lang dir>` and the cookie-derived
96
+ theme class), so expect a brief default theme/locale flash. With `--relay` the
97
+ catalog page always suspends and fetches rather than arriving with prefetched
98
+ data. Static hosting needs a history-API fallback the scaffold does not
99
+ configure.
100
+
60
101
  #### `--relay`: Relay (GraphQL) data layer
61
102
 
62
103
  The `--relay` flag (off by default) mirrors the boilerplate's Relay data layer:
@@ -122,7 +163,7 @@ Produces:
122
163
 
123
164
  ```
124
165
  src/domains/billing/
125
- ├── MainPage.tsx # Page component with useHead()
166
+ ├── MainPage.tsx # Page component rendering <Head>
126
167
  └── routes.ts # Route barrel with example route entry
127
168
  ```
128
169
 
@@ -193,8 +234,8 @@ The generators enforce the conventions established by the boilerplate:
193
234
 
194
235
  ```
195
236
  src/
196
- ├── client/ # Client entry point (hydration)
197
- ├── server/ # Server entry points (Express, Bun)
237
+ ├── client/ # Client entry point (hydration; createRoot with --rendering spa)
238
+ ├── server/ # Server entry points (Express, Bun) — omitted with --rendering spa
198
239
  ├── domains/ # Feature domains
199
240
  │ ├── marketing/
200
241
  │ │ ├── HomePage.tsx
@@ -222,6 +263,7 @@ src/
222
263
  │ ├── schema.ts # Executable mock schema (graphql-js)
223
264
  │ └── __generated__/ # Committed relay-compiler artifacts
224
265
  ├── styles/ # CSS
266
+ ├── formatDocumentTitle.ts # Appends the app name to every page's title
225
267
  └── routes.tsx # Root route map, middleware, type registration
226
268
  ```
227
269
 
@@ -251,7 +293,8 @@ export default routes;
251
293
  ```
252
294
 
253
295
  - `content` receives the component directly (not a wrapper function)
254
- - Pages use `useHead()` from `@canonical/react-head` for title and meta
296
+ - Pages render `<Head>` from `@canonical/react-head` for title and meta — one
297
+ owner per document, so a layout or an entry never renders it
255
298
  - No `fetch()` / `warm()` unless needed for cache warming
256
299
  - No `.error` — use React error boundaries
257
300
  - Route files are `.ts` (no JSX in route definitions)
@@ -314,6 +357,13 @@ This enables typed `<Link to="invoices">`, `router.navigate("invoices")`, and `r
314
357
 
315
358
  Design decisions about the generated output that are not yet settled:
316
359
 
360
+ - **A `--rendering spa` app has no sitemap.** `/sitemap.xml` is a server-rendered route, so
361
+ `--rendering spa` drops `src/sitemap/` entirely. The getters themselves are portable — a
362
+ build step could write a static `public/sitemap.xml` and a static host would serve
363
+ it fine — but that is new tooling nothing else needs, and keeping the renderer
364
+ would hold `@canonical/react-ssr` as a dependency for otherwise-dead code.
365
+ **Open:** whether SEO-facing SPAs should get a build-time sitemap emitter.
366
+
317
367
  - **Pinned pragma version is fetched at summon time.** Generated apps pin the pragma
318
368
  workspace packages (`react-ds-global`, `router-core`, `styles`, …) at `^<latest>`, where
319
369
  `<latest>` is queried from the npm registry when the app is scaffolded
@@ -17,13 +17,16 @@ const prompts = [
17
17
  validate: validateAppPath,
18
18
  group: "Application",
19
19
  },
20
- // SSR and the router are NOT prompts: they are always on (the scaffold has no
21
- // SPA arm — every template assumes both), so a question that only ever
22
- // accepted its default was two dead wizard steps and, worse, an unanswerable
23
- // refusal: a default-`true` confirm can be made explicit ONLY by negating it
24
- // (`--no-ssr`/`--no-router`), which the old cross-answer guard then rejected —
25
- // so `create application react` had no reachable all-flags completion. The
26
- // help text states the facts; the flags simply do not exist.
20
+ // The router is NOT a prompt: it is always on (every template assumes it), so
21
+ // a question that only ever accepted its default was a dead wizard step and,
22
+ // worse, an unanswerable refusal — a default-`true` confirm can be made
23
+ // explicit ONLY by negating it (`--no-router`), which the old cross-answer
24
+ // guard then rejected, leaving `create application react` with no reachable
25
+ // all-flags completion. SSR was retired alongside it for the same reason, but
26
+ // the reason has since expired: `rendering` below IS the second answer SSR
27
+ // lacked. It is a select rather than a revived confirm, so its explicit
28
+ // spelling is a VALUE (`--rendering spa`) and never a negation — the shape
29
+ // that made the old pair unanswerable. No cross-answer guard comes back.
27
30
  {
28
31
  name: "forms",
29
32
  type: "confirm",
@@ -38,6 +41,27 @@ const prompts = [
38
41
  default: false,
39
42
  group: "Application",
40
43
  },
44
+ // A select, not a confirm: rendering is an axis with two answers, not a
45
+ // capability you bolt on, and the wizard should show both. Note the frozen
46
+ // covenant's flag array is compared index-wise
47
+ // (kernel/spec/surfaceConformance.ts), and that order derives from this list.
48
+ {
49
+ name: "rendering",
50
+ type: "select",
51
+ message: "Rendering — ssr keeps the server layer (SSR servers and sitemap), spa is client-only",
52
+ choices: [
53
+ {
54
+ label: "ssr - server-side rendering (Express + Bun servers, sitemap)",
55
+ value: "ssr",
56
+ },
57
+ {
58
+ label: "spa - client-only single-page app (no server layer)",
59
+ value: "spa",
60
+ },
61
+ ],
62
+ default: "ssr",
63
+ group: "Application",
64
+ },
41
65
  {
42
66
  name: "relay",
43
67
  type: "confirm",
@@ -74,13 +98,14 @@ export const generator = {
74
98
  meta: {
75
99
  name: "application/react",
76
100
  displayName: "@canonical/summon-application:application/react",
77
- description: "Scaffold a complete React application with SSR and routing",
101
+ description: "Scaffold a complete React application with routing, and either server-side rendering or a client-only SPA",
78
102
  version: packageVersion(),
79
103
  help: `Creates a full React application with:
80
104
  - Vite build + dev server
81
- - Server-side rendering (Express + Bun dev servers)
105
+ - Server-side rendering (Express + Bun dev servers) — the default
106
+ --rendering ssr; --rendering spa omits the whole server layer
82
107
  - Routing with @canonical/router-core
83
- - Head management with @canonical/react-head
108
+ - Head management with @canonical/react-head (SSR-visible <title>/<meta>)
84
109
  - Two domains (marketing + account) with pages
85
110
  - Contact domain with form components (on by default; omit with --no-forms)
86
111
  - Relay (GraphQL) data layer with a local mock schema, catalog example
@@ -89,16 +114,26 @@ export const generator = {
89
114
  - Storybook with router decorator
90
115
  - Biome + TypeScript configuration
91
116
 
92
- SSR and routing are always included; standalone SPA mode is not supported.`,
117
+ Routing is always included. Rendering is a choice: ssr (the default) or spa,
118
+ which omits the server layer entirely — no src/server/, no sitemap, no
119
+ express/tsx/bun-types. Under spa the client router still handles the auth
120
+ redirect, the /home redirect and the not-found route, but a cold request gets
121
+ no 302/301/404 HTTP status and no server-painted first paint, so expect a
122
+ brief default theme/locale flash. A static host will need a history-API
123
+ fallback.`,
93
124
  examples: [
94
125
  "summon application/react my-app",
95
126
  "summon application/react --no-forms my-app",
96
127
  "summon application/react --relay my-app",
128
+ "summon application/react --rendering spa my-app",
97
129
  "summon application/react --no-forms --relay my-app",
98
130
  ],
99
131
  },
100
132
  prompts,
101
133
  generate: (answers) => {
134
+ // One axis, one boolean. The templates gate on `spa`, not on the answer
135
+ // string, so the prompt's shape is not their concern.
136
+ const spa = answers.rendering === "spa";
102
137
  // The app path is a directory path, not a route path — keep it as given
103
138
  // (absolute or relative), only trimming surrounding whitespace and any
104
139
  // trailing slash.
@@ -156,6 +191,7 @@ SSR and routing are always included; standalone SPA mode is not supported.`,
156
191
  forms: answers.forms,
157
192
  intl: answers.intl,
158
193
  relay: answers.relay,
194
+ spa,
159
195
  standalone,
160
196
  pragmaVersion,
161
197
  });
@@ -187,6 +223,14 @@ SSR and routing are always included; standalone SPA mode is not supported.`,
187
223
  // a machine where another manager was detected, say so up front.
188
224
  when(pm !== null && pm !== "bun", warn(`Detected ${pm}, but the generated scripts use \`bun run\` — ` +
189
225
  "install bun to run the app's composite scripts.")),
226
+ // The SPA arm trades away things SSR gives for free. Say so at
227
+ // scaffold time rather than leaving it to the README.
228
+ when(spa, info("Client-only SPA: no src/server/ and no /sitemap.xml. The router " +
229
+ "still handles the auth redirect, the /home redirect and the " +
230
+ "not-found route, but a cold request gets no 302/301/404 HTTP " +
231
+ "status and no server-painted first paint (expect a brief " +
232
+ "default theme/locale flash). Static hosting needs a " +
233
+ "history-API fallback.")),
190
234
  // EJS templates (files needing interpolation)
191
235
  template({
192
236
  source: src("package.json.ejs"),
@@ -216,6 +260,11 @@ SSR and routing are always included; standalone SPA mode is not supported.`,
216
260
  dest: dest("vite.config.ts"),
217
261
  vars,
218
262
  }),
263
+ // Icons delivery: design-system components fetch glyphs at runtime
264
+ // from `/icons/<name>.svg#<name>`; the plugin serves them from
265
+ // @canonical/ds-assets in dev and copies them into the client
266
+ // build output (wired into plugins in vite.config.ts above).
267
+ copy("vite-plugin-ds-icons.ts"),
219
268
  copy("vitest.config.ts"),
220
269
  // vitest setup (EJS — relay-test-utils' jest→vi alias only when --relay)
221
270
  template({
@@ -226,7 +275,8 @@ SSR and routing are always included; standalone SPA mode is not supported.`,
226
275
  copy("vitest.e2e.config.ts"),
227
276
  // Relay compiler config (validates queries against the mock SDL)
228
277
  when(answers.relay, copy("relay.config.json")),
229
- // index.html (EJS — <title> uses the app name)
278
+ // index.html (EJS — the client-only arm titles the shell; the SSR
279
+ // arm leaves the title to the page, which owns it)
230
280
  template({
231
281
  source: src("index.html.ejs"),
232
282
  dest: dest("index.html"),
@@ -259,46 +309,58 @@ SSR and routing are always included; standalone SPA mode is not supported.`,
259
309
  vars,
260
310
  }),
261
311
  copy("src/styles/app.css"),
312
+ // Document title template (EJS — carries the app name). Shared by the
313
+ // client entry, the server entry and the Storybook decorator so every
314
+ // one of them composes page titles the same way.
315
+ template({
316
+ source: src("src/formatDocumentTitle.ts.ejs"),
317
+ dest: dest("src/formatDocumentTitle.ts"),
318
+ vars,
319
+ }),
262
320
  // Client (EJS — RelayEnvironmentProvider only when --relay)
263
321
  template({
264
322
  source: src("src/client/entry.tsx.ejs"),
265
323
  dest: dest("src/client/entry.tsx"),
266
324
  vars,
267
325
  }),
268
- // Server — dev (Vite + HMR) and preview (compiled) servers each route
269
- // between the app + sitemap renderers; the renderers stay routing-agnostic.
326
+ // Server (omitted by the SPA arm) — dev (Vite + HMR) and preview (compiled)
327
+ // servers each route between the app + sitemap renderers; the renderers
328
+ // stay routing-agnostic.
270
329
  // Server entry (EJS — a per-request RelayEnvironmentProvider only when --relay)
271
- template({
330
+ when(!spa, template({
272
331
  source: src("src/server/entry.tsx.ejs"),
273
332
  dest: dest("src/server/entry.tsx"),
274
333
  vars,
275
- }),
276
- template({
334
+ })),
335
+ when(!spa, template({
277
336
  source: src("src/server/renderer.tsx.ejs"),
278
337
  dest: dest("src/server/renderer.tsx"),
279
338
  vars,
280
- }),
281
- template({
339
+ })),
340
+ when(!spa, template({
282
341
  source: src("src/server/server.express.ts.ejs"),
283
342
  dest: dest("src/server/server.express.ts"),
284
343
  vars,
285
- }),
286
- template({
344
+ })),
345
+ when(!spa, template({
287
346
  source: src("src/server/server.bun.ts.ejs"),
288
347
  dest: dest("src/server/server.bun.ts"),
289
348
  vars,
290
- }),
291
- copy("src/server/preview.express.ts"),
292
- copy("src/server/preview.bun.ts"),
293
- // Sitemap (rendered route at /sitemap.xml)
294
- copy("src/sitemap/renderer.ts"),
349
+ })),
350
+ when(!spa, copy("src/server/preview.express.ts")),
351
+ when(!spa, copy("src/server/preview.bun.ts")),
352
+ // Sitemap (rendered route at /sitemap.xml) — omitted by the SPA arm.
353
+ // The getters are portable, but the renderer is the only consumer and it
354
+ // is served at runtime by the servers above; keeping either would hold
355
+ // @canonical/react-ssr as a dependency for dead code.
356
+ when(!spa, copy("src/sitemap/renderer.ts")),
295
357
  // sitemap getters (EJS — /contact entry only when forms is on, /catalog
296
358
  // entry only when relay is on)
297
- template({
359
+ when(!spa, template({
298
360
  source: src("src/sitemap/getSitemapItems.ts.ejs"),
299
361
  dest: dest("src/sitemap/getSitemapItems.ts"),
300
362
  vars,
301
- }),
363
+ })),
302
364
  // Domain: marketing
303
365
  template({
304
366
  source: src("src/domains/marketing/HomePage.tsx.ejs"),
@@ -447,13 +509,13 @@ SSR and routing are always included; standalone SPA mode is not supported.`,
447
509
  copy("src/lib/LazyComponent/LazyComponent.tsx"),
448
510
  copy("src/lib/LazyComponent/LazyComponent.stories.tsx"),
449
511
  copy("src/lib/LazyComponent/index.ts"),
450
- // Lib: ClientOnly (when --relay is enabled — the catalog page is its
451
- // only consumer, keeping Relay queries off the server render until
452
- // SSR data serialization/hydration is supported)
453
- when(answers.relay, copy("src/lib/ClientOnly/ClientOnly.tsx")),
454
- when(answers.relay, copy("src/lib/ClientOnly/ClientOnly.tests.tsx")),
455
- when(answers.relay, copy("src/lib/ClientOnly/index.ts")),
456
- // Lib barrel (EJS — ClientOnly export only when --relay)
512
+ // Lib: ClientOnly (when --relay is enabled, on the SSR arm only — it is
513
+ // an SSR-safety wrapper that defers a subtree past the first hydration
514
+ // pass, which in a client-only app is a guaranteed no-op)
515
+ when(answers.relay && !spa, copy("src/lib/ClientOnly/ClientOnly.tsx")),
516
+ when(answers.relay && !spa, copy("src/lib/ClientOnly/ClientOnly.tests.tsx")),
517
+ when(answers.relay && !spa, copy("src/lib/ClientOnly/index.ts")),
518
+ // Lib barrel (EJS — ClientOnly export only when --relay, on the SSR arm)
457
519
  template({
458
520
  source: src("src/lib/index.ts.ejs"),
459
521
  dest: dest("src/lib/index.ts"),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/application/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAMzC,OAAO,EACL,gBAAgB,EAChB,OAAO,EACP,QAAQ,EACR,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,IAAI,GACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAUvE,MAAM,OAAO,GAAuB;IAClC;QACE,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,6BAA6B;QACtC,OAAO,EAAE,QAAQ;QACjB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,eAAe;QACzB,KAAK,EAAE,aAAa;KACrB;I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IAAI,CAAC,gCAAgC,CAAC;wBAC5C,IAAI;qBACL,CAAC;oBAEF,gFAAgF;oBAChF,IAAI,CAAC,qBAAqB,CAAC;oBAC3B,IAAI,CAAC,iBAAiB,CAAC;oBACvB,IAAI,CAAC,mBAAmB,CAAC;oBAEzB,qEAAqE;oBACrE,qEAAqE;oBACrE,wEAAwE;oBACxE,mEAAmE;oBACnE,WAAW,IAAI,IAAI,CAAC,SAAS,CAAC;oBAE9B,IAAI,CAAC,YAAY,CAAC;iBACnB,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/application/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAMzC,OAAO,EACL,gBAAgB,EAChB,OAAO,EACP,QAAQ,EACR,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,IAAI,GACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAWvE,MAAM,OAAO,GAAuB;IAClC;QACE,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,6BAA6B;QACtC,OAAO,EAAE,QAAQ;QACjB,UAAU,EAAE,IAAI;QAChB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,CAAC,sCAAsC,CAAC;oBAC5C,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,oCAAoC,CAAC,CAAC;oBAC9D,QAAQ,CAAC;wBACP,MAAM,EAAE,GAAG,CAAC,oCAAoC,CAAC;wBACjD,IAAI,EAAE,IAAI,CAAC,gCAAgC,CAAC;wBAC5C,IAAI;qBACL,CAAC;oBAEF,gFAAgF;oBAChF,IAAI,CAAC,qBAAqB,CAAC;oBAC3B,IAAI,CAAC,iBAAiB,CAAC;oBACvB,IAAI,CAAC,mBAAmB,CAAC;oBAEzB,qEAAqE;oBACrE,qEAAqE;oBACrE,wEAAwE;oBACxE,mEAAmE;oBACnE,WAAW,IAAI,IAAI,CAAC,SAAS,CAAC;oBAE9B,IAAI,CAAC,YAAY,CAAC;iBACnB,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -3,6 +3,7 @@ import type { RouteMap } from "@canonical/router-core";
3
3
  import { Outlet } from "@canonical/router-react";
4
4
  import { withHashRouter } from "@canonical/storybook-addon-utils";
5
5
  import type { ElementType } from "react";
6
+ import formatDocumentTitle from "../../src/formatDocumentTitle.js";
6
7
 
7
8
  interface WithRouterOptions {
8
9
  readonly routes?: RouteMap;
@@ -17,7 +18,7 @@ interface WithRouterOptions {
17
18
  * The router itself (`createRouter` + hash adapter + `RouterProvider`) comes
18
19
  * from `@canonical/storybook-addon-utils`, so there is exactly one copy of that
19
20
  * wiring — and one hash listener — across the design system and this app. This
20
- * decorator only adds what is app-specific: the head provider, and the
21
+ * decorator only adds what is app-specific: the head title template, and the
21
22
  * `<Outlet />` that renders matched route content next to the story.
22
23
  *
23
24
  * @example
@@ -29,7 +30,7 @@ interface WithRouterOptions {
29
30
  const withRouter =
30
31
  ({ routes }: WithRouterOptions = {}) =>
31
32
  (Story: ElementType) => (
32
- <HeadProvider>
33
+ <HeadProvider titleTemplate={formatDocumentTitle}>
33
34
  {withHashRouter({ routes })(() => (
34
35
  <>
35
36
  <Story />
@@ -1,11 +1,13 @@
1
+ // The stylesheet comes first, before every component a story can reach: CSS is
2
+ // emitted in the order the bundler evaluates the modules that import it, and
3
+ // the layer order a browser applies is the one it reads first.
4
+ import "../src/styles/index.css";
1
5
  import previewConfig from "@canonical/storybook-config/preview";
2
6
  import type { Preview } from "@storybook/react-vite";
3
7
  <% if (intl) { -%>
4
8
  import { withI18n } from "./decorators/index.js";
5
9
  <% } -%>
6
10
 
7
- import "../src/styles/index.css";
8
-
9
11
  const preview: Preview = {
10
12
  ...previewConfig,
11
13
  <% if (intl) { -%>
@@ -1,5 +1,35 @@
1
1
  # <%= name %>
2
2
 
3
+ <% if (spa) { -%>
4
+ A client-only React single-page application, generated by `@canonical/summon`.
5
+ It is built on Canonical's shared design system and router packages, and ships
6
+ file-based routing, a component library wired to design tokens, and Storybook.
7
+ It was scaffolded with `--rendering spa`, so it has no server layer: see
8
+ [What a SPA gives up](#what-a-spa-gives-up).
9
+
10
+ ## Quick start
11
+
12
+ ```bash
13
+ bun install
14
+ bun run dev # Vite dev server with HMR, on http://localhost:5173
15
+ ```
16
+
17
+ Edit anything under `src/` and the page hot-reloads. To check the production
18
+ build before shipping, run `bun run preview` instead.
19
+
20
+ ## Running the app
21
+
22
+ Two scripts, one for each mode:
23
+
24
+ | `dev` — transform, HMR | `preview` — compiled, production-faithful |
25
+ | ---------------------- | ----------------------------------------- |
26
+ | `bun run dev` | `bun run preview` |
27
+
28
+ Reach for `dev` while building — it is the fast inner loop, with HMR and no
29
+ build step — and for `preview` when verifying that the production bundle behaves
30
+ before a deploy: `preview` builds the client and serves the built assets, the
31
+ same artifact that deploys.
32
+ <% } else { -%>
3
33
  A React application with server-side rendering and routing, generated by
4
34
  `@canonical/summon`. It is built on Canonical's shared design system, router, and
5
35
  SSR packages, and ships SSR on two runtimes (Bun and Node), file-based routing, a
@@ -32,6 +62,7 @@ suffix selects the **SSR runtime**, and the `dev` / `preview` prefix selects the
32
62
  and no build step — and for `preview:*` when verifying that the production bundle
33
63
  behaves before a deploy: `preview:*` builds the client and runs a compiled
34
64
  renderer over the built assets, the same artifact that deploys.
65
+ <% } -%>
35
66
 
36
67
  ```bash
37
68
  bun run storybook # component workshop
@@ -42,10 +73,33 @@ Relay's compiler artifacts are committed, not rebuilt on the fly:
42
73
 
43
74
  ```bash
44
75
  bun run relay # regenerate src/relay/__generated__ after schema/query edits
76
+ <% if (spa) { -%>
77
+ bun run relay:watch # the same, re-running on change — pair with dev
78
+ <% } else { -%>
45
79
  bun run relay:watch # the same, re-running on change — pair with dev:*
80
+ <% } -%>
46
81
  ```
47
82
  <% } -%>
48
83
 
84
+ <% if (spa) { -%>
85
+ ## What a SPA gives up
86
+
87
+ Scaffolded with `--rendering spa`, this app has no server layer. The router still does
88
+ its job in the browser — the auth guard still bounces `/account` to `/login`,
89
+ `/home` still redirects to `/`, and an unmatched path still renders the
90
+ not-found page. What is missing is everything only a server can do:
91
+
92
+ - **No HTTP status on a cold request.** Those three outcomes are 200s to a
93
+ crawler or a `curl`; only in-app navigation sees them as redirects.
94
+ - **No `/sitemap.xml`.**
95
+ - **No server-painted first paint.** `<html lang dir>` and the theme class are
96
+ applied by React on mount, so the first frame uses the defaults.
97
+ - **Static hosting needs a history-API fallback** — every unmatched path must
98
+ serve `index.html`, or deep links 404 at the CDN.
99
+
100
+ Re-scaffold without `--rendering spa` to get the SSR layer back.
101
+
102
+ <% } -%>
49
103
  ## Adding routes
50
104
 
51
105
  `summon` scaffolds the building blocks of the app so new features follow the
@@ -62,6 +116,15 @@ summon wrapper sidebar # a layout wrapper
62
116
  ```bash
63
117
  bun run test # unit + component tests (Vitest, jsdom)
64
118
  bun run test:coverage # the same, with a coverage report
119
+ <% if (spa) { -%>
120
+ bun run test:e2e # boots the dev and preview servers and asserts each serves
121
+ ```
122
+
123
+ `test:e2e` is an end-to-end test *of the build*: it runs both server scripts —
124
+ including the production build that `preview` performs — and asserts that each
125
+ returns a rendered document and serves its client assets with the correct
126
+ content type.
127
+ <% } else { -%>
65
128
  bun run test:e2e # boots all six matrix servers and asserts each serves
66
129
  ```
67
130
 
@@ -69,13 +132,18 @@ bun run test:e2e # boots all six matrix servers and asserts each serves
69
132
  scripts — including the production builds that `preview:*` performs — and asserts
70
133
  that every server returns a rendered document and serves its client assets with
71
134
  the correct content type.
135
+ <% } -%>
72
136
 
73
137
  ## Project structure
74
138
 
75
139
  ```
76
140
  src/
141
+ <% if (spa) { -%>
142
+ ├── client/ Client entry (createRoot)
143
+ <% } else { -%>
77
144
  ├── client/ Client entry (hydration)
78
145
  ├── server/ Server entry, compiled renderer, dev servers, sitemap
146
+ <% } -%>
79
147
  ├── domains/ Feature domains (each owns its routes and pages)
80
148
  ├── lib/ Shared components
81
149
  <% if (relay) { -%>
@@ -86,7 +154,11 @@ src/
86
154
  ├── assets/ Assets imported in code (bundled and hashed by Vite)
87
155
  └── routes.tsx Root route map
88
156
  public/ Files served verbatim at a fixed URL (favicon, robots.txt)
157
+ <% if (spa) { -%>
158
+ test/e2e/ The dev + preview end-to-end suite
159
+ <% } else { -%>
89
160
  test/e2e/ The 2×3 server-matrix end-to-end suite
161
+ <% } -%>
90
162
  ```
91
163
 
92
164
  Domains are the unit of feature organisation: each owns its routes and pages, so
@@ -115,17 +187,28 @@ changes needed.
115
187
  after editing a `graphql` tag or the schema, run `bun run relay` (or keep
116
188
  `bun run relay:watch` running) to regenerate the artifacts, and commit them.
117
189
 
118
- **SSR ships no data yet.** `useLazyLoadQuery` fetches (and suspends) while
119
- rendering, and the server cannot serialize the fetched store for the client
120
- yet, so the catalog page wraps its query subtree in `ClientOnly`
121
- (`src/lib/ClientOnly/`): the server streams the fallback and the browser
122
- fetches after hydration.
190
+ <% if (spa) { -%>
191
+ **Queries run in the browser.** With no server to prefetch against,
192
+ `useLazyLoadQuery` fetches (and suspends) on mount: the catalog page shows its
193
+ Suspense fallback, then renders once the operation resolves.
194
+ <% } else { -%>
195
+ **SSR prefetches declared queries.** `src/routes.tsx` declares `serverQueries`
196
+ per route; the server awaits the matched route's query before rendering and
197
+ serializes the captured operations into `__INITIAL_DATA__.relayPayloads`, which
198
+ the client entry replays into the browser store — so the catalog page arrives
199
+ server-rendered and does not refetch on hydration.
200
+ <% } -%>
123
201
 
124
202
  <% if (standalone) { -%>
125
203
  **Patched dependencies.** `patches/` carries three package patches applied via
126
204
  `patchedDependencies` in `package.json` (a bun feature — with another package
127
205
  manager, apply the equivalent mechanism): `react-relay@21.0.1` needs a
206
+ <% if (spa) { -%>
207
+ cjs-module-lexer export hint so named imports survive Vite's module runner
208
+ (which vitest uses),
209
+ <% } else { -%>
128
210
  cjs-module-lexer export hint so named imports survive Node SSR,
211
+ <% } -%>
129
212
  `relay-runtime@21.0.1` needs real runtime bindings for type-only names its
130
213
  compiler artifacts import as values (`ConcreteRequest`, `ReaderFragment`,
131
214
  `FragmentRefs`), and `relay-runtime-network@0.1.0` ships a broken `imports`