@bleedingdev/modern-js-create 3.2.0-ultramodern.117 → 3.2.0-ultramodern.119
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 +35 -125
- package/dist/cjs/create-package-root.cjs +1 -1
- package/dist/cjs/index.cjs +11 -602
- package/dist/cjs/locale/en.cjs +12 -19
- package/dist/cjs/locale/zh.cjs +12 -19
- package/dist/cjs/ultramodern-workspace.cjs +18 -21
- package/dist/esm/create-package-root.js +1 -1
- package/dist/esm/index.js +13 -603
- package/dist/esm/locale/en.js +12 -19
- package/dist/esm/locale/zh.js +12 -19
- package/dist/esm/ultramodern-workspace.js +19 -19
- package/dist/esm-node/create-package-root.js +1 -1
- package/dist/esm-node/index.js +13 -603
- package/dist/esm-node/locale/en.js +12 -19
- package/dist/esm-node/locale/zh.js +12 -19
- package/dist/esm-node/ultramodern-workspace.js +19 -19
- package/dist/types/locale/en.d.ts +0 -7
- package/dist/types/locale/index.d.ts +0 -14
- package/dist/types/locale/zh.d.ts +0 -7
- package/dist/types/ultramodern-workspace.d.ts +0 -1
- package/package.json +4 -5
- package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +22 -6
- package/template-workspace/AGENTS.md +8 -4
- package/template-workspace/README.md.handlebars +11 -1
- package/template-workspace/lefthook.yml +18 -4
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +38 -24
- package/template/.agents/skills-lock.json +0 -34
- package/template/.browserslistrc +0 -4
- package/template/.codex/hooks.json +0 -16
- package/template/.github/renovate.json +0 -53
- package/template/.github/workflows/ultramodern-gates.yml.handlebars +0 -54
- package/template/.gitignore.handlebars +0 -30
- package/template/.mise.toml.handlebars +0 -2
- package/template/.nvmrc +0 -2
- package/template/AGENTS.md +0 -23
- package/template/README.md +0 -111
- package/template/api/effect/index.ts.handlebars +0 -34
- package/template/api/lambda/hello.ts.handlebars +0 -6
- package/template/config/favicon.svg +0 -5
- package/template/config/public/assets/ultramodern-logo.svg +0 -6
- package/template/config/public/locales/cs/translation.json +0 -44
- package/template/config/public/locales/en/translation.json +0 -44
- package/template/lefthook.yml +0 -10
- package/template/modern.config.ts.handlebars +0 -78
- package/template/oxfmt.config.ts +0 -15
- package/template/oxlint.config.ts +0 -19
- package/template/package.json.handlebars +0 -69
- package/template/pnpm-workspace.yaml +0 -34
- package/template/postcss.config.mjs.handlebars +0 -6
- package/template/rstest.config.mts +0 -5
- package/template/scripts/bootstrap-agent-skills.mjs +0 -228
- package/template/scripts/check-i18n-strings.mjs +0 -3
- package/template/scripts/validate-ultramodern.mjs.handlebars +0 -658
- package/template/shared/effect/api.ts.handlebars +0 -17
- package/template/src/modern-app-env.d.ts +0 -3
- package/template/src/modern.runtime.ts.handlebars +0 -23
- package/template/src/routes/[lang]/page.tsx.handlebars +0 -209
- package/template/src/routes/index.css.handlebars +0 -266
- package/template/src/routes/layout.tsx.handlebars +0 -10
- package/template/tailwind.config.ts.handlebars +0 -10
- package/template/tests/tsconfig.json +0 -7
- package/template/tests/ultramodern.contract.test.ts.handlebars +0 -163
- package/template/tsconfig.json +0 -121
|
@@ -7,6 +7,16 @@ const root = process.cwd();
|
|
|
7
7
|
const lockPath = path.join(root, '.agents/skills-lock.json');
|
|
8
8
|
const checkOnly = process.argv.includes('--check');
|
|
9
9
|
const force = process.argv.includes('--force');
|
|
10
|
+
const postinstall = process.argv.includes('--postinstall');
|
|
11
|
+
const truthy = value => /^(1|true|yes|on)$/i.test(String(value ?? ''));
|
|
12
|
+
const falsy = value => /^(0|false|no|off)$/i.test(String(value ?? ''));
|
|
13
|
+
const skipRequested =
|
|
14
|
+
truthy(process.env.ULTRAMODERN_SKIP_AGENT_SKILLS) ||
|
|
15
|
+
falsy(process.env.ULTRAMODERN_AGENT_SKILLS);
|
|
16
|
+
const cloneTimeoutMs = Number.parseInt(
|
|
17
|
+
process.env.ULTRAMODERN_AGENT_SKILLS_CLONE_TIMEOUT_MS ?? '60000',
|
|
18
|
+
10,
|
|
19
|
+
);
|
|
10
20
|
|
|
11
21
|
const readJson = filePath => JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
12
22
|
|
|
@@ -15,6 +25,7 @@ const run = (command, args, options = {}) =>
|
|
|
15
25
|
cwd: options.cwd ?? root,
|
|
16
26
|
encoding: 'utf-8',
|
|
17
27
|
stdio: options.stdio ?? ['ignore', 'pipe', 'pipe'],
|
|
28
|
+
timeout: options.timeout,
|
|
18
29
|
});
|
|
19
30
|
|
|
20
31
|
const commandExists = command => {
|
|
@@ -106,12 +117,14 @@ const removeTree = dir =>
|
|
|
106
117
|
|
|
107
118
|
const cloneSource = (source, targetDir) => {
|
|
108
119
|
if (source.commit) {
|
|
109
|
-
run('git', ['init', targetDir]);
|
|
120
|
+
run('git', ['init', targetDir], { timeout: 30000 });
|
|
110
121
|
run('git', ['remote', 'add', 'origin', source.repository], {
|
|
111
122
|
cwd: targetDir,
|
|
123
|
+
timeout: 30000,
|
|
112
124
|
});
|
|
113
125
|
run('git', ['fetch', '--depth', '1', '--quiet', 'origin', source.commit], {
|
|
114
126
|
cwd: targetDir,
|
|
127
|
+
timeout: cloneTimeoutMs,
|
|
115
128
|
});
|
|
116
129
|
run(
|
|
117
130
|
'git',
|
|
@@ -123,32 +136,24 @@ const cloneSource = (source, targetDir) => {
|
|
|
123
136
|
'--quiet',
|
|
124
137
|
'FETCH_HEAD',
|
|
125
138
|
],
|
|
126
|
-
{ cwd: targetDir },
|
|
139
|
+
{ cwd: targetDir, timeout: 30000 },
|
|
127
140
|
);
|
|
128
141
|
return;
|
|
129
142
|
}
|
|
130
143
|
|
|
131
144
|
const repo = source.repository.replace(/^https:\/\/github.com\//u, '');
|
|
132
145
|
try {
|
|
133
|
-
run(
|
|
134
|
-
'
|
|
135
|
-
'clone',
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
'--',
|
|
139
|
-
'--depth',
|
|
140
|
-
'1',
|
|
141
|
-
'--quiet',
|
|
142
|
-
]);
|
|
146
|
+
run(
|
|
147
|
+
'gh',
|
|
148
|
+
['repo', 'clone', repo, targetDir, '--', '--depth', '1', '--quiet'],
|
|
149
|
+
{ timeout: cloneTimeoutMs },
|
|
150
|
+
);
|
|
143
151
|
} catch {
|
|
144
|
-
run(
|
|
145
|
-
'
|
|
146
|
-
'--depth',
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
source.repository,
|
|
150
|
-
targetDir,
|
|
151
|
-
]);
|
|
152
|
+
run(
|
|
153
|
+
'git',
|
|
154
|
+
['clone', '--depth', '1', '--quiet', source.repository, targetDir],
|
|
155
|
+
{ timeout: cloneTimeoutMs },
|
|
156
|
+
);
|
|
152
157
|
}
|
|
153
158
|
};
|
|
154
159
|
|
|
@@ -186,6 +191,17 @@ const requiredSkills = [
|
|
|
186
191
|
skills.findIndex(candidate => candidate.name === skill.name) === index,
|
|
187
192
|
);
|
|
188
193
|
|
|
194
|
+
if (skipRequested) {
|
|
195
|
+
const reason = 'agent skills bootstrap skipped by environment';
|
|
196
|
+
if (checkOnly) {
|
|
197
|
+
console.log(reason);
|
|
198
|
+
process.exit(0);
|
|
199
|
+
}
|
|
200
|
+
console.log(reason);
|
|
201
|
+
installLefthook();
|
|
202
|
+
process.exit(0);
|
|
203
|
+
}
|
|
204
|
+
|
|
189
205
|
if (checkOnly) {
|
|
190
206
|
const missingRequired = requiredSkills
|
|
191
207
|
.map(skill => skill.name)
|
|
@@ -230,10 +246,8 @@ for (const source of [...requiredCloneSources, ...optionalCloneSources]) {
|
|
|
230
246
|
try {
|
|
231
247
|
cloneSource(source, tempDir);
|
|
232
248
|
} catch (error) {
|
|
233
|
-
if (source.install === 'clone-if-authorized') {
|
|
234
|
-
console.warn(
|
|
235
|
-
`Skipping ${source.repository}; current developer may not have access.`,
|
|
236
|
-
);
|
|
249
|
+
if (source.install === 'clone-if-authorized' || postinstall) {
|
|
250
|
+
console.warn(`Skipping ${source.repository}; ${error.message}`);
|
|
237
251
|
continue;
|
|
238
252
|
}
|
|
239
253
|
throw error;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 2,
|
|
3
|
-
"installDir": ".agents/skills",
|
|
4
|
-
"sources": [
|
|
5
|
-
{
|
|
6
|
-
"id": "techsiocz-private",
|
|
7
|
-
"visibility": "private",
|
|
8
|
-
"repository": "https://github.com/TechsioCZ/skills",
|
|
9
|
-
"install": "clone-if-authorized",
|
|
10
|
-
"baseline": [
|
|
11
|
-
{
|
|
12
|
-
"name": "plan-graph",
|
|
13
|
-
"reason": "Build and validate DAGs from .plan.md files"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"name": "dag",
|
|
17
|
-
"reason": "Inspect current plan frontiers and blocked lanes"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"name": "subagent-graph",
|
|
21
|
-
"reason": "Design dependency-aware multi-agent launch graphs"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "helm",
|
|
25
|
-
"reason": "Steer already-running multi-agent work"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"name": "debugger-mode",
|
|
29
|
-
"reason": "Run hypothesis-driven debugging with runtime evidence"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|
package/template/.browserslistrc
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Stop": [
|
|
3
|
-
{
|
|
4
|
-
"command": "pnpm format && pnpm lint:fix && pnpm ultramodern:check",
|
|
5
|
-
"timeout": 600000,
|
|
6
|
-
"statusMessage": "Running UltraModern quality gates"
|
|
7
|
-
}
|
|
8
|
-
],
|
|
9
|
-
"SubagentStop": [
|
|
10
|
-
{
|
|
11
|
-
"command": "pnpm format && pnpm lint:fix && pnpm ultramodern:check",
|
|
12
|
-
"timeout": 600000,
|
|
13
|
-
"statusMessage": "Running UltraModern quality gates"
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
-
"extends": [
|
|
4
|
-
"config:recommended",
|
|
5
|
-
"helpers:pinGitHubActionDigests"
|
|
6
|
-
],
|
|
7
|
-
"dependencyDashboard": true,
|
|
8
|
-
"minimumReleaseAge": "1 day",
|
|
9
|
-
"prConcurrentLimit": 5,
|
|
10
|
-
"prHourlyLimit": 2,
|
|
11
|
-
"rangeStrategy": "bump",
|
|
12
|
-
"schedule": [
|
|
13
|
-
"before 5am on monday"
|
|
14
|
-
],
|
|
15
|
-
"timezone": "Etc/UTC",
|
|
16
|
-
"packageRules": [
|
|
17
|
-
{
|
|
18
|
-
"matchManagers": [
|
|
19
|
-
"github-actions"
|
|
20
|
-
],
|
|
21
|
-
"groupName": "github-actions",
|
|
22
|
-
"labels": [
|
|
23
|
-
"dependencies",
|
|
24
|
-
"github-actions",
|
|
25
|
-
"security"
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"matchManagers": [
|
|
30
|
-
"npm"
|
|
31
|
-
],
|
|
32
|
-
"matchUpdateTypes": [
|
|
33
|
-
"patch",
|
|
34
|
-
"minor"
|
|
35
|
-
],
|
|
36
|
-
"groupName": "npm minor and patch updates",
|
|
37
|
-
"labels": [
|
|
38
|
-
"dependencies",
|
|
39
|
-
"npm"
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"matchUpdateTypes": [
|
|
44
|
-
"major"
|
|
45
|
-
],
|
|
46
|
-
"dependencyDashboardApproval": true,
|
|
47
|
-
"labels": [
|
|
48
|
-
"dependencies",
|
|
49
|
-
"major"
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
name: Ultramodern 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-gates-${{ github.workflow }}-${{ github.ref }}
|
|
19
|
-
cancel-in-progress: true
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
ultramodern-gates:
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
timeout-minutes: 20
|
|
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 Contract
|
|
49
|
-
run: mise exec -- pnpm run ultramodern:check
|
|
50
|
-
|
|
51
|
-
- name: Build
|
|
52
|
-
env:
|
|
53
|
-
MODERN_PUBLIC_SITE_URL: http://localhost:8080
|
|
54
|
-
run: mise exec -- pnpm run build
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.DS_Store
|
|
2
|
-
|
|
3
|
-
.pnp
|
|
4
|
-
.pnp.js
|
|
5
|
-
.env.local
|
|
6
|
-
.env.*.local
|
|
7
|
-
.history
|
|
8
|
-
*.log*
|
|
9
|
-
|
|
10
|
-
node_modules/
|
|
11
|
-
.yarn-integrity
|
|
12
|
-
.pnpm-store/
|
|
13
|
-
*.tsbuildinfo
|
|
14
|
-
.changeset/pre.json
|
|
15
|
-
|
|
16
|
-
dist/
|
|
17
|
-
coverage/
|
|
18
|
-
release/
|
|
19
|
-
output/
|
|
20
|
-
output_resource/
|
|
21
|
-
log/
|
|
22
|
-
|
|
23
|
-
.vscode/**/*
|
|
24
|
-
!.vscode/settings.json
|
|
25
|
-
!.vscode/extensions.json
|
|
26
|
-
.idea/
|
|
27
|
-
|
|
28
|
-
**/*/typings/auto-generated
|
|
29
|
-
|
|
30
|
-
modern.config.local.*
|
package/template/.nvmrc
DELETED
package/template/AGENTS.md
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# UltraModern Agent Contract
|
|
2
|
-
|
|
3
|
-
This project is generated for Codex-first UltraModern.js work.
|
|
4
|
-
|
|
5
|
-
## Quality Gates
|
|
6
|
-
|
|
7
|
-
- `pnpm lint` runs Oxlint with the Ultracite preset.
|
|
8
|
-
- `pnpm format` runs oxfmt.
|
|
9
|
-
- `pnpm typecheck` runs effect-tsgo as the TypeScript checker.
|
|
10
|
-
- `pnpm i18n:check` rejects hardcoded user-visible JSX text.
|
|
11
|
-
- `pnpm ultramodern:check` verifies the generated contract.
|
|
12
|
-
- Generated Codex stop hooks and subagent-stop hooks run `pnpm format && pnpm lint:fix && pnpm ultramodern:check`.
|
|
13
|
-
- `postinstall` formats the generated tree, installs private orchestration skills when available, initializes a Git repository when needed, and installs `lefthook`. Generated `lefthook.yml` runs `pnpm format && pnpm lint:fix && pnpm ultramodern:check` on pre-commit; pre-push runs `pnpm ultramodern:check`.
|
|
14
|
-
|
|
15
|
-
## Internationalization
|
|
16
|
-
|
|
17
|
-
Runtime i18n is enabled by default. Agents must put user-visible UI copy in `config/public/locales/<lang>/translation.json` and render it through `react-i18next` or `@modern-js/plugin-i18n/runtime`. Do not add hardcoded JSX text, `aria-label`, `title`, `alt`, or `placeholder` strings unless the value is a non-translatable technical token.
|
|
18
|
-
|
|
19
|
-
Routes are locale-prefixed by default through `localePathRedirect: true`. Keep localized pages under `src/routes/[lang]`, use links for language switching, and preserve canonical plus `hreflang` metadata. Production builds fail unless `MODERN_PUBLIC_SITE_URL` is set, so deployed canonical URLs always use the production origin.
|
|
20
|
-
|
|
21
|
-
## Private Skills
|
|
22
|
-
|
|
23
|
-
Private orchestration skills are installed automatically during `pnpm install` when the current developer is authorized for `TechsioCZ/skills`. The installer clones that private repository and copies only the allowlisted skills from `.agents/skills-lock.json`; unauthorized developers get a warning and can continue with the public contract.
|
package/template/README.md
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
# UltraModern.js 3.0 Starter
|
|
2
|
-
|
|
3
|
-
This generated app is a simple UltraModern.js starting point. It gives one app
|
|
4
|
-
with localized routes, production URL metadata, optional BFF support, Rstest,
|
|
5
|
-
Oxlint, oxfmt, and a local contract check. You can build a useful product here
|
|
6
|
-
without deleting fake product areas, shell packages, or deployment topology.
|
|
7
|
-
|
|
8
|
-
## Setup
|
|
9
|
-
|
|
10
|
-
Install the dependencies:
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
mise install
|
|
14
|
-
pnpm install
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Get Started
|
|
18
|
-
|
|
19
|
-
Start the dev server:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
pnpm dev
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Build the app for production:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
MODERN_PUBLIC_SITE_URL=https://example.com pnpm build
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Preview the production build locally:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
pnpm serve
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Run the local gates before treating the scaffold as ready:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
pnpm run ultramodern:check
|
|
41
|
-
MODERN_PUBLIC_SITE_URL=https://example.com pnpm run build
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## What You Get
|
|
45
|
-
|
|
46
|
-
The default app is intentionally monolith-friendly:
|
|
47
|
-
|
|
48
|
-
| Area | Starting Point |
|
|
49
|
-
| --- | --- |
|
|
50
|
-
| App routes | Locale-prefixed pages under `src/routes/[lang]` |
|
|
51
|
-
| Copy | English and Czech resources in `config/public/locales` |
|
|
52
|
-
| Web defaults | Local favicon/logo assets, localized metadata, semantic starter markup |
|
|
53
|
-
| Styling | App-local CSS, with Tailwind files only when selected |
|
|
54
|
-
| Server logic | Optional BFF entrypoints under `api/` |
|
|
55
|
-
| Tests | Rstest smoke coverage in `tests/` |
|
|
56
|
-
| Agent workflow | Generated `AGENTS.md`, hooks, and local quality gates |
|
|
57
|
-
|
|
58
|
-
Keep feature code in the app while one team owns the workflow, release train,
|
|
59
|
-
and operational behavior. Add ordinary workspace packages for shared tokens,
|
|
60
|
-
small UI primitives, generated clients, or domain-neutral utilities when that
|
|
61
|
-
keeps the app easier to understand.
|
|
62
|
-
|
|
63
|
-
## Customize The App
|
|
64
|
-
|
|
65
|
-
Start with the generated page and replace the placeholder cards with your first
|
|
66
|
-
real routes, actions, and API calls. Put user-visible text in
|
|
67
|
-
`config/public/locales/<lang>/translation.json`, then render it through
|
|
68
|
-
`react-i18next` or `@modern-js/plugin-i18n/runtime`.
|
|
69
|
-
|
|
70
|
-
The starter keeps favicon and logo assets local in `config/favicon.svg` and
|
|
71
|
-
`config/public/assets/ultramodern-logo.svg`. Replace those files when your app
|
|
72
|
-
has product branding. The localized page title and description live in the same
|
|
73
|
-
translation resources as the visible UI copy.
|
|
74
|
-
|
|
75
|
-
Tune the preset in `modern.config.ts`. Production builds require
|
|
76
|
-
`MODERN_PUBLIC_SITE_URL` so canonical and `hreflang` URLs use your deployed
|
|
77
|
-
origin. The local fallback is `http://localhost:8080`.
|
|
78
|
-
|
|
79
|
-
The generated preset defaults are opt-out. Disable specific contracts via env
|
|
80
|
-
vars when your app needs a softer lane:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
MODERN_BASELINE_ENABLE_MF_SSR=false
|
|
84
|
-
MODERN_BASELINE_ENABLE_BFF_REQUEST_ID=false
|
|
85
|
-
MODERN_BASELINE_ENABLE_TELEMETRY_EXPORTERS=false
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## Grow When Needed
|
|
89
|
-
|
|
90
|
-
Stay in the single app until a boundary has a real owner and operational reason
|
|
91
|
-
to split. A separate package is usually enough when you only need reusable code.
|
|
92
|
-
Consider a larger workspace boundary later when a feature needs independent
|
|
93
|
-
ownership, rollout, rollback, incident routing, or deployment evidence.
|
|
94
|
-
|
|
95
|
-
The public opinionated entrypoint is `presetUltramodern(...)`. It keeps Effect,
|
|
96
|
-
TanStack, SSR, BFF, i18n, and quality gates available without requiring a
|
|
97
|
-
distributed app layout on day one.
|
|
98
|
-
|
|
99
|
-
## Generated Automation
|
|
100
|
-
|
|
101
|
-
The generated starter includes `.github/workflows/ultramodern-gates.yml` and
|
|
102
|
-
`.github/renovate.json` for full app projects. The workflow runs
|
|
103
|
-
`pnpm run ultramodern:check` and `pnpm run build` on every push and pull request
|
|
104
|
-
with read-only permissions, commit-pinned actions, frozen installs, and
|
|
105
|
-
StepSecurity audit-mode runner hardening. Renovate is configured for dependency
|
|
106
|
-
dashboard review, one-day release age, grouped updates, action digest pinning,
|
|
107
|
-
and manual approval for major upgrades.
|
|
108
|
-
|
|
109
|
-
For more information, see the
|
|
110
|
-
[UltraModern.js guide](https://bleedingdev.github.io/ultramodern.js/guides/get-started/ultramodern.html)
|
|
111
|
-
and the [UltraModern.js documentation](https://bleedingdev.github.io/ultramodern.js/).
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{{#if useEffectBff}}import {
|
|
2
|
-
Effect,
|
|
3
|
-
HttpApiBuilder,
|
|
4
|
-
Layer,
|
|
5
|
-
defineEffectBff,
|
|
6
|
-
} from '@modern-js/plugin-bff/effect-server';
|
|
7
|
-
import type { HttpApi, HttpApiGroup } from '@modern-js/plugin-bff/effect-server';
|
|
8
|
-
import { bffEffectApi } from '../../shared/effect/api.ts';
|
|
9
|
-
|
|
10
|
-
type ApiGroups<TApi> = TApi extends HttpApi.HttpApi<string, infer TGroups> ? TGroups : never;
|
|
11
|
-
type GreetingsHandlers = HttpApiBuilder.Handlers.FromGroup<
|
|
12
|
-
HttpApiGroup.WithName<ApiGroups<typeof bffEffectApi>, 'greetings'>
|
|
13
|
-
>;
|
|
14
|
-
|
|
15
|
-
const greetingsLayer = HttpApiBuilder.group(
|
|
16
|
-
bffEffectApi,
|
|
17
|
-
'greetings',
|
|
18
|
-
(handlers: GreetingsHandlers) =>
|
|
19
|
-
handlers.handle('hello', () =>
|
|
20
|
-
Effect.succeed({
|
|
21
|
-
message: 'Hello from Effect HttpApi',
|
|
22
|
-
runtime: 'effect' as const,
|
|
23
|
-
}),
|
|
24
|
-
),
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
const layer = HttpApiBuilder.layer(bffEffectApi).pipe(
|
|
28
|
-
Layer.provide(greetingsLayer),
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
export default defineEffectBff({
|
|
32
|
-
api: bffEffectApi,
|
|
33
|
-
layer,
|
|
34
|
-
});{{/if}}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="UltraModern.js">
|
|
2
|
-
<rect width="64" height="64" rx="12" fill="#111827"/>
|
|
3
|
-
<path fill="#35d399" d="M14 17h9v21c0 5 3 8 9 8s9-3 9-8V17h9v22c0 11-8 18-18 18s-18-7-18-18V17Z"/>
|
|
4
|
-
<path fill="#ffffff" d="M28 17h8v25h-8z"/>
|
|
5
|
-
</svg>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 160" role="img" aria-label="UltraModern.js logo">
|
|
2
|
-
<rect width="160" height="160" rx="28" fill="#111827"/>
|
|
3
|
-
<path fill="#35d399" d="M42 36h22v56c0 22 14 34 36 34s36-12 36-34V36h22v57c0 35-24 57-58 57S42 128 42 93V36Z"/>
|
|
4
|
-
<path fill="#ffffff" d="M76 36h20v74H76z"/>
|
|
5
|
-
<path fill="#8be8ff" d="M112 36h18v74h-18z"/>
|
|
6
|
-
</svg>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"home": {
|
|
3
|
-
"bff": {
|
|
4
|
-
"response": "Odpoved Effect HttpApi:"
|
|
5
|
-
},
|
|
6
|
-
"cards": {
|
|
7
|
-
"bff": {
|
|
8
|
-
"body": "Pridej serverovou logiku, kdyz route potrebuje typovana data nebo mutace.",
|
|
9
|
-
"title": "BFF + Effect"
|
|
10
|
-
},
|
|
11
|
-
"config": {
|
|
12
|
-
"body": "Upravuj vychozi hodnoty v modern.config.ts podle rustu aplikace.",
|
|
13
|
-
"title": "Konfigurace presetUltramodern"
|
|
14
|
-
},
|
|
15
|
-
"gates": {
|
|
16
|
-
"body": "Pred releasem spust ultramodern:check, testy, typecheck, lint a build.",
|
|
17
|
-
"title": "Ultramodern kontroly"
|
|
18
|
-
},
|
|
19
|
-
"guide": {
|
|
20
|
-
"body": "Zacni jednou aplikaci a pridej routy, API nebo balicky az kdyz pomuzou.",
|
|
21
|
-
"title": "UltraModern.js pruvodce"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"description": {
|
|
25
|
-
"afterConfig": "podle rustu aplikace a udrzuj",
|
|
26
|
-
"afterPreset": "profilem. Lad",
|
|
27
|
-
"end": "zelene pri pridavani rout, API a workspace balicku.",
|
|
28
|
-
"intro": "Zacni s verejnym"
|
|
29
|
-
},
|
|
30
|
-
"language": {
|
|
31
|
-
"cs": "Cestina",
|
|
32
|
-
"en": "Anglictina",
|
|
33
|
-
"switcher": "Jazyk"
|
|
34
|
-
},
|
|
35
|
-
"logoAlt": "Logo UltraModern.js",
|
|
36
|
-
"meta": {
|
|
37
|
-
"description": "Lokalizovany starter aplikace UltraModern.js se silnymi vychozimi hodnotami pro komplexni produkty.",
|
|
38
|
-
"title": "UltraModern.js Starter"
|
|
39
|
-
},
|
|
40
|
-
"name": "Jednoduchy starter aplikace",
|
|
41
|
-
"skipLink": "Preskocit na obsah",
|
|
42
|
-
"title": "UltraModern.js Starter"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"home": {
|
|
3
|
-
"bff": {
|
|
4
|
-
"response": "Effect HttpApi response:"
|
|
5
|
-
},
|
|
6
|
-
"cards": {
|
|
7
|
-
"bff": {
|
|
8
|
-
"body": "Add server logic when a route needs typed data or mutation handling.",
|
|
9
|
-
"title": "BFF + Effect"
|
|
10
|
-
},
|
|
11
|
-
"config": {
|
|
12
|
-
"body": "Tune generated defaults in modern.config.ts as the app grows.",
|
|
13
|
-
"title": "Configure presetUltramodern"
|
|
14
|
-
},
|
|
15
|
-
"gates": {
|
|
16
|
-
"body": "Run ultramodern:check, tests, typecheck, lint, and build before release.",
|
|
17
|
-
"title": "Ultramodern Gates"
|
|
18
|
-
},
|
|
19
|
-
"guide": {
|
|
20
|
-
"body": "Start with one app, then add routes, APIs, and packages when they help.",
|
|
21
|
-
"title": "UltraModern.js Guide"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"description": {
|
|
25
|
-
"afterConfig": "as the app grows, and keep",
|
|
26
|
-
"afterPreset": "profile. Tune",
|
|
27
|
-
"end": "green while you add routes, APIs, and workspace packages.",
|
|
28
|
-
"intro": "Start from the public"
|
|
29
|
-
},
|
|
30
|
-
"language": {
|
|
31
|
-
"cs": "Czech",
|
|
32
|
-
"en": "English",
|
|
33
|
-
"switcher": "Language"
|
|
34
|
-
},
|
|
35
|
-
"logoAlt": "UltraModern.js Logo",
|
|
36
|
-
"meta": {
|
|
37
|
-
"description": "A localized UltraModern.js app starter with strong defaults for complex products.",
|
|
38
|
-
"title": "UltraModern.js Starter"
|
|
39
|
-
},
|
|
40
|
-
"name": "Simple app starter",
|
|
41
|
-
"skipLink": "Skip to content",
|
|
42
|
-
"title": "UltraModern.js Starter"
|
|
43
|
-
}
|
|
44
|
-
}
|