@bleedingdev/modern-js-create 3.2.0-ultramodern.30 → 3.2.0-ultramodern.32

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/package.json CHANGED
@@ -21,7 +21,7 @@
21
21
  "engines": {
22
22
  "node": ">=20"
23
23
  },
24
- "version": "3.2.0-ultramodern.30",
24
+ "version": "3.2.0-ultramodern.32",
25
25
  "types": "./dist/types/index.d.ts",
26
26
  "main": "./dist/index.js",
27
27
  "bin": {
@@ -41,7 +41,7 @@
41
41
  "@types/node": "^25.9.1",
42
42
  "@typescript/native-preview": "7.0.0-dev.20260527.2",
43
43
  "tsx": "^4.22.3",
44
- "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.30"
44
+ "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.31"
45
45
  },
46
46
  "publishConfig": {
47
47
  "registry": "https://registry.npmjs.org/",
@@ -54,6 +54,6 @@
54
54
  "start": "node ./dist/index.js"
55
55
  },
56
56
  "ultramodern": {
57
- "frameworkVersion": "3.2.0-ultramodern.30"
57
+ "frameworkVersion": "3.2.0-ultramodern.31"
58
58
  }
59
59
  }
@@ -1,5 +1,19 @@
1
1
  # UltraModern.js 3.0 Starter
2
2
 
3
+ This generated workspace is the Tractor reference SuperApp. It is built around
4
+ one shell and three full-stack Micro Verticals:
5
+
6
+ | Package | Boundary |
7
+ | --- | --- |
8
+ | `apps/shell-super-app` | Module Federation host, route assembly, topology selection, shell fallback policy |
9
+ | `apps/remotes/remote-explore` | Explore routes, MF exposes, locale JSON, CSS layer, and `/explore-api/effect/explore/*` |
10
+ | `apps/remotes/remote-decide` | Decide routes, MF exposes, locale JSON, CSS layer, and `/decide-api/effect/decide/*` |
11
+ | `apps/remotes/remote-checkout` | Checkout routes, MF exposes, locale JSON, CSS layer, and `/checkout-api/effect/checkout/*` |
12
+
13
+ Each vertical is a one-package ownership boundary. Its UI, Effect BFF contract,
14
+ generated client, `localisedUrls`, dynamic locale JSON, CSS, MF manifest, and
15
+ Cloudflare Worker output must move together for version-switching proof.
16
+
3
17
  ## Setup
4
18
 
5
19
  Install the dependencies:
@@ -29,6 +43,14 @@ Validate the generated Ultramodern preset contract locally:
29
43
  mise exec -- pnpm run ultramodern:check
30
44
  ```
31
45
 
46
+ Run the normal local gates before treating the scaffold as adoption-ready:
47
+
48
+ ```bash
49
+ mise exec -- pnpm run check
50
+ mise exec -- pnpm run build
51
+ mise exec -- pnpm run cloudflare:build
52
+ ```
53
+
32
54
  The generated preset defaults are opt-out. Disable specific contracts via env vars:
33
55
 
34
56
  ```bash
@@ -65,6 +87,12 @@ route subtrees and degraded UI, service packages own Effect or explicit Hono
65
87
  contracts, and shared packages are limited to tokens, primitives, generated
66
88
  clients, or domain-neutral utilities.
67
89
 
90
+ Use a new vertical only when the feature needs its own route subtree owner,
91
+ independent rollout, rollback, Cloudflare/Zephyr evidence, or incident routing.
92
+ Keep code inside an existing vertical when it shares the same product owner,
93
+ fallback behavior, release train, and Effect contract. Do not use a shared
94
+ package for feature composites or workflow state.
95
+
68
96
  If the design system needs independent deployment, keep it as a horizontal
69
97
  Module Federation remote with the same topology, trust, SSR compatibility, and
70
98
  fallback rules as the vertical remotes. Do not add a second preset or a
@@ -74,6 +102,73 @@ The public opinionated entrypoint is `presetUltramodern(...)`. It is the default
74
102
  UltraModern.js SuperApp surface for Effect, TanStack, SSR, BFF, and Micro
75
103
  Verticals.
76
104
 
105
+ ## Module Federation And Effect Ownership
106
+
107
+ The shell consumes vertical UI through MF manifests and consumes vertical data
108
+ through generated Effect clients exported by the remote packages:
109
+
110
+ - Explore exposes header, footer, recommendations, store picker, and route UI.
111
+ - Decide exposes product page and route UI, and may consume Explore or Checkout
112
+ remotes through declared `remoteRefs`.
113
+ - Checkout exposes cart, checkout, thanks, mini-cart, add-to-cart, and route UI.
114
+
115
+ The shell owns orchestration and fallback policy. A vertical owns its route-local
116
+ loader/action behavior, degraded UI, `api/effect/index.ts`, shared Effect API
117
+ contract, generated client, and readiness endpoint. Hono remains a compatibility
118
+ lane only when explicitly scaffolded outside the default Tractor workspace.
119
+
120
+ ## I18n And CSS Ownership
121
+
122
+ Route localization is owned by the package that owns the route. Each app emits
123
+ `src/routes/ultramodern-route-metadata` and passes
124
+ `ultramodernLocalisedUrls` to `@modern-js/plugin-i18n`. Dynamic JSON resources
125
+ are served from `/locales/{{lng}}/{{ns}}.json`; shell rewrites must not replace
126
+ remote-owned localized URL maps.
127
+
128
+ CSS federation is recorded in `.modernjs/ultramodern-generated-contract.json`:
129
+
130
+ - `packages/shared-design-tokens` owns `ultramodern-shared-tokens` and exports
131
+ `./tokens.css`.
132
+ - The shell owns shell base and overlay CSS under its app root marker.
133
+ - Each remote owns one vertical CSS layer and one remote app root marker.
134
+ - Tailwind CSS v4 is app-local through `@tailwindcss/postcss`.
135
+ - Duplicate base styles are forbidden. SSR first paint requires shared tokens
136
+ and Modern/Rspack-emitted app CSS.
137
+
138
+ ## Cloudflare And Zephyr Evidence
139
+
140
+ Build all Cloudflare Worker artifacts:
141
+
142
+ ```bash
143
+ MODERN_PUBLIC_SITE_URL=https://shell-super-app.example.test mise exec -- pnpm run cloudflare:build
144
+ ```
145
+
146
+ Validate local or deployed Cloudflare output with the repo harness:
147
+
148
+ ```bash
149
+ node scripts/ultramodern-cloudflare-ssr-validation/validate-cloudflare-ssr.js \
150
+ --root-dir apps/remotes/remote-checkout \
151
+ --bff /checkout-api/effect/checkout/readiness \
152
+ --expect-en "Checkout Remote" \
153
+ --match-build-marker \
154
+ --out .codex/reports/cloudflare-ssr/remote-checkout-local.json
155
+ ```
156
+
157
+ After deploying public Workers, run the generated public URL proof:
158
+
159
+ ```bash
160
+ ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP=https://shell-super-app.example.workers.dev \
161
+ ULTRAMODERN_PUBLIC_URL_REMOTE_EXPLORE=https://remote-explore.example.workers.dev \
162
+ ULTRAMODERN_PUBLIC_URL_REMOTE_DECIDE=https://remote-decide.example.workers.dev \
163
+ ULTRAMODERN_PUBLIC_URL_REMOTE_CHECKOUT=https://remote-checkout.example.workers.dev \
164
+ mise exec -- pnpm run cloudflare:proof -- --require-public-urls
165
+ ```
166
+
167
+ Zephyr upload and live switching proof are opt-in evidence workflows. The
168
+ workspace records `zephyr:dependencies` and wires `zephyr-rspack-plugin`, but
169
+ live proof still requires public manifest, runtime, and API URLs plus Zephyr
170
+ credentials. Without those values, only dry-run Zephyr evidence can be claimed.
171
+
77
172
  Preview the production build locally:
78
173
 
79
174
  ```bash