@bleedingdev/modern-js-main-doc 3.2.0-ultramodern.98 → 3.4.0-ultramodern.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.
- package/docs/en/apis/app/commands.mdx +59 -69
- package/docs/en/community/blog/v2-release-note.mdx +5 -5
- package/docs/en/community/blog/v3-release-note.mdx +1 -1
- package/docs/en/community/releases.mdx +1 -5
- package/docs/en/components/build-output.mdx +1 -1
- package/docs/en/components/debug-app.mdx +1 -1
- package/docs/en/components/deploy-command.mdx +3 -3
- package/docs/en/components/init-app.mdx +23 -51
- package/docs/en/components/prerequisites.mdx +1 -1
- package/docs/en/components/serve-command.mdx +3 -3
- package/docs/en/configure/app/bff/effect.mdx +27 -3
- package/docs/en/configure/app/performance/rsdoctor.mdx +7 -4
- package/docs/en/configure/app/tools/ts-checker.mdx +30 -2
- package/docs/en/configure/app/usage.mdx +6 -6
- package/docs/en/guides/advanced-features/bff/data-platform.mdx +3 -1
- package/docs/en/guides/advanced-features/bff/frameworks.mdx +3 -1
- package/docs/en/guides/advanced-features/international/api.mdx +1 -1
- package/docs/en/guides/advanced-features/international/configuration.mdx +1 -1
- package/docs/en/guides/advanced-features/international/locale-detection.mdx +1 -1
- package/docs/en/guides/advanced-features/international/routing.mdx +5 -3
- package/docs/en/guides/advanced-features/web-server.mdx +12 -0
- package/docs/en/guides/basic-features/debug/rsdoctor.mdx +2 -3
- package/docs/en/guides/basic-features/debug/using-storybook.mdx +1 -1
- package/docs/en/guides/basic-features/deploy.mdx +14 -14
- package/docs/en/guides/basic-features/env-vars.mdx +2 -2
- package/docs/en/guides/basic-features/render/_meta.json +1 -10
- package/docs/en/guides/basic-features/render/overview.mdx +0 -1
- package/docs/en/guides/basic-features/render/rsc.mdx +0 -1
- package/docs/en/guides/basic-features/routes/config-routes.mdx +2 -2
- package/docs/en/guides/basic-features/routes/routes.mdx +25 -10
- package/docs/en/guides/basic-features/testing/rstest.mdx +29 -0
- package/docs/en/guides/concept/server.mdx +2 -2
- package/docs/en/guides/get-started/quick-start.mdx +1 -1
- package/docs/en/guides/get-started/ultramodern.mdx +135 -26
- package/docs/en/guides/topic-detail/module-federation/application.mdx +1 -1
- package/docs/en/guides/topic-detail/module-federation/deploy.mdx +2 -2
- package/docs/en/guides/topic-detail/module-federation/usage.mdx +5 -5
- package/docs/en/guides/troubleshooting/builder.mdx +1 -1
- package/docs/en/guides/upgrade/config.mdx +1 -2
- package/docs/en/guides/upgrade/other.mdx +4 -4
- package/docs/zh/apis/app/commands.mdx +56 -66
- package/docs/zh/community/blog/v2-release-note.mdx +5 -5
- package/docs/zh/community/blog/v3-release-note.mdx +1 -1
- package/docs/zh/community/releases.mdx +1 -5
- package/docs/zh/components/build-output.mdx +1 -1
- package/docs/zh/components/debug-app.mdx +1 -1
- package/docs/zh/components/deploy-command.mdx +3 -3
- package/docs/zh/components/init-app.mdx +16 -47
- package/docs/zh/components/prerequisites.mdx +1 -1
- package/docs/zh/components/serve-command.mdx +3 -3
- package/docs/zh/configure/app/bff/effect.mdx +26 -2
- package/docs/zh/configure/app/performance/rsdoctor.mdx +7 -4
- package/docs/zh/configure/app/tools/ts-checker.mdx +30 -2
- package/docs/zh/configure/app/usage.mdx +6 -6
- package/docs/zh/guides/advanced-features/bff/data-platform.mdx +3 -1
- package/docs/zh/guides/advanced-features/bff/frameworks.mdx +3 -1
- package/docs/zh/guides/advanced-features/international/api.mdx +1 -1
- package/docs/zh/guides/advanced-features/international/configuration.mdx +1 -1
- package/docs/zh/guides/advanced-features/international/locale-detection.mdx +1 -1
- package/docs/zh/guides/advanced-features/international/routing.mdx +5 -3
- package/docs/zh/guides/advanced-features/web-server.mdx +12 -0
- package/docs/zh/guides/basic-features/debug/rsdoctor.mdx +2 -3
- package/docs/zh/guides/basic-features/debug/using-storybook.mdx +1 -1
- package/docs/zh/guides/basic-features/deploy.mdx +13 -13
- package/docs/zh/guides/basic-features/env-vars.mdx +2 -2
- package/docs/zh/guides/basic-features/render/_meta.json +1 -10
- package/docs/zh/guides/basic-features/render/overview.mdx +0 -1
- package/docs/zh/guides/basic-features/render/rsc.mdx +0 -1
- package/docs/zh/guides/basic-features/routes/config-routes.mdx +2 -2
- package/docs/zh/guides/basic-features/routes/routes.mdx +25 -10
- package/docs/zh/guides/basic-features/testing/rstest.mdx +29 -0
- package/docs/zh/guides/concept/server.mdx +2 -2
- package/docs/zh/guides/get-started/quick-start.mdx +1 -1
- package/docs/zh/guides/get-started/ultramodern.mdx +121 -22
- package/docs/zh/guides/topic-detail/module-federation/application.mdx +1 -1
- package/docs/zh/guides/topic-detail/module-federation/deploy.mdx +2 -2
- package/docs/zh/guides/topic-detail/module-federation/usage.mdx +5 -5
- package/docs/zh/guides/troubleshooting/builder.mdx +1 -1
- package/docs/zh/guides/upgrade/config.mdx +1 -2
- package/docs/zh/guides/upgrade/other.md +4 -4
- package/package.json +17 -14
- package/rspress.config.ts +17 -5
- package/src/components/Footer/index.tsx +3 -3
- package/src/components/Footer/styles.module.scss +1 -1
- package/src/components/Mermaid/style.scss +52 -52
- package/src/components/RandomMemberList/index.module.scss +8 -8
- package/src/components/SecondaryTitle/index.module.css +7 -2
- package/src/components/ShowcaseList/index.module.scss +1 -1
- package/src/components/ShowcaseList/useShowcases.ts +23 -65
- package/src/i18n/enUS.ts +0 -9
- package/src/i18n/zhCN.ts +0 -9
- package/src/pages/index.module.scss +6 -6
- package/src/sandbox/csr-auth/src/routes/page-tsx.txt +1 -1
- package/static/img/logo.svg +7 -0
- package/static/img/social-card.svg +12 -0
- package/builder-doc/docs/en/config/performance/rsdoctor.md +0 -37
- package/builder-doc/docs/zh/config/performance/rsdoctor.md +0 -37
- package/docs/en/guides/basic-features/render/tanstack-rsc.mdx +0 -226
- package/docs/zh/guides/basic-features/render/tanstack-rsc.mdx +0 -226
- package/main-doc/docs/en/guides/get-started/ultramodern.mdx +0 -403
- package/main-doc/docs/zh/guides/get-started/ultramodern.mdx +0 -363
|
@@ -1,403 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: UltraModern.js 3.0
|
|
3
|
-
sidebar_position: 6
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# UltraModern.js 3.0 vs Modern.js 3.0
|
|
7
|
-
|
|
8
|
-
UltraModern.js 3.0 is our SuperApp framework forked from Modern.js for large, independently deployable super-app and ERP-style systems.
|
|
9
|
-
|
|
10
|
-
This page is the complete public difference reference for the UltraModern.js 3.0 framework line.
|
|
11
|
-
|
|
12
|
-
## Scope (3.0 Only)
|
|
13
|
-
|
|
14
|
-
- Baseline: the current merged Modern.js `release-v3.x` baseline tracked by this fork; this page should not be read as a frozen patch-version comparison.
|
|
15
|
-
- Scope: all user-visible differences shipped in UltraModern.js 3.0.
|
|
16
|
-
- Excluded: roadmap/mainline-only work that is not shipped to UltraModern.js 3.0.
|
|
17
|
-
|
|
18
|
-
## Complete Difference Matrix (3.0)
|
|
19
|
-
|
|
20
|
-
| Area | Modern.js 3.0 baseline | UltraModern.js 3.0 difference | Status in 3.0 | Notes |
|
|
21
|
-
| --- | --- | --- | --- | --- |
|
|
22
|
-
| Build diagnostics default | RsDoctor usage is opt-in in most projects | Rspack production build enables RsDoctor by default | Implemented | Can be disabled via `performance.rsdoctor` |
|
|
23
|
-
| Build diagnostics config surface | No `performance.rsdoctor` option in framework docs | Adds `performance.rsdoctor` (`boolean` or `{ enabled, disableClientServer, reportDir, mode }`) | Implemented | `disableClientServer` defaults to `true` |
|
|
24
|
-
| Diagnostics artifact contract | No standardized machine-readable diagnostics pointer | Adds `.rsdoctor/ultramodern-diagnostics.json` contract pointing to manifest | Implemented | Stable consumption path for coding agents |
|
|
25
|
-
| Static asset precompression defaults | Precompressed artifacts and serving are app-defined | Adds default-on `output.precompress` for production web builds and static middleware `Accept-Encoding` negotiation for `.br` / `.gz` | Implemented | Can be disabled or tuned per codec |
|
|
26
|
-
| Router runtime choice | Default runtime path centers on React Router | Adds first-class TanStack Router runtime/CLI route tree support | Implemented | React Router path remains available |
|
|
27
|
-
| Scaffolding template path | Default create templates center on React Router starter path | Adds TanStack-ready and Tailwind-ready create templates | Implemented | React Router starter path remains available |
|
|
28
|
-
| Starter preset gate workflow | Generated starter has no UltraModern preset verification workflow | Adds `ultramodern:check`, opt-out env switches, and `.github/workflows/ultramodern-gates.yml` to the public preset starter | Implemented | Keeps generated apps auditable from the first commit |
|
|
29
|
-
| BFF producer contract wiring | `bff` config does not include producer identity | Adds `bff.requestId` and carries it through client generation | Implemented | Enables explicit producer scoping |
|
|
30
|
-
| Generated BFF client call shape | `createRequest(...)` optional args stop at `fetch` | Generated client appends `requestId` to `createRequest(...)` when configured | Implemented | Keeps legacy call path when no `requestId` |
|
|
31
|
-
| `create-request` runtime isolation | Single mutable request config path | Per-`requestId` request/domain/header config maps | Implemented | Supports multiple producer clients in one app |
|
|
32
|
-
| BFF audit correlation headers | No standardized producer audit propagation for operation and trace | Adds `x-operation-id`, `x-modernjs-bff-operation-context`, and `traceparent` propagation with parsed trace IDs | Implemented | Supports tenant/operation/trace joins in observability |
|
|
33
|
-
| Uninitialized producer behavior | Missing config may silently fall back | Non-default `requestId` now throws `ProducerClientNotInitializedError` | Implemented | Fail-fast contract for cross-project BFF |
|
|
34
|
-
| Node header forwarding behavior | Header forwarding is global | Incoming headers are forwarded only for `requestId === 'default'` | Implemented | Avoids accidental header bleed across producers |
|
|
35
|
-
| Server telemetry config | No standardized `server.telemetry` contract | Adds `server.telemetry` with sampling/batching/redaction/exporter settings | Implemented | Added to app-tools schema and server types |
|
|
36
|
-
| Telemetry exporters | Export pipeline is app-defined | Built-in OTLP and VictoriaMetrics exporters | Implemented | Exporters are non-fatal on failure |
|
|
37
|
-
| Telemetry backpressure contract | No standard queue policy | Registry queue with max size, dropped-event counter, periodic flush | Implemented | Emits `telemetry.queue.dropped` on pressure |
|
|
38
|
-
| Metrics/trace correlation | SSR metrics tags do not parse W3C trace context | `traceparent` is parsed and emits `trace_id` / `span_id` tags | Implemented | Improves cross-system observability joins |
|
|
39
|
-
| App-level MF SSR contract flag | No dedicated app-level MF SSR stability contract switch | Adds `server.ssr.moduleFederationAppSSR` contract and auto-enables env wiring when MF SSR markers are detected | Implemented | Sets `process.env.MODERN_MF_APP_SSR` |
|
|
40
|
-
| App-level MF SSR runtime bridge | Not a stable default bridge path | V3 applies stable bridge defaults for MF SSR node output/runtime env when server rendering + MF markers are present | Implemented | Keeps explicit opt-out path via config/env |
|
|
41
|
-
| MF vertical loading reliability contracts | Loading fallback patterns are typically app-defined | Adds deterministic timeout/network/contract-error fallback matrix and distributed OTEL continuity assertions | Implemented | `routes-tanstack-mf` reliability suite |
|
|
42
|
-
| BFF runtime choices | Hono runtime path only in Modern.js 3.0 baseline (no built-in Effect runtime path) | Sets Effect as default runtime, enforces strict runtime split (`effect` -> `api/effect`, `hono` -> `api/lambda`), and adds Effect-Schema-only MF data contracts plus failure-injection coverage for federated data fetch | Implemented (Effect-default + strict split) | Stream is explicit about no Zod introduction |
|
|
43
|
-
| Module SDK contract artifact | No framework-level module contract artifact | Adds machine-readable module contract + typed module SDK interfaces | Implemented | `module-sdk-contracts.json` + `moduleSdk.d.ts` |
|
|
44
|
-
| Boundary anti-pattern CI guards | No dedicated boundary anti-pattern workflow | Adds profile-driven CI checks for boundary imports, required hooks, and forbidden module patterns | Implemented | `.github/workflows/boundary-anti-patterns.yml` |
|
|
45
|
-
| Release/module certification gate automation | No super-app release evidence profile in baseline | Adds RC + module-certification gate profiles, evidence metadata validation, and dedicated CI workflows | Implemented | `.github/workflows/release-contract-gates.yml` + module/bun gate workflows |
|
|
46
|
-
| Contract test coverage | No tests for these new contracts in the tracked Modern.js 3.x baseline | Adds focused tests for RsDoctor defaults, BFF requestId, telemetry, SSR MF contract env wiring | Implemented | Reduces regression risk in super-app scenarios |
|
|
47
|
-
| Public docs surface | No UltraModern V3 comparison page | Adds dedicated V3 difference page and linked config docs | Implemented | This page is the reference page for the public preset profile |
|
|
48
|
-
|
|
49
|
-
## Detailed 3.0 Differences
|
|
50
|
-
|
|
51
|
-
### 1) `performance.rsdoctor` and default-on diagnostics
|
|
52
|
-
|
|
53
|
-
UltraModern.js 3.0 extends performance config with:
|
|
54
|
-
|
|
55
|
-
- `performance.rsdoctor: boolean | { enabled?: boolean; disableClientServer?: boolean; reportDir?: string; mode?: 'normal' | 'brief' | 'lite' }`
|
|
56
|
-
- Rspack + production: enabled by default.
|
|
57
|
-
- Rspack + development: disabled by default (unless explicitly enabled).
|
|
58
|
-
- Webpack builds: no RsDoctor injection.
|
|
59
|
-
- RsDoctor contract artifact:
|
|
60
|
-
- `<reportDir or outputPath>/.rsdoctor/ultramodern-diagnostics.json`
|
|
61
|
-
- points to `.rsdoctor/manifest.json`
|
|
62
|
-
|
|
63
|
-
```ts title="modern.config.ts"
|
|
64
|
-
export default defineConfig({
|
|
65
|
-
performance: {
|
|
66
|
-
rsdoctor: {
|
|
67
|
-
enabled: true,
|
|
68
|
-
disableClientServer: true,
|
|
69
|
-
reportDir: './artifacts',
|
|
70
|
-
mode: 'brief',
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### 2) Cross-project BFF hardening with `requestId`
|
|
77
|
-
|
|
78
|
-
UltraModern.js 3.0 adds explicit producer identity across the BFF toolchain:
|
|
79
|
-
|
|
80
|
-
- `bff.requestId` in plugin config.
|
|
81
|
-
- Loader/client generation passes `requestId` to `createRequest(...)`.
|
|
82
|
-
- `create-request` now keeps isolated runtime state per `requestId`.
|
|
83
|
-
|
|
84
|
-
```ts
|
|
85
|
-
configure({
|
|
86
|
-
requestId: 'erp-inventory',
|
|
87
|
-
request: customFetch,
|
|
88
|
-
setDomain: ({ target, requestId }) =>
|
|
89
|
-
target === 'server'
|
|
90
|
-
? `http://inventory-bff.internal`
|
|
91
|
-
: `https://inventory.example.com`,
|
|
92
|
-
});
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Contract behavior in 3.0:
|
|
96
|
-
|
|
97
|
-
- Non-default producer calls without prior `configure({ requestId })` throw `ProducerClientNotInitializedError`.
|
|
98
|
-
- `allowedHeaders` / `request` / `setDomain` are isolated by `requestId`.
|
|
99
|
-
- In Node runtime, incoming request headers are only forwarded for the legacy `default` producer path.
|
|
100
|
-
- Non-default producer calls emit operation context and trace correlation headers:
|
|
101
|
-
- `x-operation-id`
|
|
102
|
-
- `x-modernjs-bff-operation-context`
|
|
103
|
-
- `traceparent` (with parsed `traceId` / `spanId` reflected in operation context when present)
|
|
104
|
-
|
|
105
|
-
### 3) `server.telemetry` standardization and exporters
|
|
106
|
-
|
|
107
|
-
UltraModern.js 3.0 adds a unified telemetry contract:
|
|
108
|
-
|
|
109
|
-
- Config surface in `server.telemetry`.
|
|
110
|
-
- Internal registry with sampling, batching, redaction, backpressure handling.
|
|
111
|
-
- Built-in exporters for OTLP and VictoriaMetrics.
|
|
112
|
-
- Metrics wrapper that mirrors `emitCounter` / `emitTimer` into telemetry envelopes.
|
|
113
|
-
|
|
114
|
-
```ts title="modern.config.ts"
|
|
115
|
-
export default defineConfig({
|
|
116
|
-
server: {
|
|
117
|
-
telemetry: {
|
|
118
|
-
enabled: true,
|
|
119
|
-
service: 'erp-gateway',
|
|
120
|
-
module: 'server',
|
|
121
|
-
environment: 'production',
|
|
122
|
-
samplingRate: 1,
|
|
123
|
-
flushIntervalMs: 1000,
|
|
124
|
-
maxBatchSize: 50,
|
|
125
|
-
maxQueueSize: 1000,
|
|
126
|
-
redactionKeys: ['authorization', 'token'],
|
|
127
|
-
exporters: {
|
|
128
|
-
otlp: {
|
|
129
|
-
enabled: true,
|
|
130
|
-
endpoint: 'http://otel-collector:4318/v1/logs',
|
|
131
|
-
},
|
|
132
|
-
victoriaMetrics: {
|
|
133
|
-
enabled: true,
|
|
134
|
-
endpoint: 'http://vm:8428/api/v1/import/prometheus',
|
|
135
|
-
metricPrefix: 'ultramodern',
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
});
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Important V3 behavior:
|
|
144
|
-
|
|
145
|
-
- If no exporter is enabled, telemetry pipeline is not initialized.
|
|
146
|
-
- Exporter failures are treated as non-fatal for request handling.
|
|
147
|
-
|
|
148
|
-
### 4) Trace tags in SSR metrics
|
|
149
|
-
|
|
150
|
-
When an incoming request contains W3C `traceparent`, UltraModern.js 3.0 parses and injects:
|
|
151
|
-
|
|
152
|
-
- `trace_id`
|
|
153
|
-
- `span_id`
|
|
154
|
-
|
|
155
|
-
into SSR metric tags, improving correlation between app metrics and distributed tracing backends.
|
|
156
|
-
|
|
157
|
-
### 5) App-level MF SSR stable contract (`server.ssr.moduleFederationAppSSR`)
|
|
158
|
-
|
|
159
|
-
UltraModern.js 3.0 adds:
|
|
160
|
-
|
|
161
|
-
- Preferred flag: `server.ssr.moduleFederationAppSSR` (also works under `server.ssrByEntries`).
|
|
162
|
-
- Global compile-time env:
|
|
163
|
-
- `process.env.MODERN_MF_APP_SSR` (`'true' | 'false'`)
|
|
164
|
-
|
|
165
|
-
```ts title="modern.config.ts"
|
|
166
|
-
export default defineConfig({
|
|
167
|
-
server: {
|
|
168
|
-
ssr: {
|
|
169
|
-
moduleFederationAppSSR: true,
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
});
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
When MF SSR markers are detected in server-rendered entries, V3 now enables the same env/bridge contract path by default and keeps config/env switches as explicit opt-out controls.
|
|
176
|
-
|
|
177
|
-
### 6) Contract-level test hardening in V3
|
|
178
|
-
|
|
179
|
-
UltraModern.js 3.0 adds dedicated coverage for:
|
|
180
|
-
|
|
181
|
-
- RsDoctor default behavior and opt-out semantics.
|
|
182
|
-
- BFF `requestId` generation/runtime isolation and fail-fast checks.
|
|
183
|
-
- Telemetry redaction/backpressure/exporter behavior.
|
|
184
|
-
- SSR MF contract detection and env injection.
|
|
185
|
-
|
|
186
|
-
### 7) Module SDK contract + boundary anti-pattern guards
|
|
187
|
-
|
|
188
|
-
UltraModern.js 3.0 adds platform-boundary enforcement artifacts for module onboarding:
|
|
189
|
-
|
|
190
|
-
- Contract artifact: `docs/super-app-rfc-adr/contracts/module-sdk-contracts.json`
|
|
191
|
-
- Example manifest: `docs/super-app-rfc-adr/contracts/module-manifest.example.json`
|
|
192
|
-
- Public type contracts: `packages/toolkit/types/common/moduleSdk.d.ts`
|
|
193
|
-
- Validation tooling:
|
|
194
|
-
- `scripts/module-sdk-contracts/validate-module-sdk-contracts.js`
|
|
195
|
-
- `scripts/boundary-guards/check-boundary-violations.js`
|
|
196
|
-
- CI workflow:
|
|
197
|
-
- `.github/workflows/boundary-anti-patterns.yml`
|
|
198
|
-
- `.github/workflows/module-certification-gates.yml`
|
|
199
|
-
- `.github/workflows/bun-superapp-smoke.yml`
|
|
200
|
-
|
|
201
|
-
### 8) Default precompression + precompressed static serving
|
|
202
|
-
|
|
203
|
-
UltraModern.js 3.0 changes default output and serving behavior for production web assets:
|
|
204
|
-
|
|
205
|
-
- `output.precompress` defaults to `true` in app-tools config.
|
|
206
|
-
- Build emits gzip (`.gz`) and brotli (`.br`) variants for static assets.
|
|
207
|
-
- Node static middleware selects precompressed variants via `Accept-Encoding` and sets:
|
|
208
|
-
- `Content-Encoding`
|
|
209
|
-
- `Vary: Accept-Encoding`
|
|
210
|
-
- Codec-level tuning is supported per project (`gzip` / `brotli` options).
|
|
211
|
-
|
|
212
|
-
```ts title="modern.config.ts"
|
|
213
|
-
export default defineConfig({
|
|
214
|
-
output: {
|
|
215
|
-
precompress: {
|
|
216
|
-
gzip: true,
|
|
217
|
-
brotli: {
|
|
218
|
-
threshold: 8 * 1024,
|
|
219
|
-
},
|
|
220
|
-
},
|
|
221
|
-
},
|
|
222
|
-
});
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
### 9) First-class TanStack Router + Tailwind scaffolding
|
|
226
|
-
|
|
227
|
-
UltraModern.js 3.0 adds a first-class TanStack path in runtime and project scaffolding:
|
|
228
|
-
|
|
229
|
-
- Runtime/CLI support for TanStack route tree generation and SSR/stream integration.
|
|
230
|
-
- Create templates include TanStack-ready scaffolds and Tailwind starter wiring.
|
|
231
|
-
- Dedicated integration suites cover:
|
|
232
|
-
- `tests/integration/routes-tanstack`
|
|
233
|
-
- `tests/integration/routes-tanstack-mf`
|
|
234
|
-
- Existing React Router workflow remains supported.
|
|
235
|
-
|
|
236
|
-
### 10) Effect-first MF data reliability and data-platform contracts
|
|
237
|
-
|
|
238
|
-
UltraModern.js 3.0 shipped additional reliability work aligned to Beads stream D:
|
|
239
|
-
|
|
240
|
-
- `@modern-js/plugin-bff` runtime path migrated to Effect v4.
|
|
241
|
-
- Effect-only MF data-fetch contract guidance (explicitly no Zod layer in this stream).
|
|
242
|
-
- MF vertical loading reliability matrix includes deterministic failure injection (timeout/network/contract error).
|
|
243
|
-
- Distributed trace continuity checks were re-enabled for build and serve paths.
|
|
244
|
-
- Data-platform architecture defines operation identity, envelope integrity, scoped invalidation, and trace propagation contracts.
|
|
245
|
-
|
|
246
|
-
Reference materials:
|
|
247
|
-
|
|
248
|
-
- `docs/super-app-rfc-adr/ADR-0003-effect-only-mf-data-fetch-reliability.md`
|
|
249
|
-
- `packages/cli/plugin-bff/docs/data-platform-architecture.md`
|
|
250
|
-
- `routes-tanstack-mf` reliability coverage
|
|
251
|
-
|
|
252
|
-
### 11) Release and module certification gate model
|
|
253
|
-
|
|
254
|
-
UltraModern.js 3.0 includes a machine-verifiable gate model beyond baseline Modern.js 3.0:
|
|
255
|
-
|
|
256
|
-
- Gate profiles:
|
|
257
|
-
- `scripts/release-gates/rc-contract-profile.json`
|
|
258
|
-
- `scripts/release-gates/module-certification-profile.json`
|
|
259
|
-
- Required evidence contracts under:
|
|
260
|
-
- `docs/super-app-rfc-adr/evidence/release-candidate/current`
|
|
261
|
-
- `docs/super-app-rfc-adr/evidence/module-certification/current`
|
|
262
|
-
- Local validation commands:
|
|
263
|
-
- `pnpm run validate:module-sdk-contracts`
|
|
264
|
-
- `pnpm run validate:boundary-guards`
|
|
265
|
-
- `pnpm run validate:module-certification-gates`
|
|
266
|
-
- `pnpm run validate:rc-gates`
|
|
267
|
-
- `pnpm run validate:bun-smoke`
|
|
268
|
-
- CI workflows:
|
|
269
|
-
- `.github/workflows/release-contract-gates.yml`
|
|
270
|
-
- `.github/workflows/module-certification-gates.yml`
|
|
271
|
-
- `.github/workflows/bun-superapp-smoke.yml`
|
|
272
|
-
- Generated starter workflow:
|
|
273
|
-
- `.github/workflows/ultramodern-gates.yml`
|
|
274
|
-
- runs `pnpm run ultramodern:check` and `pnpm run build`
|
|
275
|
-
|
|
276
|
-
## Not Part of UltraModern.js 3.0
|
|
277
|
-
|
|
278
|
-
The following are intentionally out of scope for this public V3 preset profile:
|
|
279
|
-
|
|
280
|
-
- Forcing Effect-only data-fetch runtime as the mandatory default for every app.
|
|
281
|
-
- Forcing app-level MF SSR for every app regardless of readiness.
|
|
282
|
-
|
|
283
|
-
## Human Workflow
|
|
284
|
-
|
|
285
|
-
The public BleedingDev create package starts small. The default command creates
|
|
286
|
-
one production-ready UltraModern app with `presetUltramodern(...)`, SSR,
|
|
287
|
-
TanStack Router, Tailwind CSS v4, i18n, Effect BFF, generated quality gates, and
|
|
288
|
-
production URL metadata:
|
|
289
|
-
|
|
290
|
-
```bash
|
|
291
|
-
pnpm dlx @bleedingdev/modern-js-create myapp
|
|
292
|
-
cd myapp
|
|
293
|
-
mise install
|
|
294
|
-
pnpm install
|
|
295
|
-
pnpm run ultramodern:check
|
|
296
|
-
MODERN_PUBLIC_SITE_URL=https://example.com pnpm build
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
Create a SuperApp workspace only when independent ownership is useful:
|
|
300
|
-
|
|
301
|
-
```bash
|
|
302
|
-
pnpm dlx @bleedingdev/modern-js-create my-super-app --ultramodern-workspace
|
|
303
|
-
cd my-super-app
|
|
304
|
-
mise install
|
|
305
|
-
pnpm install
|
|
306
|
-
pnpm check
|
|
307
|
-
pnpm build
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
The initial SuperApp workspace is shell-only: `apps/shell-super-app` owns route
|
|
311
|
-
assembly and Module Federation host wiring, `verticals/*` starts empty, and
|
|
312
|
-
`packages/shared-*` holds placeholders for contracts, tokens, and API support.
|
|
313
|
-
Add verticals only when a real business domain needs independent ownership.
|
|
314
|
-
|
|
315
|
-
Add real business MicroVerticals as they become ownership boundaries:
|
|
316
|
-
|
|
317
|
-
```bash
|
|
318
|
-
pnpm dlx @bleedingdev/modern-js-create transportation --vertical
|
|
319
|
-
pnpm dlx @bleedingdev/modern-js-create food-delivery --vertical
|
|
320
|
-
pnpm dlx @bleedingdev/modern-js-create payments --vertical
|
|
321
|
-
pnpm dlx @bleedingdev/modern-js-create maps --vertical
|
|
322
|
-
pnpm check
|
|
323
|
-
pnpm build
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
The `--vertical` command mutates the current workspace. It creates the vertical
|
|
327
|
-
package and updates topology metadata, ownership records, shell Module
|
|
328
|
-
Federation wiring, local development overlays, package dependencies, generated
|
|
329
|
-
contracts, ports, route-owned i18n, CSS isolation, and the vertical-owned Effect
|
|
330
|
-
BFF/client surface.
|
|
331
|
-
|
|
332
|
-
Generated apps and verticals keep SSR on the normal Modern.js path. SuperApp
|
|
333
|
-
workspaces add `server.ssr.moduleFederationAppSSR` when Module Federation SSR is
|
|
334
|
-
needed, but the flag remains an explicit contract rather than a requirement for
|
|
335
|
-
every app.
|
|
336
|
-
|
|
337
|
-
Each app emits `src/routes/ultramodern-route-metadata` with
|
|
338
|
-
`ultramodernLocalisedUrls`. The i18n plugin reads that map in
|
|
339
|
-
`localeDetection.localisedUrls` and serves dynamic backend JSON from
|
|
340
|
-
`/locales/{{lng}}/{{ns}}.json`.
|
|
341
|
-
|
|
342
|
-
The generated contract writes `.modernjs/ultramodern-generated-contract.json`
|
|
343
|
-
with `cssFederation`: shared design tokens stay in `packages/shared-design-tokens`,
|
|
344
|
-
shell CSS owns shell layers, each vertical owns one CSS layer with app-local
|
|
345
|
-
prefixes, and SSR first paint uses Modern/Rspack assets plus manifest-owned
|
|
346
|
-
vertical CSS.
|
|
347
|
-
|
|
348
|
-
Generated workspaces include `scripts/proof-cloudflare-version.mjs` for live
|
|
349
|
-
Cloudflare and Zephyr proof. Deploy first, then pass each deployed app's
|
|
350
|
-
generated public URL env key into the proof step. Shell-only workspaces only
|
|
351
|
-
need the shell URL; added verticals use the same
|
|
352
|
-
`ULTRAMODERN_PUBLIC_URL_<APP_ID>` pattern with hyphens converted to underscores
|
|
353
|
-
and uppercased.
|
|
354
|
-
|
|
355
|
-
```bash
|
|
356
|
-
pnpm cloudflare:deploy
|
|
357
|
-
ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP=https://shell-super-app.example.workers.dev \
|
|
358
|
-
ULTRAMODERN_PUBLIC_URL_TRANSPORTATION=https://transportation.example.workers.dev \
|
|
359
|
-
pnpm cloudflare:proof -- --require-public-urls
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
Live proof requires public Worker URLs and Zephyr credentials; local checks
|
|
363
|
-
still validate generated contracts, builds, Cloudflare output, dry-run Zephyr
|
|
364
|
-
evidence plans, and local evidence schemas.
|
|
365
|
-
|
|
366
|
-
## Current Troubleshooting
|
|
367
|
-
|
|
368
|
-
| Symptom | Current check | Owner |
|
|
369
|
-
| --- | --- | --- |
|
|
370
|
-
| Package cohort mismatch | Regenerate with one package source strategy, run `mise install`, then rerun `pnpm install` from the activated shell. | Generated workspace package source metadata |
|
|
371
|
-
| Install failure | Check the active Node/pnpm from `mise install`; rerun `pnpm install` after the shell sees the pinned versions. | Toolchain setup |
|
|
372
|
-
| Build failure | Run `pnpm check` before `pnpm build`; fix reported format, lint, type, skill, i18n, or generated-contract failures first. | Owning package or generated contract |
|
|
373
|
-
| Missing public URL | Set the env key from `.modernjs/ultramodern-generated-contract.json`, for example `ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP`. | Deployment operator |
|
|
374
|
-
| Cloudflare credentials | Confirm Wrangler credentials before `pnpm cloudflare:deploy`; local checks do not prove live Worker access. | Deployment operator |
|
|
375
|
-
| Asset or CSS 404 | Rebuild with `pnpm build` or `pnpm cloudflare:deploy` and inspect emitted Modern/Rspack asset paths instead of hardcoding CSS URLs. | Framework/runtime asset pipeline |
|
|
376
|
-
| Federation manifest failure | Run the shell and vertical build scripts, then check each deployed `/mf-manifest.json` URL used by the shell. | Module Federation owner |
|
|
377
|
-
|
|
378
|
-
BleedingDev packages are published through GitHub Actions trusted publishing.
|
|
379
|
-
The public workflow is tokenless; do not publish packages manually from a
|
|
380
|
-
developer machine.
|
|
381
|
-
|
|
382
|
-
## Baseline Switches (Opt-out)
|
|
383
|
-
|
|
384
|
-
The generated `presetUltramodern(...)` create template enables stricter platform contracts. These env switches are read by generated `modern.config.ts` and can be disabled/overridden per app or per environment:
|
|
385
|
-
|
|
386
|
-
- `MODERN_BASELINE_ENABLE_MF_SSR` (default: `true`): Enables app-level MF SSR baseline contract (`server.ssr.mode: 'stream'` + `moduleFederationAppSSR`). Disable when the app does not use app-level MF SSR, or when you need plain SSR/CSR behavior first.
|
|
387
|
-
- `MODERN_BASELINE_ENABLE_BFF_REQUEST_ID` (default: `true`): Enables default BFF producer identity contract (`bff.requestId`). Disable when the app does not need cross-project producer isolation.
|
|
388
|
-
- `MODERN_BASELINE_ENABLE_TELEMETRY_EXPORTERS` (default: `true`): Enables telemetry exporters in baseline config. Disable when the environment has no telemetry backend yet.
|
|
389
|
-
- `MODERN_BASELINE_APP_ID` (default: `basename(process.cwd())`): Overrides baseline `bff.requestId` identity. Set this when you need a fixed platform-wide producer ID convention.
|
|
390
|
-
- `MODERN_TELEMETRY_OTLP_ENDPOINT` (default: `http://127.0.0.1:4318/v1/logs`): OTLP exporter endpoint. Override when you route telemetry through a different collector endpoint.
|
|
391
|
-
- `MODERN_TELEMETRY_VICTORIA_ENDPOINT` (default: `http://127.0.0.1:8428/api/v1/import/prometheus`): VictoriaMetrics exporter endpoint. Override when you use a different VM ingress endpoint.
|
|
392
|
-
- `MODERN_TELEMETRY_FAIL_LOUD_STARTUP` (default: `true`): Fails startup if configured exporters fail startup health checks. Disable in local/dev environments where temporary telemetry outage should not block boot.
|
|
393
|
-
|
|
394
|
-
## Related Public Docs
|
|
395
|
-
|
|
396
|
-
- [performance.rsdoctor](/configure/app/performance/rsdoctor)
|
|
397
|
-
- [server.ssr](/configure/app/server/ssr)
|
|
398
|
-
- [BFF guide](/guides/advanced-features/bff/index)
|
|
399
|
-
- [BFF frameworks](/guides/advanced-features/bff/frameworks)
|
|
400
|
-
- [BFF data platform architecture](/guides/advanced-features/bff/data-platform)
|
|
401
|
-
- [BFF Effect runtime config](/configure/app/bff/effect)
|
|
402
|
-
- [Micro-frontend guide](/guides/topic-detail/micro-frontend/c01-introduction)
|
|
403
|
-
- [Module Federation SSR](/guides/topic-detail/module-federation/ssr)
|