@bleedingdev/modern-js-create 3.2.0-ultramodern.11 → 3.2.0-ultramodern.110

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 (95) hide show
  1. package/README.md +158 -35
  2. package/bin/run.js +0 -0
  3. package/dist/cjs/index.cjs +1040 -0
  4. package/dist/cjs/locale/en.cjs +97 -0
  5. package/dist/cjs/locale/index.cjs +50 -0
  6. package/dist/cjs/locale/zh.cjs +97 -0
  7. package/dist/cjs/ultramodern-checks/cli/i18n-check.cjs +73 -0
  8. package/dist/cjs/ultramodern-checks/cli/oxlint.cjs +174 -0
  9. package/dist/cjs/ultramodern-checks/cli/workspace-source-check.cjs +179 -0
  10. package/dist/cjs/ultramodern-checks/index.cjs +58 -0
  11. package/dist/cjs/ultramodern-checks/oxlint-plugin.cjs +354 -0
  12. package/dist/cjs/ultramodern-package-source.cjs +133 -0
  13. package/dist/cjs/ultramodern-workspace.cjs +5616 -0
  14. package/dist/esm/index.js +1002 -0
  15. package/dist/esm/locale/en.js +59 -0
  16. package/dist/esm/locale/index.js +9 -0
  17. package/dist/esm/locale/zh.js +59 -0
  18. package/dist/esm/ultramodern-checks/cli/i18n-check.js +26 -0
  19. package/dist/esm/ultramodern-checks/cli/oxlint.js +118 -0
  20. package/dist/esm/ultramodern-checks/cli/workspace-source-check.js +124 -0
  21. package/dist/esm/ultramodern-checks/index.js +3 -0
  22. package/dist/esm/ultramodern-checks/oxlint-plugin.js +316 -0
  23. package/dist/esm/ultramodern-package-source.js +61 -0
  24. package/dist/esm/ultramodern-workspace.js +5554 -0
  25. package/dist/esm-node/index.js +1003 -0
  26. package/dist/esm-node/locale/en.js +60 -0
  27. package/dist/esm-node/locale/index.js +10 -0
  28. package/dist/esm-node/locale/zh.js +60 -0
  29. package/dist/esm-node/ultramodern-checks/cli/i18n-check.js +27 -0
  30. package/dist/esm-node/ultramodern-checks/cli/oxlint.js +119 -0
  31. package/dist/esm-node/ultramodern-checks/cli/workspace-source-check.js +125 -0
  32. package/dist/esm-node/ultramodern-checks/index.js +4 -0
  33. package/dist/esm-node/ultramodern-checks/oxlint-plugin.js +317 -0
  34. package/dist/esm-node/ultramodern-package-source.js +62 -0
  35. package/dist/esm-node/ultramodern-workspace.js +5555 -0
  36. package/dist/types/locale/en.d.ts +3 -0
  37. package/dist/types/locale/index.d.ts +117 -2
  38. package/dist/types/locale/zh.d.ts +3 -0
  39. package/dist/types/ultramodern-checks/cli/i18n-check.d.ts +9 -0
  40. package/dist/types/ultramodern-checks/cli/oxlint.d.ts +22 -0
  41. package/dist/types/ultramodern-checks/cli/workspace-source-check.d.ts +8 -0
  42. package/dist/types/ultramodern-checks/index.d.ts +3 -0
  43. package/dist/types/ultramodern-checks/oxlint-plugin.d.ts +63 -0
  44. package/dist/types/ultramodern-package-source.d.ts +28 -0
  45. package/dist/types/ultramodern-workspace.d.ts +12 -2
  46. package/package.json +52 -11
  47. package/template/.codex/hooks.json +16 -0
  48. package/template/.github/renovate.json +53 -0
  49. package/template/.github/workflows/ultramodern-gates.yml.handlebars +34 -10
  50. package/template/.mise.toml.handlebars +2 -0
  51. package/template/AGENTS.md +9 -6
  52. package/template/README.md +66 -34
  53. package/template/api/effect/index.ts.handlebars +20 -9
  54. package/template/api/lambda/hello.ts.handlebars +5 -5
  55. package/template/config/favicon.svg +5 -0
  56. package/template/config/public/assets/ultramodern-logo.svg +6 -0
  57. package/template/config/public/locales/cs/translation.json +44 -0
  58. package/template/config/public/locales/en/translation.json +44 -0
  59. package/template/lefthook.yml +10 -0
  60. package/template/modern.config.ts.handlebars +35 -3
  61. package/template/oxfmt.config.ts +8 -1
  62. package/template/oxlint.config.ts +8 -1
  63. package/template/package.json.handlebars +36 -30
  64. package/template/pnpm-workspace.yaml +34 -0
  65. package/template/rstest.config.mts +5 -0
  66. package/template/scripts/bootstrap-agent-skills.mjs +148 -15
  67. package/template/scripts/check-i18n-strings.mjs +3 -0
  68. package/template/scripts/validate-ultramodern.mjs.handlebars +494 -3
  69. package/template/src/modern-app-env.d.ts +2 -0
  70. package/template/src/modern.runtime.ts.handlebars +17 -1
  71. package/template/src/routes/[lang]/page.tsx.handlebars +209 -0
  72. package/template/src/routes/index.css.handlebars +192 -55
  73. package/template/src/routes/layout.tsx.handlebars +2 -1
  74. package/template/tailwind.config.ts.handlebars +1 -1
  75. package/template/tests/tsconfig.json +7 -0
  76. package/template/tests/ultramodern.contract.test.ts.handlebars +160 -0
  77. package/template/tsconfig.json +2 -1
  78. package/template-workspace/.agents/agent-reference-repos.json +24 -0
  79. package/template-workspace/.agents/skills-lock.json +19 -0
  80. package/template-workspace/.codex/hooks.json +16 -0
  81. package/template-workspace/.github/renovate.json +29 -0
  82. package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +54 -0
  83. package/template-workspace/.gitignore.handlebars +5 -0
  84. package/template-workspace/.mise.toml.handlebars +2 -0
  85. package/template-workspace/AGENTS.md +36 -5
  86. package/template-workspace/README.md.handlebars +70 -11
  87. package/template-workspace/lefthook.yml +10 -0
  88. package/template-workspace/oxfmt.config.ts +1 -0
  89. package/template-workspace/oxlint.config.ts +1 -0
  90. package/template-workspace/pnpm-workspace.yaml +31 -8
  91. package/template-workspace/scripts/bootstrap-agent-skills.mjs +190 -21
  92. package/template-workspace/scripts/setup-agent-reference-repos.mjs +370 -0
  93. package/dist/index.js +0 -2474
  94. package/template/src/routes/page.tsx.handlebars +0 -136
  95. package/template-workspace/scripts/validate-ultramodern-workspace.mjs.handlebars +0 -405
@@ -0,0 +1,160 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { describe, expect, test } from '@rstest/core';
4
+
5
+ const root = process.cwd();
6
+ const readText = (relativePath: string) =>
7
+ fs.readFileSync(path.join(root, relativePath), 'utf-8');
8
+ const readJson = <T>(relativePath: string): T =>
9
+ JSON.parse(readText(relativePath)) as T;
10
+
11
+ describe('generated UltraModern contract', () => {
12
+ test('keeps localized route metadata and Rstest wiring', () => {
13
+ expect(fs.existsSync(path.join(root, 'src/routes/[lang]/page.tsx'))).toBe(
14
+ true,
15
+ );
16
+ expect(fs.existsSync(path.join(root, 'src/routes/page.tsx'))).toBe(false);
17
+ expect(fs.existsSync(path.join(root, 'src/routes/layout.tsx'))).toBe(true);
18
+ expect(fs.existsSync(path.join(root, 'oxlint.config.ts'))).toBe(true);
19
+ expect(fs.existsSync(path.join(root, 'oxfmt.config.ts'))).toBe(true);
20
+ {{#if enableTailwind}}
21
+ expect(fs.existsSync(path.join(root, 'postcss.config.mjs'))).toBe(true);
22
+ expect(fs.existsSync(path.join(root, 'tailwind.config.ts'))).toBe(true);
23
+ {{/if}}
24
+ {{#unless enableTailwind}}
25
+ expect(fs.existsSync(path.join(root, 'postcss.config.mjs'))).toBe(false);
26
+ expect(fs.existsSync(path.join(root, 'tailwind.config.ts'))).toBe(false);
27
+ {{/unless}}
28
+ });
29
+
30
+ test('keeps UltraModern starter web correctness defaults', () => {
31
+ const routePage = readText('src/routes/[lang]/page.tsx');
32
+ const routeCss = readText('src/routes/index.css');
33
+ const modernConfig = readText('modern.config.ts');
34
+ const enLocale = readJson<{
35
+ home?: {
36
+ meta?: {
37
+ description?: string;
38
+ title?: string;
39
+ };
40
+ skipLink?: string;
41
+ };
42
+ }>('config/public/locales/en/translation.json');
43
+
44
+ expect(fs.existsSync(path.join(root, 'config/favicon.svg'))).toBe(true);
45
+ expect(
46
+ fs.existsSync(
47
+ path.join(root, 'config/public/assets/ultramodern-logo.svg'),
48
+ ),
49
+ ).toBe(true);
50
+ expect(routePage).not.toContain('lf3-static.bytednsdoc.com');
51
+ expect(routePage).toContain('<Helmet');
52
+ expect(routePage).toContain('htmlAttributes={{');
53
+ expect(routePage).toContain('dir: languageDirections[currentLanguage]');
54
+ expect(routePage).toContain('lang: currentLanguage');
55
+ expect(routePage).toContain('<title>{pageTitle}</title>');
56
+ expect(routePage).toContain(
57
+ '<meta name="description" content={pageDescription} />',
58
+ );
59
+ expect(routePage).toContain(
60
+ '<main id="starter-main" className="starter-main">',
61
+ );
62
+ expect(routePage).toContain('<h1 id="starter-heading" className="title">');
63
+ expect(routePage).toContain('src="/assets/ultramodern-logo.svg"');
64
+ expect(routePage).toContain('height={96}');
65
+ expect(routePage).toContain('width={96}');
66
+ expect(routePage).toContain(
67
+ '<span aria-hidden="true" className="arrow-right" />',
68
+ );
69
+ expect(routePage).not.toContain('<div className="title">');
70
+ expect(modernConfig).toContain(
71
+ 'width=device-width, initial-scale=1.0, viewport-fit=cover',
72
+ );
73
+ expect(modernConfig).not.toContain('user-scalable=no');
74
+ expect(modernConfig).not.toContain('maximum-scale');
75
+ expect(routeCss).toContain('min-block-size: 100dvh');
76
+ expect(routeCss).toContain(
77
+ 'grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr))',
78
+ );
79
+ expect(routeCss).toContain(':focus-visible');
80
+ expect(routeCss).toContain('@media (prefers-reduced-motion: reduce)');
81
+ expect(routeCss).not.toContain('width: 1100px');
82
+ expect(enLocale.home?.meta?.title).toBe('UltraModern.js Starter');
83
+ expect(enLocale.home?.meta?.description).toBeTruthy();
84
+ expect(enLocale.home?.skipLink).toBeTruthy();
85
+ });
86
+
87
+ test('retains package-source metadata for generated Modern.js packages', () => {
88
+ const packageJson = readJson<{
89
+ dependencies?: Record<string, string>;
90
+ devDependencies?: Record<string, string>;
91
+ scripts?: Record<string, string>;
92
+ modernjs?: {
93
+ packageSource?: {
94
+ config?: string;
95
+ strategy?: string;
96
+ };
97
+ preset?: string;
98
+ };
99
+ }>('package.json');
100
+ const packageSource = readJson<{
101
+ modernPackages?: {
102
+ packages?: string[];
103
+ specifier?: string;
104
+ };
105
+ strategy?: string;
106
+ }>('.modernjs/ultramodern-package-source.json');
107
+
108
+ expect(packageJson.modernjs?.preset).toBe('presetUltramodern');
109
+ expect(packageJson.modernjs?.packageSource?.config).toBe(
110
+ './.modernjs/ultramodern-package-source.json',
111
+ );
112
+ expect(packageJson.modernjs?.packageSource?.strategy).toBe(
113
+ packageSource.strategy,
114
+ );
115
+ expect(packageSource.strategy).toMatch(/^(workspace|install)$/u);
116
+ const generatedModernDependencies = [
117
+ ...new Set(
118
+ (['dependencies', 'devDependencies'] as const).flatMap(section =>
119
+ Object.keys(packageJson[section] ?? {}),
120
+ ),
121
+ ),
122
+ ].filter(packageName => packageName.startsWith('@modern-js/'));
123
+ expect(packageSource.modernPackages?.packages?.length).toBeGreaterThan(0);
124
+ expect(packageSource.modernPackages?.packages).toEqual(
125
+ expect.arrayContaining(generatedModernDependencies),
126
+ );
127
+ expect(packageSource.modernPackages?.specifier).toBeTruthy();
128
+ expect(
129
+ packageJson.devDependencies?.['@modern-js/adapter-rstest'],
130
+ ).toBeTruthy();
131
+ expect(
132
+ packageJson.devDependencies?.['@modern-js/create'],
133
+ ).toBeTruthy();
134
+ expect(readText('scripts/check-i18n-strings.mjs')).toContain(
135
+ "from '@modern-js/create/ultramodern-checks'",
136
+ );
137
+ expect(packageJson.scripts?.format).toBe('oxfmt .');
138
+ expect(packageJson.scripts?.['format:check']).toBe('oxfmt --check .');
139
+ expect(packageJson.scripts?.lint).toBe('oxlint .');
140
+ expect(packageJson.scripts?.['lint:fix']).toBe('oxlint . --fix');
141
+ expect(packageJson.scripts?.['ultramodern:check']).toContain(
142
+ 'pnpm format:check && pnpm lint',
143
+ );
144
+ expect(packageJson.devDependencies?.oxfmt).toBe('0.53.0');
145
+ expect(packageJson.devDependencies?.oxlint).toBe('1.68.0');
146
+ expect(packageJson.devDependencies?.ultracite).toBe('7.8.1');
147
+ {{#if enableTailwind}}
148
+ expect(packageJson.devDependencies?.tailwindcss).toBe('^4.3.0');
149
+ expect(packageJson.devDependencies?.['@tailwindcss/postcss']).toBe(
150
+ '^4.3.0',
151
+ );
152
+ {{/if}}
153
+ {{#unless enableTailwind}}
154
+ expect(packageJson.devDependencies?.tailwindcss).toBeUndefined();
155
+ expect(
156
+ packageJson.devDependencies?.['@tailwindcss/postcss'],
157
+ ).toBeUndefined();
158
+ {{/unless}}
159
+ });
160
+ });
@@ -12,6 +12,7 @@
12
12
  "verbatimModuleSyntax": true,
13
13
  "noEmit": true,
14
14
  "allowJs": true,
15
+ "allowImportingTsExtensions": true,
15
16
  "resolveJsonModule": true,
16
17
  "esModuleInterop": true,
17
18
  "skipLibCheck": true,
@@ -115,6 +116,6 @@
115
116
  }
116
117
  ]
117
118
  },
118
- "include": ["src", "api", "shared", "config", "modern.config.ts"],
119
+ "include": ["src", "api", "shared", "config", "modern.config.ts", "server"],
119
120
  "exclude": ["**/node_modules"]
120
121
  }
@@ -0,0 +1,24 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "defaultEnabled": true,
4
+ "strategy": "git-subtree-squash",
5
+ "installDir": "repos",
6
+ "repositories": [
7
+ {
8
+ "id": "effect",
9
+ "name": "Effect",
10
+ "url": "https://github.com/Effect-TS/effect.git",
11
+ "ref": "main",
12
+ "path": "repos/effect",
13
+ "readOnly": true
14
+ },
15
+ {
16
+ "id": "ultramodern-js",
17
+ "name": "UltraModern.js",
18
+ "url": "https://github.com/BleedingDev/ultramodern.js.git",
19
+ "ref": "main-ultramodern",
20
+ "path": "repos/ultramodern.js",
21
+ "readOnly": true
22
+ }
23
+ ]
24
+ }
@@ -17,6 +17,20 @@
17
17
  "licensePath": ".agents/rstackjs-agent-skills-LICENSE",
18
18
  "install": "vendored"
19
19
  },
20
+ {
21
+ "id": "module-federation-agent-skills",
22
+ "visibility": "public",
23
+ "repository": "https://github.com/module-federation/agent-skills",
24
+ "commit": "07bb5b6c43ad457609e00c081b72d4c42508ec76",
25
+ "install": "clone",
26
+ "baseline": [
27
+ {
28
+ "name": "mf",
29
+ "path": ".agents/skills/mf",
30
+ "reason": "Module Federation docs, config inspection, type checking, shared dependency checks, and observability troubleshooting"
31
+ }
32
+ ]
33
+ },
20
34
  {
21
35
  "id": "techsiocz-private",
22
36
  "visibility": "private",
@@ -81,6 +95,11 @@
81
95
  "name": "rstest-best-practices",
82
96
  "path": ".agents/skills/rstest-best-practices",
83
97
  "reason": "Rstest configuration, test writing, mocking, snapshots, coverage, and CI behavior"
98
+ },
99
+ {
100
+ "name": "mf",
101
+ "path": ".agents/skills/mf",
102
+ "reason": "Module Federation docs, config inspection, type checking, shared dependency checks, and observability troubleshooting"
84
103
  }
85
104
  ],
86
105
  "excludedByDefault": [
@@ -0,0 +1,16 @@
1
+ {
2
+ "Stop": [
3
+ {
4
+ "command": "pnpm format && pnpm lint:fix && pnpm check",
5
+ "timeout": 600000,
6
+ "statusMessage": "Running UltraModern quality gates"
7
+ }
8
+ ],
9
+ "SubagentStop": [
10
+ {
11
+ "command": "pnpm format && pnpm lint:fix && pnpm check",
12
+ "timeout": 600000,
13
+ "statusMessage": "Running UltraModern quality gates"
14
+ }
15
+ ]
16
+ }
@@ -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,54 @@
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
+ env:
15
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
16
+
17
+ concurrency:
18
+ group: ultramodern-workspace-gates-${{ github.workflow }}-${{ github.ref }}
19
+ cancel-in-progress: true
20
+
21
+ jobs:
22
+ ultramodern-workspace-gates:
23
+ runs-on: ubuntu-latest
24
+ timeout-minutes: 30
25
+ steps:
26
+ - name: Harden Runner
27
+ uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2
28
+ with:
29
+ egress-policy: audit
30
+
31
+ - name: Checkout
32
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33
+ with:
34
+ fetch-depth: 1
35
+ persist-credentials: false
36
+
37
+ - name: Setup Node.js
38
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
39
+ with:
40
+ node-version: 24
41
+
42
+ - name: Setup mise
43
+ uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
44
+
45
+ - name: Install Dependencies
46
+ run: mise exec -- pnpm install --frozen-lockfile
47
+
48
+ - name: Validate Ultramodern Workspace Contract
49
+ run: mise exec -- pnpm run ultramodern:check
50
+
51
+ - name: Build Workspace Apps
52
+ env:
53
+ MODERN_PUBLIC_SITE_URL: http://localhost:8080
54
+ run: mise exec -- pnpm build
@@ -0,0 +1,5 @@
1
+ node_modules/
2
+ dist/
3
+ build/
4
+ .modernjs/cache/
5
+ .modernjs/agent-reference-repos-tmp/
@@ -0,0 +1,2 @@
1
+ [tools]
2
+ pnpm = "{{pnpmVersion}}"
@@ -1,6 +1,8 @@
1
1
  # UltraModern Agent Contract
2
2
 
3
- This workspace is generated as an agent-ready UltraModern.js SuperApp. Agents should treat the files under `.agents/skills` as local project instructions, not optional reading.
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.
4
6
 
5
7
  ## Quality Gates
6
8
 
@@ -8,6 +10,19 @@ This workspace is generated as an agent-ready UltraModern.js SuperApp. Agents sh
8
10
  - `pnpm format` runs oxfmt.
9
11
  - `pnpm typecheck` runs effect-tsgo as the TypeScript checker.
10
12
  - `pnpm check` runs formatting, linting, effect-tsgo, private-skill availability checks, and the generated workspace contract.
13
+ - Generated Codex stop hooks and subagent-stop hooks run `pnpm format && pnpm lint:fix && pnpm check`.
14
+ - `postinstall` formats the generated tree, initializes Git when needed, installs agent skills and reference repos, then installs `lefthook`. Generated `lefthook.yml` runs `pnpm format && pnpm lint:fix && pnpm check` on pre-commit; pre-push runs `pnpm check`.
15
+
16
+ ## Localized Routes
17
+
18
+ Generated apps keep locale-prefixed entry routes under `src/routes/[lang]`,
19
+ static language links, and canonical plus `hreflang` metadata. A new workspace
20
+ starts shell-only; `create <domain> --vertical` adds route-owned metadata,
21
+ localized resources, and Effect BFF surfaces for that domain. Runtime i18n is
22
+ not enabled in the starter because the current React 19 + Module Federation
23
+ streaming SSR stack must render predictably first. Production builds fail unless
24
+ `MODERN_PUBLIC_SITE_URL` is set per deployed app, so canonical URLs always use
25
+ the production origin.
11
26
 
12
27
  ## Required Skill Baseline
13
28
 
@@ -20,6 +35,9 @@ Use these skills when the task touches the matching subsystem:
20
35
  - `rslib-best-practices`: Shared packages, generated libraries, declaration output, and Rslib configuration.
21
36
  - `rslib-modern-package`: Package contracts for shared libraries, exports, side effects, dependency placement, README, and release readiness.
22
37
  - `rstest-best-practices`: Rstest configuration, test writing, mocking, snapshots, coverage, and CI test behavior.
38
+ - `mf`: Module Federation docs, Modern.js integration, DTS/type checks, shared dependency checks, runtime errors, and observability troubleshooting.
39
+
40
+ The public `module-federation/agent-skills` repository is installed during `pnpm install` and `pnpm skills:install`. `pnpm skills:check` fails when the required public `mf` skill is missing.
23
41
 
24
42
  ## Private Skills
25
43
 
@@ -29,17 +47,30 @@ ScriptedAlchemy/TechsioCZ skills are private and are cloned only when the curren
29
47
  pnpm skills:install
30
48
  ```
31
49
 
32
- The installer copies only the allowlisted private skills from `.agents/skills-lock.json`: `plan-graph`, `dag`, `subagent-graph`, `helm`, and `debugger-mode`.
50
+ The installer copies only the pinned private skills from `.agents/skills-lock.json`: `plan-graph`, `dag`, `subagent-graph`, `helm`, and `debugger-mode`.
51
+
52
+ ## Agent Reference Repositories
53
+
54
+ The workspace installs read-only source references under `repos/` by default during `pnpm install` using `git subtree add --squash`. These repositories are reference material for coding agents, not application source:
55
+
56
+ - `repos/effect` from `Effect-TS/effect`.
57
+ - `repos/ultramodern.js` from `BleedingDev/ultramodern.js`.
58
+
59
+ 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. To skip this setup, run installs with `ULTRAMODERN_SKIP_AGENT_REPOS=1`.
33
60
 
34
61
  ## Project Priorities
35
62
 
36
63
  - Keep `presetUltramodern` as the single preset.
37
- - Prefer Effect for BFF/service code.
64
+ - Keep the initial workspace shell-only unless a user explicitly asks for a
65
+ starter vertical.
66
+ - Use `create <domain> --vertical` as the growth path for real business
67
+ MicroVerticals.
68
+ - Prefer Effect for BFF code.
38
69
  - Prefer TanStack Router for app routing.
39
- - Keep design-system code as a normal Micro Frontend or shared package, not a special core path.
70
+ - Keep UI-kit or design-system code as ordinary vertical or shared package code, not a special core path.
40
71
  - Keep generated packages explicit and publishable: stable `exports`, correct declarations, small public APIs, and clear ownership metadata.
41
72
  - Do not add migration tooling or codemods unless the project owner explicitly asks for migration work.
42
73
 
43
74
  ## Skill Provenance
44
75
 
45
- The vendored Rstack skills and private TechsioCZ skill allowlist 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 `pnpm check`.
76
+ 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 `pnpm check`.
@@ -3,23 +3,57 @@
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 scaffolds the canonical Micro Vertical
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 and remote manifest wiring.
10
- - `apps/remotes/remote-commerce` owns the commerce vertical remote.
11
- - `apps/remotes/remote-identity` owns the identity vertical remote.
12
- - `apps/remotes/remote-design-system` owns the horizontal design-system remote.
13
- - `services/service-recommendations-effect` owns the Effect BFF service.
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,
11
+ design tokens, and Effect API sharing.
12
+ - `verticals/*` is intentionally empty until a real business domain is added.
15
13
 
16
- Run the scaffold validator before adding business code:
14
+ Add a full-stack MicroVertical when the product needs one:
17
15
 
18
16
  ```bash
19
- pnpm ultramodern:check
17
+ pnpm dlx @bleedingdev/modern-js-create transportation --vertical
18
+ pnpm dlx @bleedingdev/modern-js-create payments --vertical
20
19
  ```
21
20
 
22
- The topology and ownership metadata are generated under `topology/`.
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. Private app,
29
+ auth, tenant, dashboard, and internal routes publish no discovery output unless
30
+ route metadata explicitly marks them `public && indexable`. The default scaffold
31
+ therefore emits only a disallowing `robots.txt`; sitemap, web manifest,
32
+ `llms.txt`, API catalog, security.txt, and JSON-LD output stay omitted until a
33
+ safe public route or public docs/help/product surface exists.
34
+
35
+ Run the scaffold validator before adding business code and after every
36
+ `--vertical` mutation:
37
+
38
+ ```bash
39
+ mise install
40
+ pnpm install
41
+ pnpm check
42
+ pnpm build
43
+ ```
44
+
45
+ By default, `pnpm install` also prepares read-only agent reference repositories
46
+ under `repos/` for Effect and UltraModern.js source lookup using squashed git
47
+ subtrees. Disable this setup with
48
+ `ULTRAMODERN_SKIP_AGENT_REPOS=1 pnpm install`, or rerun it
49
+ explicitly with `pnpm agents:refs:install`.
50
+
51
+ The topology and ownership metadata are generated under `topology/`. The
52
+ workspace also ships `.github/workflows/ultramodern-workspace-gates.yml` and
53
+ `.github/renovate.json` with read-only workflow permissions, commit-pinned
54
+ actions, frozen installs, StepSecurity audit-mode runner hardening, dependency
55
+ dashboard review, one-day release age, grouped updates, and manual approval for
56
+ major upgrades.
23
57
 
24
58
  Package source metadata is generated at
25
59
  `.modernjs/ultramodern-package-source.json`. The default strategy keeps
@@ -27,3 +61,28 @@ UltraModern.js runtime and tooling packages on `workspace:*` for monorepo
27
61
  development. To create a workspace that can install those packages outside the
28
62
  monorepo, generate with `--ultramodern-package-source install`; generated shared
29
63
  packages still use `workspace:*` because they are part of this workspace.
64
+
65
+ ## Cloudflare Proof
66
+
67
+ Deploy the generated apps, then pass each deployed app's generated public URL
68
+ env key into the proof step. A shell-only workspace only needs the shell URL;
69
+ added verticals use the same `ULTRAMODERN_PUBLIC_URL_<APP_ID>` pattern with
70
+ hyphens converted to underscores and uppercased.
71
+
72
+ ```bash
73
+ pnpm cloudflare:deploy
74
+ ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP=https://shell-super-app.example.workers.dev \
75
+ pnpm cloudflare:proof -- --require-public-urls
76
+ ```
77
+
78
+ ## Troubleshooting
79
+
80
+ | Symptom | Current check | Owner |
81
+ | --- | --- | --- |
82
+ | 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 |
83
+ | Install failure | Check the active Node/pnpm from `mise install`; rerun `pnpm install` after the shell sees the pinned versions. | Toolchain setup |
84
+ | 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 |
85
+ | Missing public URL | Set the env key from `.modernjs/ultramodern-generated-contract.json`, for example `ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP`. | Deployment operator |
86
+ | Cloudflare credentials | Confirm Wrangler credentials before `pnpm cloudflare:deploy`; local checks do not prove live Worker access. | Deployment operator |
87
+ | 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 |
88
+ | 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,10 @@
1
+ pre-commit:
2
+ commands:
3
+ fix-and-check:
4
+ run: pnpm format && pnpm lint:fix && pnpm check
5
+ stage_fixed: true
6
+
7
+ pre-push:
8
+ commands:
9
+ check:
10
+ run: pnpm check
@@ -8,6 +8,7 @@ export default defineConfig({
8
8
  '**/*.json',
9
9
  'dist',
10
10
  'node_modules',
11
+ 'repos/**',
11
12
  '.modern',
12
13
  '.modernjs',
13
14
  '**/routeTree.gen.ts',
@@ -12,6 +12,7 @@ export default defineConfig({
12
12
  '.agents',
13
13
  'dist',
14
14
  'node_modules',
15
+ 'repos/**',
15
16
  '.modern',
16
17
  '.modernjs',
17
18
  '**/routeTree.gen.ts',
@@ -1,17 +1,40 @@
1
1
  packages:
2
2
  - apps/*
3
- - apps/remotes/*
4
- - services/*
3
+ - verticals/*
5
4
  - packages/*
6
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': 1.170.15
31
+ node-fetch: '^3.3.2'
32
+
7
33
  allowBuilds:
8
34
  '@swc/core': true
9
35
  core-js: true
10
36
  esbuild: true
37
+ lefthook: true
11
38
  msgpackr-extract: true
12
-
13
- onlyBuiltDependencies:
14
- - '@swc/core'
15
- - core-js
16
- - esbuild
17
- - msgpackr-extract
39
+ sharp: true
40
+ workerd: true