@bleedingdev/modern-js-create 3.2.0-ultramodern.31 → 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/README.md CHANGED
@@ -13,12 +13,36 @@
13
13
  Please follow [Quick Start](https://modernjs.dev/en/guides/get-started/quick-start) to get started with Modern.js.
14
14
 
15
15
  For UltraModern.js, use the BleedingDev create package. It defaults to the
16
- canonical SuperApp workspace and published BleedingDev package aliases:
16
+ canonical Tractor SuperApp workspace and published BleedingDev package aliases:
17
17
 
18
18
  ```bash
19
19
  pnpm dlx @bleedingdev/modern-js-create my-super-app
20
20
  ```
21
21
 
22
+ The default workspace is a full-stack reference, not a visual-only commerce
23
+ boundary demo. It generates:
24
+
25
+ - `apps/shell-super-app` as the Module Federation host and topology owner.
26
+ - `apps/remotes/remote-explore` for discovery UI plus
27
+ `/explore-api/effect/explore/*`.
28
+ - `apps/remotes/remote-decide` for product selection UI plus
29
+ `/decide-api/effect/decide/*`.
30
+ - `apps/remotes/remote-checkout` for cart and checkout UI plus
31
+ `/checkout-api/effect/checkout/*`.
32
+ - `packages/shared-design-tokens` as the shared CSS token owner.
33
+ - `.modernjs/ultramodern-generated-contract.json` with MF, Effect, i18n,
34
+ federated CSS, Cloudflare, and Zephyr dependency metadata.
35
+
36
+ Validate the generated workspace before making application changes:
37
+
38
+ ```bash
39
+ cd my-super-app
40
+ mise install
41
+ mise exec -- pnpm install
42
+ mise exec -- pnpm ultramodern:check
43
+ mise exec -- pnpm build
44
+ ```
45
+
22
46
  ### Router Template
23
47
 
24
48
  You can scaffold a TanStack Router first template:
@@ -86,6 +110,16 @@ npx @modern-js/create catalog-api --microvertical service
86
110
  npx @modern-js/create catalog-contracts --microvertical shared
87
111
  ```
88
112
 
113
+ Use this decision table before adding a package:
114
+
115
+ | Need | Keep inside current vertical | Create a new vertical/package |
116
+ | --- | --- | --- |
117
+ | Route or widget changes with the same product owner, release train, and fallback behavior | Yes | No |
118
+ | Route subtree needs independent rollout, rollback, or incident ownership | No | `--microvertical remote` |
119
+ | Cross-vertical operation needs strict trace, auth, locale, and session propagation | No | `--microvertical service` |
120
+ | Design tokens, primitives, generated clients, or domain-neutral utilities | No | `--microvertical shared` |
121
+ | Feature composites or workflow state shared across verticals | No | Revisit ownership; do not hide it in `shared` |
122
+
89
123
  When a design system needs independent deployment, treat it as a horizontal
90
124
  Module Federation remote with the same topology, trust, SSR, compatibility, and
91
125
  fallback expectations as feature remotes. Otherwise shared packages should be
@@ -107,6 +141,59 @@ UltraModern.js entrypoint. The lower-level `--ultramodern-*` flags remain
107
141
  available for release engineering and local package-source testing, but users
108
142
  should not need them for normal app creation.
109
143
 
144
+ ### Tractor Architecture Contracts
145
+
146
+ The generated shell owns route assembly and policy. The generated Explore,
147
+ Decide, and Checkout remotes own their own route subtree, MF exposes, Effect BFF
148
+ contract, generated client, `localisedUrls`, locale JSON, CSS layer, and
149
+ Cloudflare Worker output. The shell consumes remote UI through MF manifests and
150
+ remote APIs through generated Effect clients exported by the remote packages.
151
+
152
+ Route localization is route-owned. Each app writes
153
+ `src/routes/ultramodern-route-metadata` and passes
154
+ `ultramodernLocalisedUrls` into `@modern-js/plugin-i18n`. Locale JSON is served
155
+ from `/locales/{{lng}}/{{ns}}.json`; Czech and English routes are generated from
156
+ the route owner, not from shell rewrites.
157
+
158
+ CSS federation is explicit:
159
+
160
+ - `packages/shared-design-tokens` exports `./tokens.css` and owns
161
+ `ultramodern-shared-tokens`.
162
+ - The shell owns shell base and overlay CSS only.
163
+ - Vertical remotes own their remote CSS layer and `[data-app-id="<remote>"]`
164
+ root marker.
165
+ - Tailwind CSS v4 is configured per app through `@tailwindcss/postcss`.
166
+ - Duplicate base styles are forbidden; SSR first paint depends on shared token
167
+ CSS plus Modern/Rspack-emitted app CSS.
168
+
169
+ Version switching evidence must keep UI, Effect API, CSS, i18n JSON, and MF
170
+ manifest markers in lockstep for the same vertical version.
171
+
172
+ ### Cloudflare And Zephyr Proof
173
+
174
+ Each generated app has:
175
+
176
+ - `cloudflare:build`, `cloudflare:deploy`, `cloudflare:preview`, and
177
+ `cloudflare:proof` scripts.
178
+ - Cloudflare metadata in `.modernjs/ultramodern-generated-contract.json`.
179
+ - `zephyr:dependencies` for any consumed remotes.
180
+ - `zephyr-rspack-plugin` wired through the generated Modern.js Rspack bridge.
181
+
182
+ Public URL proof is intentionally separate from local build validation:
183
+
184
+ ```bash
185
+ ULTRAMODERN_PUBLIC_URL_REMOTE_EXPLORE=https://remote-explore.example.workers.dev \
186
+ ULTRAMODERN_PUBLIC_URL_REMOTE_DECIDE=https://remote-decide.example.workers.dev \
187
+ ULTRAMODERN_PUBLIC_URL_REMOTE_CHECKOUT=https://remote-checkout.example.workers.dev \
188
+ ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP=https://shell-super-app.example.workers.dev \
189
+ pnpm cloudflare:proof -- --require-public-urls
190
+ ```
191
+
192
+ Live Zephyr switching proof requires Zephyr credentials and public runtime,
193
+ manifest, and API URLs for v1 and v2 of Explore, Decide, and Checkout. Without
194
+ public URLs and credentials, use dry-run evidence only; do not claim live
195
+ Zephyr selection has been proven.
196
+
110
197
  ### Local Monorepo Testing
111
198
 
112
199
  When testing unreleased Modern.js packages from a local monorepo checkout, use
@@ -116,6 +203,16 @@ workspace protocol dependencies:
116
203
  npx @modern-js/create my-app --router tanstack --bff-runtime effect --workspace
117
204
  ```
118
205
 
206
+ For package-source validation of the full Tractor workspace, generate with the
207
+ workspace package source, then run the generated contract gate:
208
+
209
+ ```bash
210
+ npx @modern-js/create tractor-super-app --workspace
211
+ cd tractor-super-app
212
+ mise exec -- pnpm install
213
+ mise exec -- pnpm ultramodern:check
214
+ ```
215
+
119
216
  ## Documentation
120
217
 
121
218
  - [English Documentation](https://modernjs.dev/en/)