@bleedingdev/modern-js-create 3.2.0-ultramodern.12 → 3.2.0-ultramodern.121
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 +167 -72
- package/bin/run.js +0 -0
- package/dist/cjs/create-package-root.cjs +63 -0
- package/dist/cjs/index.cjs +528 -0
- package/dist/cjs/locale/en.cjs +93 -0
- package/dist/cjs/locale/index.cjs +50 -0
- package/dist/cjs/locale/zh.cjs +93 -0
- package/dist/cjs/ultramodern-package-source.cjs +135 -0
- package/dist/cjs/ultramodern-workspace/add-vertical.cjs +337 -0
- package/dist/cjs/ultramodern-workspace/app-files.cjs +223 -0
- package/dist/cjs/ultramodern-workspace/contracts.cjs +836 -0
- package/dist/cjs/ultramodern-workspace/demo-components.cjs +422 -0
- package/dist/cjs/ultramodern-workspace/descriptors.cjs +222 -0
- package/dist/cjs/ultramodern-workspace/effect-api.cjs +952 -0
- package/dist/cjs/ultramodern-workspace/fs-io.cjs +191 -0
- package/dist/cjs/ultramodern-workspace/index.cjs +48 -0
- package/dist/cjs/ultramodern-workspace/locales.cjs +173 -0
- package/dist/cjs/ultramodern-workspace/module-federation.cjs +487 -0
- package/dist/cjs/ultramodern-workspace/naming.cjs +161 -0
- package/dist/cjs/ultramodern-workspace/package-json.cjs +406 -0
- package/dist/cjs/ultramodern-workspace/package-source.cjs +59 -0
- package/dist/cjs/ultramodern-workspace/policy.cjs +248 -0
- package/dist/cjs/ultramodern-workspace/public-surface.cjs +268 -0
- package/dist/cjs/ultramodern-workspace/routes.cjs +375 -0
- package/dist/cjs/ultramodern-workspace/types.cjs +61 -0
- package/dist/cjs/ultramodern-workspace/versions.cjs +153 -0
- package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +153 -0
- package/dist/cjs/ultramodern-workspace/write-workspace.cjs +175 -0
- package/dist/esm/create-package-root.js +14 -0
- package/dist/esm/index.js +491 -0
- package/dist/esm/locale/en.js +55 -0
- package/dist/esm/locale/index.js +9 -0
- package/dist/esm/locale/zh.js +55 -0
- package/dist/esm/ultramodern-package-source.js +63 -0
- package/dist/esm/ultramodern-workspace/add-vertical.js +252 -0
- package/dist/esm/ultramodern-workspace/app-files.js +149 -0
- package/dist/esm/ultramodern-workspace/contracts.js +741 -0
- package/dist/esm/ultramodern-workspace/demo-components.js +363 -0
- package/dist/esm/ultramodern-workspace/descriptors.js +133 -0
- package/dist/esm/ultramodern-workspace/effect-api.js +854 -0
- package/dist/esm/ultramodern-workspace/fs-io.js +90 -0
- package/dist/esm/ultramodern-workspace/index.js +3 -0
- package/dist/esm/ultramodern-workspace/locales.js +122 -0
- package/dist/esm/ultramodern-workspace/module-federation.js +415 -0
- package/dist/esm/ultramodern-workspace/naming.js +71 -0
- package/dist/esm/ultramodern-workspace/package-json.js +338 -0
- package/dist/esm/ultramodern-workspace/package-source.js +21 -0
- package/dist/esm/ultramodern-workspace/policy.js +183 -0
- package/dist/esm/ultramodern-workspace/public-surface.js +183 -0
- package/dist/esm/ultramodern-workspace/routes.js +280 -0
- package/dist/esm/ultramodern-workspace/types.js +16 -0
- package/dist/esm/ultramodern-workspace/versions.js +34 -0
- package/dist/esm/ultramodern-workspace/workspace-scripts.js +91 -0
- package/dist/esm/ultramodern-workspace/write-workspace.js +121 -0
- package/dist/esm-node/create-package-root.js +15 -0
- package/dist/esm-node/index.js +492 -0
- package/dist/esm-node/locale/en.js +56 -0
- package/dist/esm-node/locale/index.js +10 -0
- package/dist/esm-node/locale/zh.js +56 -0
- package/dist/esm-node/ultramodern-package-source.js +64 -0
- package/dist/esm-node/ultramodern-workspace/add-vertical.js +253 -0
- package/dist/esm-node/ultramodern-workspace/app-files.js +150 -0
- package/dist/esm-node/ultramodern-workspace/contracts.js +742 -0
- package/dist/esm-node/ultramodern-workspace/demo-components.js +364 -0
- package/dist/esm-node/ultramodern-workspace/descriptors.js +134 -0
- package/dist/esm-node/ultramodern-workspace/effect-api.js +855 -0
- package/dist/esm-node/ultramodern-workspace/fs-io.js +91 -0
- package/dist/esm-node/ultramodern-workspace/index.js +4 -0
- package/dist/esm-node/ultramodern-workspace/locales.js +123 -0
- package/dist/esm-node/ultramodern-workspace/module-federation.js +416 -0
- package/dist/esm-node/ultramodern-workspace/naming.js +72 -0
- package/dist/esm-node/ultramodern-workspace/package-json.js +339 -0
- package/dist/esm-node/ultramodern-workspace/package-source.js +22 -0
- package/dist/esm-node/ultramodern-workspace/policy.js +184 -0
- package/dist/esm-node/ultramodern-workspace/public-surface.js +184 -0
- package/dist/esm-node/ultramodern-workspace/routes.js +281 -0
- package/dist/esm-node/ultramodern-workspace/types.js +17 -0
- package/dist/esm-node/ultramodern-workspace/versions.js +35 -0
- package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +92 -0
- package/dist/esm-node/ultramodern-workspace/write-workspace.js +122 -0
- package/dist/types/create-package-root.d.ts +1 -0
- package/dist/types/locale/en.d.ts +8 -9
- package/dist/types/locale/index.d.ts +109 -2
- package/dist/types/locale/zh.d.ts +8 -9
- package/dist/types/ultramodern-package-source.d.ts +28 -0
- package/dist/types/ultramodern-workspace/add-vertical.d.ts +19 -0
- package/dist/types/ultramodern-workspace/app-files.d.ts +14 -0
- package/dist/types/ultramodern-workspace/contracts.d.ts +21 -0
- package/dist/types/ultramodern-workspace/demo-components.d.ts +9 -0
- package/dist/types/ultramodern-workspace/descriptors.d.ts +39 -0
- package/dist/types/ultramodern-workspace/effect-api.d.ts +73 -0
- package/dist/types/ultramodern-workspace/fs-io.d.ts +18 -0
- package/dist/types/ultramodern-workspace/index.d.ts +4 -0
- package/dist/types/ultramodern-workspace/locales.d.ts +183 -0
- package/dist/types/ultramodern-workspace/module-federation.d.ts +16 -0
- package/dist/types/ultramodern-workspace/naming.d.ts +16 -0
- package/dist/types/ultramodern-workspace/package-json.d.ts +12 -0
- package/dist/types/ultramodern-workspace/package-source.d.ts +2 -0
- package/dist/types/ultramodern-workspace/policy.d.ts +60 -0
- package/dist/types/ultramodern-workspace/public-surface.d.ts +37 -0
- package/dist/types/ultramodern-workspace/routes.d.ts +25 -0
- package/dist/types/ultramodern-workspace/types.d.ts +95 -0
- package/dist/types/ultramodern-workspace/versions.d.ts +38 -0
- package/dist/types/ultramodern-workspace/workspace-scripts.d.ts +10 -0
- package/dist/types/ultramodern-workspace/write-workspace.d.ts +4 -0
- package/package.json +34 -15
- package/template-workspace/.agents/agent-reference-repos.json +24 -0
- package/template-workspace/.agents/skills-lock.json +19 -0
- package/template-workspace/.codex/hooks.json +16 -0
- package/template-workspace/.github/renovate.json +29 -0
- package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +67 -0
- package/template-workspace/.gitignore.handlebars +5 -0
- package/template-workspace/.mise.toml.handlebars +3 -0
- package/template-workspace/AGENTS.md.handlebars +87 -0
- package/template-workspace/README.md.handlebars +132 -11
- package/template-workspace/lefthook.yml +24 -0
- package/template-workspace/oxfmt.config.ts +1 -0
- package/template-workspace/oxlint.config.ts +1 -0
- package/template-workspace/pnpm-workspace.yaml.handlebars +40 -0
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +184 -21
- package/template-workspace/scripts/setup-agent-reference-repos.mjs +370 -0
- package/templates/app/shell-frame.tsx +49 -0
- package/templates/app/ultramodern-route-head.tsx.handlebars +142 -0
- package/templates/packages/shared-contracts-index.ts +466 -0
- package/templates/workspace-scripts/assert-mf-types.mjs.handlebars +69 -0
- package/templates/workspace-scripts/check-ultramodern-i18n-boundaries.mjs +9 -0
- package/templates/workspace-scripts/generate-public-surface-assets.mjs +529 -0
- package/templates/workspace-scripts/proof-cloudflare-version.mjs +125 -0
- package/templates/workspace-scripts/ultramodern-cloudflare-proof.mjs +851 -0
- package/templates/workspace-scripts/ultramodern-performance-readiness.config.mjs +7 -0
- package/templates/workspace-scripts/ultramodern-performance-readiness.mjs +223 -0
- package/templates/workspace-scripts/validate-ultramodern-workspace.mjs.handlebars +593 -0
- package/dist/index.js +0 -2626
- package/dist/types/ultramodern-workspace.d.ts +0 -20
- package/template/.agents/skills-lock.json +0 -34
- package/template/.browserslistrc +0 -4
- package/template/.github/workflows/ultramodern-gates.yml.handlebars +0 -30
- package/template/.gitignore.handlebars +0 -30
- package/template/.nvmrc +0 -2
- package/template/AGENTS.md +0 -25
- package/template/README.md +0 -79
- package/template/api/effect/index.ts.handlebars +0 -23
- package/template/api/lambda/hello.ts.handlebars +0 -6
- package/template/config/public/locales/cs/translation.json +0 -39
- package/template/config/public/locales/en/translation.json +0 -39
- package/template/modern.config.ts.handlebars +0 -53
- package/template/oxfmt.config.ts +0 -8
- package/template/oxlint.config.ts +0 -12
- package/template/package.json.handlebars +0 -67
- package/template/postcss.config.mjs.handlebars +0 -6
- package/template/scripts/bootstrap-agent-skills.mjs +0 -95
- package/template/scripts/check-i18n-strings.mjs +0 -83
- package/template/scripts/validate-ultramodern.mjs.handlebars +0 -178
- package/template/shared/effect/api.ts.handlebars +0 -17
- package/template/src/modern-app-env.d.ts +0 -1
- package/template/src/modern.runtime.ts.handlebars +0 -23
- package/template/src/routes/index.css.handlebars +0 -129
- package/template/src/routes/layout.tsx.handlebars +0 -9
- package/template/src/routes/page.tsx.handlebars +0 -155
- package/template/tailwind.config.ts.handlebars +0 -10
- package/template/tsconfig.json +0 -120
- package/template-workspace/AGENTS.md +0 -50
- package/template-workspace/pnpm-workspace.yaml +0 -17
- package/template-workspace/scripts/check-i18n-strings.mjs +0 -83
- package/template-workspace/scripts/validate-ultramodern-workspace.mjs.handlebars +0 -433
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
+
"extends": ["config:recommended", "helpers:pinGitHubActionDigests"],
|
|
4
|
+
"dependencyDashboard": true,
|
|
5
|
+
"minimumReleaseAge": "1 day",
|
|
6
|
+
"prConcurrentLimit": 5,
|
|
7
|
+
"prHourlyLimit": 2,
|
|
8
|
+
"rangeStrategy": "bump",
|
|
9
|
+
"schedule": ["before 5am on monday"],
|
|
10
|
+
"timezone": "Etc/UTC",
|
|
11
|
+
"packageRules": [
|
|
12
|
+
{
|
|
13
|
+
"matchManagers": ["github-actions"],
|
|
14
|
+
"groupName": "github-actions",
|
|
15
|
+
"labels": ["dependencies", "github-actions", "security"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"matchManagers": ["npm"],
|
|
19
|
+
"matchUpdateTypes": ["patch", "minor"],
|
|
20
|
+
"groupName": "npm minor and patch updates",
|
|
21
|
+
"labels": ["dependencies", "npm"]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"matchUpdateTypes": ["major"],
|
|
25
|
+
"dependencyDashboardApproval": true,
|
|
26
|
+
"labels": ["dependencies", "major"]
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: Ultramodern Workspace Gates
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
defaults:
|
|
11
|
+
run:
|
|
12
|
+
shell: bash
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ultramodern-workspace-gates-${{ github.workflow }}-${{ github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
workspace-gate:
|
|
20
|
+
name: ${{ matrix.name }}
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
timeout-minutes: 30
|
|
23
|
+
strategy:
|
|
24
|
+
fail-fast: false
|
|
25
|
+
matrix:
|
|
26
|
+
include:
|
|
27
|
+
- name: Format
|
|
28
|
+
command: pnpm format:check
|
|
29
|
+
- name: Lint
|
|
30
|
+
command: pnpm lint
|
|
31
|
+
- name: Typecheck
|
|
32
|
+
command: pnpm typecheck
|
|
33
|
+
- name: Skills
|
|
34
|
+
command: pnpm skills:check
|
|
35
|
+
- name: I18n Boundaries
|
|
36
|
+
command: pnpm i18n:boundaries
|
|
37
|
+
- name: Contract
|
|
38
|
+
command: pnpm contract:check
|
|
39
|
+
- name: Build
|
|
40
|
+
command: pnpm build
|
|
41
|
+
steps:
|
|
42
|
+
- name: Harden Runner
|
|
43
|
+
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2
|
|
44
|
+
with:
|
|
45
|
+
egress-policy: audit
|
|
46
|
+
|
|
47
|
+
- name: Checkout
|
|
48
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
49
|
+
with:
|
|
50
|
+
fetch-depth: 1
|
|
51
|
+
persist-credentials: false
|
|
52
|
+
|
|
53
|
+
- name: Setup Node.js
|
|
54
|
+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
55
|
+
with:
|
|
56
|
+
node-version: "{{nodeVersion}}"
|
|
57
|
+
|
|
58
|
+
- name: Setup mise
|
|
59
|
+
uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
|
|
60
|
+
|
|
61
|
+
- name: Install Dependencies
|
|
62
|
+
run: mise exec -- pnpm install --frozen-lockfile
|
|
63
|
+
|
|
64
|
+
- name: Run ${{ matrix.name }}
|
|
65
|
+
env:
|
|
66
|
+
MODERN_PUBLIC_SITE_URL: http://localhost:8080
|
|
67
|
+
run: mise exec -- ${{ matrix.command }}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# UltraModern Agent Contract
|
|
2
|
+
|
|
3
|
+
This workspace is generated as an agent-ready UltraModern.js SuperApp shell.
|
|
4
|
+
Agents should treat the files under `.agents/skills` as local project
|
|
5
|
+
instructions, not optional reading.
|
|
6
|
+
|
|
7
|
+
## Quality Gates
|
|
8
|
+
|
|
9
|
+
Generated workspaces target Node `>=26` and pnpm `{{pnpmVersion}}`. Keep
|
|
10
|
+
`packageManager`, `.mise.toml`, generated validation, and CI aligned to that
|
|
11
|
+
baseline; do not reintroduce Corepack or older pnpm aliases.
|
|
12
|
+
|
|
13
|
+
- `pnpm lint` runs Oxlint with the Ultracite preset.
|
|
14
|
+
- `pnpm format` runs oxfmt.
|
|
15
|
+
- `pnpm typecheck` runs effect-tsgo as the TypeScript checker.
|
|
16
|
+
- `pnpm i18n:boundaries` verifies workspace source boundaries through `@modern-js/code-tools`.
|
|
17
|
+
- `pnpm contract:check` verifies the generated workspace contract.
|
|
18
|
+
- `pnpm mf:types` verifies Module Federation type outputs after builds.
|
|
19
|
+
- `pnpm check` is a local convenience aggregate for the primitive gates.
|
|
20
|
+
- Generated CI runs primitive gates as separate matrix jobs instead of calling `pnpm check`.
|
|
21
|
+
- Generated Codex stop hooks and subagent-stop hooks run `pnpm format && pnpm lint:fix && pnpm check`.
|
|
22
|
+
- `postinstall` formats the generated tree and installs `lefthook`. It never clones repositories or installs system packages; agent skill repos and reference repos are explicit opt-in steps (`pnpm skills:install`, `pnpm agents:refs:install`). Generated `lefthook.yml` runs separate format and lint-fix commands on pre-commit; pre-push runs read-only primitive gates in parallel.
|
|
23
|
+
|
|
24
|
+
## Localized Routes
|
|
25
|
+
|
|
26
|
+
Generated apps keep locale-prefixed entry routes under `src/routes/[lang]`,
|
|
27
|
+
static language links, and canonical plus `hreflang` metadata. A new workspace
|
|
28
|
+
starts shell-only; `create <domain> --vertical` adds route-owned metadata,
|
|
29
|
+
localized resources, and Effect BFF surfaces for that domain. Runtime i18n is
|
|
30
|
+
not enabled in the starter because the current React 19 + Module Federation
|
|
31
|
+
streaming SSR stack must render predictably first. Canonical and hreflang URLs
|
|
32
|
+
use `MODERN_PUBLIC_SITE_URL` only. JS/CSS/static assets use
|
|
33
|
+
`MODERN_ASSET_PREFIX`, then `ULTRAMODERN_ASSET_PREFIX`, then `/`; do not use
|
|
34
|
+
`MODERN_PUBLIC_SITE_URL` or stale public URL aliases as asset-prefix fallbacks.
|
|
35
|
+
Without an asset prefix, builds emit origin-relative asset paths so pages work
|
|
36
|
+
behind tunnels and reverse proxies.
|
|
37
|
+
|
|
38
|
+
## Required Skill Baseline
|
|
39
|
+
|
|
40
|
+
Use these skills when the task touches the matching subsystem:
|
|
41
|
+
|
|
42
|
+
- `rsbuild-best-practices`: Modern.js app build configuration, Rsbuild options, assets, type checking, and build debugging.
|
|
43
|
+
- `rspack-best-practices`: Rspack-level bundling, CSS, assets, profiling, and production build behavior.
|
|
44
|
+
- `rspack-tracing`: Rspack build failures, slow builds, crash localization, and trace analysis.
|
|
45
|
+
- `rsdoctor-analysis`: Evidence-based bundle analysis from `rsdoctor-data.json`, including duplicate packages, large chunks, and retained modules.
|
|
46
|
+
- `rslib-best-practices`: Shared packages, generated libraries, declaration output, and Rslib configuration.
|
|
47
|
+
- `rslib-modern-package`: Package contracts for shared libraries, exports, side effects, dependency placement, README, and release readiness.
|
|
48
|
+
- `rstest-best-practices`: Rstest configuration, test writing, mocking, snapshots, coverage, and CI test behavior.
|
|
49
|
+
- `mf`: Module Federation docs, Modern.js integration, DTS/type checks, shared dependency checks, runtime errors, and observability troubleshooting.
|
|
50
|
+
|
|
51
|
+
The public `module-federation/agent-skills` repository is installed only when you explicitly run `pnpm skills:install` (or set `ULTRAMODERN_AGENT_SKILLS=1` before `pnpm install`). Postinstall never clones repositories. `pnpm skills:install` remains strict for required public skills. `pnpm skills:check` fails when a vendored skill is missing and warns when clone-installed skills such as `mf` have not been fetched yet.
|
|
52
|
+
|
|
53
|
+
## Private Skills
|
|
54
|
+
|
|
55
|
+
ScriptedAlchemy/TechsioCZ skills are private and are cloned only when the current developer is authorized for `TechsioCZ/skills`.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pnpm skills:install
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The installer copies only the pinned private skills from `.agents/skills-lock.json`: `plan-graph`, `dag`, `subagent-graph`, `helm`, and `debugger-mode`.
|
|
62
|
+
|
|
63
|
+
## Agent Reference Repositories
|
|
64
|
+
|
|
65
|
+
The workspace can install read-only source references under `repos/` with the explicit `pnpm agents:refs:install` command using `git subtree add --squash`. These repositories are reference material for coding agents, not application source:
|
|
66
|
+
|
|
67
|
+
- `repos/effect` from `Effect-TS/effect`.
|
|
68
|
+
- `repos/ultramodern.js` from `BleedingDev/ultramodern.js`.
|
|
69
|
+
|
|
70
|
+
Agents may read files under `repos/` to understand upstream patterns, APIs, and project conventions. Do not edit files under `repos/`, import from them, or make production code depend on them. `ULTRAMODERN_SKIP_AGENT_REPOS=1` disables the installer even when invoked explicitly.
|
|
71
|
+
|
|
72
|
+
## Project Priorities
|
|
73
|
+
|
|
74
|
+
- Keep `presetUltramodern` as the single preset.
|
|
75
|
+
- Keep the initial workspace shell-only unless a user explicitly asks for a
|
|
76
|
+
starter vertical.
|
|
77
|
+
- Use `create <domain> --vertical` as the growth path for real business
|
|
78
|
+
MicroVerticals.
|
|
79
|
+
- Prefer Effect for BFF code.
|
|
80
|
+
- Prefer TanStack Router for app routing.
|
|
81
|
+
- Keep UI-kit or design-system code as ordinary vertical or shared package code, not a special core path.
|
|
82
|
+
- Keep generated packages explicit and publishable: stable `exports`, correct declarations, small public APIs, and clear ownership metadata.
|
|
83
|
+
- Do not add migration tooling or codemods unless the project owner explicitly asks for migration work.
|
|
84
|
+
|
|
85
|
+
## Skill Provenance
|
|
86
|
+
|
|
87
|
+
The vendored Rstack skills, public Module Federation skill, and private TechsioCZ skill set are pinned in `.agents/skills-lock.json`. Do not update, remove, or replace them casually. If a skill needs updating, update the lock file and run the affected primitive gate plus `pnpm check`.
|
|
@@ -3,23 +3,88 @@
|
|
|
3
3
|
Generated UltraModern SuperApp workspace.
|
|
4
4
|
|
|
5
5
|
This workspace keeps `presetUltramodern(...)` as the single public
|
|
6
|
-
UltraModern.js 3.0 SuperApp surface and
|
|
7
|
-
starter topology:
|
|
6
|
+
UltraModern.js 3.0 SuperApp surface and starts with an explicit shell:
|
|
8
7
|
|
|
9
|
-
- `apps/shell-super-app` owns shell route assembly
|
|
10
|
-
|
|
11
|
-
- `
|
|
12
|
-
|
|
13
|
-
- `
|
|
14
|
-
- `packages/shared-*` provide placeholders for cross-workspace contracts.
|
|
8
|
+
- `apps/shell-super-app` owns shell route assembly, Module Federation host
|
|
9
|
+
wiring, shared SSR/i18n runtime setup, and the boundary debugger.
|
|
10
|
+
- `packages/shared-*` provide placeholders for cross-workspace contracts and
|
|
11
|
+
design tokens.
|
|
12
|
+
- `verticals/*` is intentionally empty until a real business domain is added.
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
Add a full-stack MicroVertical when the product needs one:
|
|
17
15
|
|
|
18
16
|
```bash
|
|
19
|
-
pnpm
|
|
17
|
+
pnpm dlx @bleedingdev/modern-js-create transportation --vertical
|
|
18
|
+
pnpm dlx @bleedingdev/modern-js-create payments --vertical
|
|
20
19
|
```
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
Each added vertical owns its UI/routes, browser-safe Module Federation exposes,
|
|
22
|
+
private-first route metadata, localized URLs, public-route opt-ins, CSS prefix,
|
|
23
|
+
Effect BFF handlers, local API contract, and typed client surface. Server
|
|
24
|
+
handlers and Effect client/contract modules stay out of browser exposes.
|
|
25
|
+
|
|
26
|
+
## Private-First Public Surfaces
|
|
27
|
+
|
|
28
|
+
Generated app routes are private and non-indexable by default. Author route
|
|
29
|
+
metadata in colocated `src/routes/**/route.meta.ts` files; the scaffold
|
|
30
|
+
regenerates `src/routes/ultramodern-route-metadata.ts` as a compatibility
|
|
31
|
+
manifest for config, i18n, public head, and public surface contracts. Private
|
|
32
|
+
app, auth, tenant, dashboard, and internal routes publish no discovery output
|
|
33
|
+
unless route metadata explicitly marks them `public && indexable`. The default
|
|
34
|
+
scaffold therefore emits only a disallowing `robots.txt`; sitemap, web
|
|
35
|
+
manifest, `llms.txt`, API catalog, security.txt, and JSON-LD output stay
|
|
36
|
+
omitted until a safe public route or public docs/help/product surface exists.
|
|
37
|
+
Structured data is never inferred automatically. Add `jsonLd` explicitly in
|
|
38
|
+
route metadata for `public && indexable` routes and use
|
|
39
|
+
`src/routes/ultramodern-jsonld.ts` when the route fits the generated `WebPage`,
|
|
40
|
+
`WebApplication`, `SoftwareApplication`, `BreadcrumbList`, `FAQPage`, or
|
|
41
|
+
`Organization` helpers. Private or non-indexable routes emit no JSON-LD even
|
|
42
|
+
when they have localized paths, titles, descriptions, BFF APIs, or Module
|
|
43
|
+
Federation boundaries.
|
|
44
|
+
|
|
45
|
+
Public web artifacts are build/deploy outputs generated into `dist/public` and
|
|
46
|
+
`.output/public`, not hand-authored source files under `config/public`. Dynamic
|
|
47
|
+
public routes can expand sitemap entries through route-owned, Node-safe
|
|
48
|
+
`route.sitemap.mjs` providers beside route metadata. The public-surface
|
|
49
|
+
generator discovers those providers for dynamic public routes and still honors
|
|
50
|
+
explicit `routes.publicSurface.contentSources` entries in the generated
|
|
51
|
+
compatibility manifest.
|
|
52
|
+
|
|
53
|
+
Run the scaffold validator before adding business code and after every
|
|
54
|
+
`--vertical` mutation:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
mise install
|
|
58
|
+
pnpm install
|
|
59
|
+
pnpm check
|
|
60
|
+
pnpm build
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The generated toolchain baseline is Node `>=26` with pnpm `{{pnpmVersion}}`.
|
|
64
|
+
`packageManager`, `.mise.toml`, generated validation, and CI should all agree
|
|
65
|
+
on that baseline; do not reintroduce Corepack or older pnpm aliases.
|
|
66
|
+
|
|
67
|
+
Generated CI does not call the local aggregate. It runs format, lint,
|
|
68
|
+
typecheck, skills, i18n boundary validation, contract validation, and build as
|
|
69
|
+
separate matrix jobs so failures are isolated and parallelizable.
|
|
70
|
+
|
|
71
|
+
Read-only agent reference repositories under `repos/` (Effect and
|
|
72
|
+
UltraModern.js source lookup using squashed git subtrees) are an explicit
|
|
73
|
+
opt-in step: run `pnpm agents:refs:install` when you want them. `pnpm install`
|
|
74
|
+
never clones repositories.
|
|
75
|
+
|
|
76
|
+
Vendored agent skills ship with the scaffold. Clone-installed skills (such as
|
|
77
|
+
the Module Federation `mf` skill) are fetched only when you explicitly run
|
|
78
|
+
`pnpm skills:install`, or when `ULTRAMODERN_AGENT_SKILLS=1` is set during
|
|
79
|
+
`pnpm install`. `pnpm skills:check` warns about missing clone-installed skills
|
|
80
|
+
without failing the gate.
|
|
81
|
+
|
|
82
|
+
The topology and ownership metadata are generated under `topology/`. The
|
|
83
|
+
workspace also ships `.github/workflows/ultramodern-workspace-gates.yml` and
|
|
84
|
+
`.github/renovate.json` with read-only workflow permissions, commit-pinned
|
|
85
|
+
actions, frozen installs, StepSecurity audit-mode runner hardening, dependency
|
|
86
|
+
dashboard review, one-day release age, grouped updates, and manual approval for
|
|
87
|
+
major upgrades.
|
|
23
88
|
|
|
24
89
|
Package source metadata is generated at
|
|
25
90
|
`.modernjs/ultramodern-package-source.json`. The default strategy keeps
|
|
@@ -27,3 +92,59 @@ UltraModern.js runtime and tooling packages on `workspace:*` for monorepo
|
|
|
27
92
|
development. To create a workspace that can install those packages outside the
|
|
28
93
|
monorepo, generate with `--ultramodern-package-source install`; generated shared
|
|
29
94
|
packages still use `workspace:*` because they are part of this workspace.
|
|
95
|
+
|
|
96
|
+
## Public URL Environment Variables
|
|
97
|
+
|
|
98
|
+
This workspace's apps must not bake absolute `http://localhost:<port>` URLs
|
|
99
|
+
into asset configuration. Public URL and asset prefix environment variables
|
|
100
|
+
have distinct roles, and stale aliases should not be carried forward when
|
|
101
|
+
regenerating or updating the workspace.
|
|
102
|
+
|
|
103
|
+
| Variable | Role | Feeds |
|
|
104
|
+
| --- | --- | --- |
|
|
105
|
+
| `MODERN_PUBLIC_SITE_URL` | Canonical site origin for public SEO output only | Canonical, hreflang, sitemap `<loc>`, robots `Sitemap:` |
|
|
106
|
+
| `MODERN_ASSET_PREFIX` | Preferred JS/CSS/static asset prefix | Modern/Rspack-emitted asset URLs |
|
|
107
|
+
| `ULTRAMODERN_ASSET_PREFIX` | UltraModern compatibility asset prefix | Modern/Rspack-emitted asset URLs when `MODERN_ASSET_PREFIX` is unset |
|
|
108
|
+
| `ULTRAMODERN_PUBLIC_URL_<APP_ID>` | Per-app deployment/proof URL | Cloudflare proof inputs and Module Federation remote URLs |
|
|
109
|
+
|
|
110
|
+
Asset URLs use this precedence: `MODERN_ASSET_PREFIX` →
|
|
111
|
+
`ULTRAMODERN_ASSET_PREFIX` → origin-relative `/`. `MODERN_PUBLIC_SITE_URL` is
|
|
112
|
+
canonical/SEO-only and must not be used as an asset-prefix fallback.
|
|
113
|
+
SEO output uses `MODERN_PUBLIC_SITE_URL`; if it is unset, generated local and
|
|
114
|
+
preview outputs remain non-public until deployment proof provides explicit
|
|
115
|
+
public URLs.
|
|
116
|
+
|
|
117
|
+
Without public URLs configured, asset paths are origin-relative (`/`), and the
|
|
118
|
+
dev server uses `dev.assetPrefix: '/'` — so apps work through tunnels and
|
|
119
|
+
reverse proxies (ngrok, cloudflared) without triggering Chrome's Local Network
|
|
120
|
+
Access prompt or mixed-content errors. Shell-only workspaces can set
|
|
121
|
+
`MODERN_PUBLIC_SITE_URL` for SEO output without changing where assets load
|
|
122
|
+
from.
|
|
123
|
+
|
|
124
|
+
## Cloudflare Proof
|
|
125
|
+
|
|
126
|
+
Deploy the generated apps, then pass each deployed app's generated public URL
|
|
127
|
+
env key into the proof step. The proof script reads the generated contract and
|
|
128
|
+
checks the live Worker surface, including public-route sitemap/robots
|
|
129
|
+
consistency, preview noindex behavior, unknown-route status, asset headers,
|
|
130
|
+
byte budgets, and public sourcemap exposure. A shell-only workspace only needs
|
|
131
|
+
the shell URL; added verticals use the same `ULTRAMODERN_PUBLIC_URL_<APP_ID>`
|
|
132
|
+
pattern with hyphens converted to underscores and uppercased.
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
pnpm cloudflare:deploy
|
|
136
|
+
ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP=https://shell-super-app.example.workers.dev \
|
|
137
|
+
pnpm cloudflare:proof -- --require-public-urls
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Troubleshooting
|
|
141
|
+
|
|
142
|
+
| Symptom | Current check | Owner |
|
|
143
|
+
| --- | --- | --- |
|
|
144
|
+
| 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 |
|
|
145
|
+
| Install failure | Check the active Node/pnpm from `mise install`; rerun `pnpm install` after the shell sees the pinned versions. | Toolchain setup |
|
|
146
|
+
| Build failure | Run the matching primitive gate (`pnpm lint`, `pnpm typecheck`, `pnpm i18n:boundaries`, `pnpm contract:check`) before `pnpm build`; fix the owning failure first. | Owning package or generated contract |
|
|
147
|
+
| Missing public URL | Set the env key from `.modernjs/ultramodern-generated-contract.json`, for example `ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP`. | Deployment operator |
|
|
148
|
+
| Cloudflare credentials | Confirm Wrangler credentials before `pnpm cloudflare:deploy`; local checks do not prove live Worker access. | Deployment operator |
|
|
149
|
+
| 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 |
|
|
150
|
+
| 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 |
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
pre-commit:
|
|
2
|
+
commands:
|
|
3
|
+
format:
|
|
4
|
+
run: pnpm format
|
|
5
|
+
stage_fixed: true
|
|
6
|
+
lint-fix:
|
|
7
|
+
run: pnpm lint:fix
|
|
8
|
+
stage_fixed: true
|
|
9
|
+
|
|
10
|
+
pre-push:
|
|
11
|
+
parallel: true
|
|
12
|
+
commands:
|
|
13
|
+
format:
|
|
14
|
+
run: pnpm format:check
|
|
15
|
+
lint:
|
|
16
|
+
run: pnpm lint
|
|
17
|
+
typecheck:
|
|
18
|
+
run: pnpm typecheck
|
|
19
|
+
skills:
|
|
20
|
+
run: pnpm skills:check
|
|
21
|
+
i18n-boundaries:
|
|
22
|
+
run: pnpm i18n:boundaries
|
|
23
|
+
contract:
|
|
24
|
+
run: pnpm contract:check
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
packages:
|
|
2
|
+
- apps/*
|
|
3
|
+
- verticals/*
|
|
4
|
+
- packages/*
|
|
5
|
+
|
|
6
|
+
minimumReleaseAge: 1440
|
|
7
|
+
minimumReleaseAgeStrict: true
|
|
8
|
+
minimumReleaseAgeIgnoreMissingTime: false
|
|
9
|
+
minimumReleaseAgeExclude:
|
|
10
|
+
- '@bleedingdev/modern-js-*'
|
|
11
|
+
- '@tanstack/react-router'
|
|
12
|
+
- '@tanstack/router-core'
|
|
13
|
+
- '@typescript/native-preview'
|
|
14
|
+
- '@typescript/native-preview-*'
|
|
15
|
+
- '@types/react'
|
|
16
|
+
trustPolicy: no-downgrade
|
|
17
|
+
trustPolicyIgnoreAfter: 1440
|
|
18
|
+
blockExoticSubdeps: true
|
|
19
|
+
engineStrict: true
|
|
20
|
+
pmOnFail: error
|
|
21
|
+
verifyDepsBeforeRun: error
|
|
22
|
+
strictDepBuilds: true
|
|
23
|
+
|
|
24
|
+
peerDependencyRules:
|
|
25
|
+
allowedVersions:
|
|
26
|
+
react: '>=19.0.0'
|
|
27
|
+
typescript: '>=6.0.0'
|
|
28
|
+
|
|
29
|
+
overrides:
|
|
30
|
+
'@tanstack/react-router': {{tanstackRouterVersion}}
|
|
31
|
+
node-fetch: '{{nodeFetchVersion}}'
|
|
32
|
+
|
|
33
|
+
allowBuilds:
|
|
34
|
+
'@swc/core': true
|
|
35
|
+
core-js: true
|
|
36
|
+
esbuild: true
|
|
37
|
+
lefthook: true
|
|
38
|
+
msgpackr-extract: true
|
|
39
|
+
sharp: true
|
|
40
|
+
workerd: true
|