@bleedingdev/modern-js-sandpack-react 3.2.0-ultramodern.11 → 3.2.0-ultramodern.12
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/dist/cjs/templates/common.js +2 -2
- package/dist/cjs/templates/mwa.js +9 -6
- package/dist/esm/templates/common.mjs +2 -2
- package/dist/esm/templates/mwa.mjs +9 -6
- package/dist/esm-node/templates/common.mjs +2 -2
- package/dist/esm-node/templates/mwa.mjs +9 -6
- package/dist/types/templates/common.d.ts +1 -1
- package/dist/types/templates/mwa.d.ts +4 -1
- package/package.json +2 -2
|
@@ -27,8 +27,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27
27
|
commonFiles: ()=>commonFiles
|
|
28
28
|
});
|
|
29
29
|
const commonFiles = {
|
|
30
|
-
".codesandbox/
|
|
31
|
-
".codesandbox/
|
|
30
|
+
".codesandbox/tasks.json": "{\n \"$schema\": \"https://codesandbox.io/schemas/tasks.json\",\n \"setupTasks\": [\n {\n \"name\": \"Installing Dependencies\",\n \"command\": \"pnpm install\"\n }\n ],\n \"tasks\": {\n \"start\": {\n \"name\": \"Application\",\n \"command\": \"pnpm run start\",\n \"runAtStart\": true,\n \"restartOn\": {\n \"files\": [\"pnpm-lock.yaml\"]\n }\n }\n }\n}\n",
|
|
31
|
+
".codesandbox/environment.json": "{\n \"nodeVersion\": 18\n}\n"
|
|
32
32
|
};
|
|
33
33
|
exports.commonFiles = __webpack_exports__.commonFiles;
|
|
34
34
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
@@ -32,26 +32,29 @@ const MWAFiles = {
|
|
|
32
32
|
".browserslistrc": "chrome >= 87\nedge >= 88\nfirefox >= 78\nsafari >= 14\n",
|
|
33
33
|
".gitignore": ".DS_Store\n\n.pnp\n.pnp.js\n.env.local\n.env.*.local\n.history\n*.log*\n\nnode_modules/\n.yarn-integrity\n.pnpm-store/\n*.tsbuildinfo\n.changeset/pre.json\n\ndist/\ncoverage/\nrelease/\noutput/\noutput_resource/\nlog/\n\n.vscode/**/*\n!.vscode/settings.json\n!.vscode/extensions.json\n.idea/\n\n**/*/typings/auto-generated\n\nmodern.config.local.*\n",
|
|
34
34
|
".npmrc": "strict-peer-dependencies=false\n",
|
|
35
|
-
"AGENTS.md": "# UltraModern Agent Contract\n\nThis project is generated for Codex-first UltraModern.js work.\n\n## Quality Gates\n\n- `pnpm lint` runs Oxlint with the Ultracite preset.\n- `pnpm format` runs oxfmt.\n- `pnpm typecheck` runs effect-tsgo as the TypeScript checker.\n- `pnpm ultramodern:check` verifies the generated contract.\n\n## Private Skills\n\nPrivate orchestration skills are not vendored into this template. If you are authorized for `TechsioCZ/skills`, run:\n\n```bash\npnpm skills:install\n```\n\nThe installer clones that private repository and copies only the allowlisted skills from `.agents/skills-lock.json`.\n",
|
|
36
|
-
"modern.config.ts": "// @effect-diagnostics nodeBuiltinImport:off processEnv:off\nimport { appTools, defineConfig, presetUltramodern } from '@modern-js/app-tools';\nimport path from 'node:path';\nconst appId = process.env['MODERN_BASELINE_APP_ID'] || path.basename(process.cwd());\nconst enableModuleFederationSSR = process.env['MODERN_BASELINE_ENABLE_MF_SSR'] !== 'false';\nconst enableBffRequestId = process.env['MODERN_BASELINE_ENABLE_BFF_REQUEST_ID'] !== 'false';\nconst enableTelemetryExporters =\n process.env['MODERN_BASELINE_ENABLE_TELEMETRY_EXPORTERS'] !== 'false';\nconst telemetryFailLoudStartup = process.env['MODERN_TELEMETRY_FAIL_LOUD_STARTUP'] !== 'false';\nconst otlpEndpoint = process.env['MODERN_TELEMETRY_OTLP_ENDPOINT'];\nconst victoriaMetricsEndpoint = process.env['MODERN_TELEMETRY_VICTORIA_ENDPOINT'];\n\n// https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html\nexport default defineConfig(\n presetUltramodern(\n {\n plugins: [\n appTools(),\n ],\n },\n {\n appId,\n enableBffRequestId,\n enableModuleFederationSSR,\n enableTelemetryExporters,\n telemetryFailLoudStartup,\n ...(typeof otlpEndpoint === 'string' ? { otlpEndpoint } : {}),\n ...(typeof victoriaMetricsEndpoint === 'string' ? { victoriaMetricsEndpoint } : {}),\n },\n ),\n);\n",
|
|
35
|
+
"AGENTS.md": "# UltraModern Agent Contract\n\nThis project is generated for Codex-first UltraModern.js work.\n\n## Quality Gates\n\n- `pnpm lint` runs Oxlint with the Ultracite preset.\n- `pnpm format` runs oxfmt.\n- `pnpm typecheck` runs effect-tsgo as the TypeScript checker.\n- `pnpm i18n:check` rejects hardcoded user-visible JSX text.\n- `pnpm ultramodern:check` verifies the generated contract.\n\n## Internationalization\n\nRuntime 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.\n\n## Private Skills\n\nPrivate orchestration skills are not vendored into this template. If you are authorized for `TechsioCZ/skills`, run:\n\n```bash\npnpm skills:install\n```\n\nThe installer clones that private repository and copies only the allowlisted skills from `.agents/skills-lock.json`.\n",
|
|
36
|
+
"modern.config.ts": "// @effect-diagnostics nodeBuiltinImport:off processEnv:off\nimport { appTools, defineConfig, presetUltramodern } from '@modern-js/app-tools';\nimport path from 'node:path';\nimport { i18nPlugin } from '@modern-js/plugin-i18n';\nconst appId = process.env['MODERN_BASELINE_APP_ID'] || path.basename(process.cwd());\nconst enableModuleFederationSSR = process.env['MODERN_BASELINE_ENABLE_MF_SSR'] !== 'false';\nconst enableBffRequestId = process.env['MODERN_BASELINE_ENABLE_BFF_REQUEST_ID'] !== 'false';\nconst enableTelemetryExporters =\n process.env['MODERN_BASELINE_ENABLE_TELEMETRY_EXPORTERS'] !== 'false';\nconst telemetryFailLoudStartup = process.env['MODERN_TELEMETRY_FAIL_LOUD_STARTUP'] !== 'false';\nconst otlpEndpoint = process.env['MODERN_TELEMETRY_OTLP_ENDPOINT'];\nconst victoriaMetricsEndpoint = process.env['MODERN_TELEMETRY_VICTORIA_ENDPOINT'];\n\n// https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html\nexport default defineConfig(\n presetUltramodern(\n {\n plugins: [\n appTools(),\n i18nPlugin({\n localeDetection: {\n fallbackLanguage: 'en',\n languages: ['en', 'cs'],\n },\n }),\n ],\n },\n {\n appId,\n enableBffRequestId,\n enableModuleFederationSSR,\n enableTelemetryExporters,\n telemetryFailLoudStartup,\n ...(typeof otlpEndpoint === 'string' ? { otlpEndpoint } : {}),\n ...(typeof victoriaMetricsEndpoint === 'string' ? { victoriaMetricsEndpoint } : {}),\n },\n ),\n);\n",
|
|
37
37
|
"oxfmt.config.ts": "import { defineConfig } from 'oxfmt';\nimport ultracite from 'ultracite/oxfmt';\n\nexport default defineConfig({\n extends: [ultracite],\n ignorePatterns: ['dist', 'node_modules', '.modern', '.modernjs', '**/routeTree.gen.ts'],\n singleQuote: true,\n});\n",
|
|
38
38
|
"oxlint.config.ts": "import { defineConfig } from 'oxlint';\nimport core from 'ultracite/oxlint/core';\nimport react from 'ultracite/oxlint/react';\n\nexport default defineConfig({\n env: {\n browser: true,\n node: true,\n },\n extends: [core, react],\n ignorePatterns: ['dist', 'node_modules', '.modern', '.modernjs', '**/routeTree.gen.ts'],\n});\n",
|
|
39
|
-
"package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "type": "module",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "serve": "modern serve",\n "typecheck": "node -e \\"const fs = require(\'node:fs\'); const { execFileSync, spawnSync } = require(\'node:child_process\'); const bin = execFileSync(\'effect-tsgo\', [\'get-exe-path\'], { encoding: \'utf8\' }).trim(); if (process.platform !== \'win32\') fs.chmodSync(bin, 0o755); const result = spawnSync(bin, [\'--noEmit\', \'-p\', \'tsconfig.json\'], { stdio: \'inherit\' }); process.exit(result.status ?? 1);\\"",\n "skills:install": "node ./scripts/bootstrap-agent-skills.mjs",\n "skills:check": "node ./scripts/bootstrap-agent-skills.mjs --check",\n "ultramodern:check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm skills:check && node ./scripts/validate-ultramodern.mjs",\n "format": "oxfmt .",\n "format:check": "oxfmt --check .",\n "lint": "oxlint .",\n "lint:fix": "oxlint . --fix",\n "prepare": "simple-git-hooks"\n },\n "dependencies": {\n "@modern-js/runtime": "",\n "react": "^19.2.3",\n "react-dom": "^19.2.0"\n },\n "devDependencies": {\n "@effect/tsgo": "0.7.3",\n "@modern-js/app-tools": "",\n "@modern-js/tsconfig": "",\n "@types/node": "^20",\n "@types/react": "^19.1.8",\n "@types/react-dom": "^19.1.6",\n "@typescript/native-preview": "7.0.0-dev.20260518.1",\n "lint-staged": "~15.4.0",\n "oxfmt": "0.50.0",\n "oxlint": "1.65.0",\n "rimraf": "^6.0.1",\n "simple-git-hooks": "^2.11.1",\n "ultracite": "7.7.0"\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "oxfmt --write",\n "oxlint --fix"\n ]\n },\n "engines": {\n "node": ">=20"\n }\n}\n',
|
|
39
|
+
"package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "type": "module",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "serve": "modern serve",\n "typecheck": "node -e \\"const fs = require(\'node:fs\'); const { execFileSync, spawnSync } = require(\'node:child_process\'); const bin = execFileSync(\'effect-tsgo\', [\'get-exe-path\'], { encoding: \'utf8\' }).trim(); if (process.platform !== \'win32\') fs.chmodSync(bin, 0o755); const result = spawnSync(bin, [\'--noEmit\', \'-p\', \'tsconfig.json\'], { stdio: \'inherit\' }); process.exit(result.status ?? 1);\\"",\n "i18n:check": "node ./scripts/check-i18n-strings.mjs",\n "skills:install": "node ./scripts/bootstrap-agent-skills.mjs",\n "skills:check": "node ./scripts/bootstrap-agent-skills.mjs --check",\n "ultramodern:check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm i18n:check && pnpm skills:check && node ./scripts/validate-ultramodern.mjs",\n "format": "oxfmt .",\n "format:check": "oxfmt --check .",\n "lint": "oxlint .",\n "lint:fix": "oxlint . --fix",\n "prepare": "simple-git-hooks"\n },\n "dependencies": {\n "@modern-js/plugin-i18n": "",\n "@modern-js/runtime": "",\n "i18next": "26.2.0",\n "react": "^19.2.3",\n "react-dom": "^19.2.0",\n "react-i18next": "17.0.8"\n },\n "devDependencies": {\n "@effect/tsgo": "0.7.3",\n "@modern-js/app-tools": "",\n "@modern-js/tsconfig": "",\n "@types/node": "^20",\n "@types/react": "^19.1.8",\n "@types/react-dom": "^19.1.6",\n "@typescript/native-preview": "7.0.0-dev.20260518.1",\n "lint-staged": "~15.4.0",\n "oxfmt": "0.50.0",\n "oxlint": "1.65.0",\n "rimraf": "^6.0.1",\n "simple-git-hooks": "^2.11.1",\n "ultracite": "7.7.0"\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "oxfmt --write",\n "oxlint --fix"\n ]\n },\n "engines": {\n "node": ">=20"\n }\n}\n',
|
|
40
40
|
"postcss.config.mjs": "",
|
|
41
41
|
"tailwind.config.ts": "",
|
|
42
42
|
"tsconfig.json": "{\n \"extends\": \"@modern-js/tsconfig/base\",\n \"compilerOptions\": {\n \"declaration\": false,\n \"jsx\": \"preserve\",\n \"target\": \"ESNext\",\n \"lib\": [\"ESNext\", \"DOM\", \"DOM.Iterable\"],\n \"module\": \"preserve\",\n \"moduleResolution\": \"Bundler\",\n \"moduleDetection\": \"force\",\n \"isolatedModules\": true,\n \"verbatimModuleSyntax\": true,\n \"noEmit\": true,\n \"allowJs\": true,\n \"resolveJsonModule\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true,\n \"strict\": true,\n \"noUncheckedIndexedAccess\": true,\n \"exactOptionalPropertyTypes\": true,\n \"noImplicitOverride\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"paths\": {\n \"@/*\": [\"./src/*\"],\n \"@api/*\": [\"./api/*\"],\n \"@shared/*\": [\"./shared/*\"]\n },\n \"rootDir\": \".\",\n \"plugins\": [\n {\n \"name\": \"@effect/language-service\",\n \"diagnostics\": true,\n \"includeSuggestionsInTsc\": true,\n \"ignoreEffectSuggestionsInTscExitCode\": false,\n \"ignoreEffectWarningsInTscExitCode\": false,\n \"ignoreEffectErrorsInTscExitCode\": false,\n \"skipDisabledOptimization\": true,\n \"diagnosticSeverity\": {\n \"anyUnknownInErrorContext\": \"error\",\n \"classSelfMismatch\": \"error\",\n \"duplicatePackage\": \"error\",\n \"effectFnImplicitAny\": \"error\",\n \"floatingEffect\": \"error\",\n \"genericEffectServices\": \"error\",\n \"missingEffectContext\": \"error\",\n \"missingEffectError\": \"error\",\n \"missingLayerContext\": \"error\",\n \"missingReturnYieldStar\": \"error\",\n \"missingStarInYieldEffectGen\": \"error\",\n \"nonObjectEffectServiceType\": \"error\",\n \"outdatedApi\": \"error\",\n \"overriddenSchemaConstructor\": \"error\",\n \"catchUnfailableEffect\": \"error\",\n \"effectFnIife\": \"error\",\n \"effectGenUsesAdapter\": \"error\",\n \"effectInFailure\": \"error\",\n \"effectInVoidSuccess\": \"error\",\n \"globalErrorInEffectCatch\": \"error\",\n \"globalErrorInEffectFailure\": \"error\",\n \"layerMergeAllWithDependencies\": \"error\",\n \"lazyPromiseInEffectSync\": \"error\",\n \"leakingRequirements\": \"error\",\n \"multipleEffectProvide\": \"error\",\n \"returnEffectInGen\": \"error\",\n \"runEffectInsideEffect\": \"error\",\n \"schemaSyncInEffect\": \"error\",\n \"scopeInLayerEffect\": \"error\",\n \"strictEffectProvide\": \"error\",\n \"tryCatchInEffectGen\": \"error\",\n \"unknownInEffectCatch\": \"error\",\n \"asyncFunction\": \"error\",\n \"cryptoRandomUUID\": \"error\",\n \"cryptoRandomUUIDInEffect\": \"error\",\n \"extendsNativeError\": \"error\",\n \"globalConsole\": \"error\",\n \"globalConsoleInEffect\": \"error\",\n \"globalDate\": \"error\",\n \"globalDateInEffect\": \"error\",\n \"globalFetch\": \"error\",\n \"globalFetchInEffect\": \"error\",\n \"globalRandom\": \"error\",\n \"globalRandomInEffect\": \"error\",\n \"globalTimers\": \"error\",\n \"globalTimersInEffect\": \"error\",\n \"instanceOfSchema\": \"error\",\n \"newPromise\": \"error\",\n \"nodeBuiltinImport\": \"error\",\n \"preferSchemaOverJson\": \"error\",\n \"processEnv\": \"error\",\n \"processEnvInEffect\": \"error\",\n \"unsafeEffectTypeAssertion\": \"error\",\n \"catchAllToMapError\": \"error\",\n \"deterministicKeys\": \"error\",\n \"effectDoNotation\": \"error\",\n \"effectFnOpportunity\": \"error\",\n \"effectMapFlatten\": \"error\",\n \"effectMapVoid\": \"error\",\n \"effectSucceedWithVoid\": \"error\",\n \"missedPipeableOpportunity\": \"error\",\n \"missingEffectServiceDependency\": \"error\",\n \"nestedEffectGenYield\": \"error\",\n \"redundantSchemaTagIdentifier\": \"error\",\n \"schemaStructWithTag\": \"error\",\n \"schemaUnionOfLiterals\": \"error\",\n \"serviceNotAsClass\": \"error\",\n \"strictBooleanExpressions\": \"error\",\n \"unnecessaryArrowBlock\": \"error\",\n \"unnecessaryEffectGen\": \"error\",\n \"unnecessaryFailYieldableError\": \"error\",\n \"unnecessaryPipe\": \"error\",\n \"unnecessaryPipeChain\": \"error\"\n }\n }\n ]\n },\n \"include\": [\"src\", \"api\", \"shared\", \"config\", \"modern.config.ts\"],\n \"exclude\": [\"**/node_modules\"]\n}\n",
|
|
43
43
|
".agents/skills-lock.json": "{\n \"schemaVersion\": 2,\n \"installDir\": \".agents/skills\",\n \"sources\": [\n {\n \"id\": \"techsiocz-private\",\n \"visibility\": \"private\",\n \"repository\": \"https://github.com/TechsioCZ/skills\",\n \"install\": \"clone-if-authorized\",\n \"baseline\": [\n {\n \"name\": \"plan-graph\",\n \"reason\": \"Build and validate DAGs from .plan.md files\"\n },\n {\n \"name\": \"dag\",\n \"reason\": \"Inspect current plan frontiers and blocked lanes\"\n },\n {\n \"name\": \"subagent-graph\",\n \"reason\": \"Design dependency-aware multi-agent launch graphs\"\n },\n {\n \"name\": \"helm\",\n \"reason\": \"Steer already-running multi-agent work\"\n },\n {\n \"name\": \"debugger-mode\",\n \"reason\": \"Run hypothesis-driven debugging with runtime evidence\"\n }\n ]\n }\n ]\n}\n",
|
|
44
44
|
"scripts/bootstrap-agent-skills.mjs": "import { execFileSync } from 'node:child_process';\nimport fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\n\nconst root = process.cwd();\nconst lockPath = path.join(root, '.agents/skills-lock.json');\nconst checkOnly = process.argv.includes('--check');\nconst force = process.argv.includes('--force');\n\nconst readJson = (filePath) => JSON.parse(fs.readFileSync(filePath, 'utf-8'));\n\nconst run = (command, args, options = {}) =>\n execFileSync(command, args, {\n cwd: options.cwd ?? root,\n encoding: 'utf-8',\n stdio: options.stdio ?? ['ignore', 'pipe', 'pipe'],\n });\n\nconst cloneSource = (source, targetDir) => {\n const repo = source.repository.replace(/^https:\\/\\/github.com\\//u, '');\n try {\n run('gh', ['repo', 'clone', repo, targetDir, '--', '--depth', '1'], {\n stdio: 'inherit',\n });\n } catch {\n run('git', ['clone', '--depth', '1', source.repository, targetDir], {\n stdio: 'inherit',\n });\n }\n};\n\nconst resolveSkillDir = (sourceRoot, skillName) => {\n const candidates = [\n path.join(sourceRoot, skillName),\n path.join(sourceRoot, 'skills', skillName),\n path.join(sourceRoot, 'skills', 'engineering', skillName),\n path.join(sourceRoot, 'skills', 'productivity', skillName),\n ];\n return candidates.find((candidate) => fs.existsSync(path.join(candidate, 'SKILL.md')));\n};\n\nif (!fs.existsSync(lockPath)) {\n console.error('Missing .agents/skills-lock.json');\n process.exit(1);\n}\n\nconst lock = readJson(lockPath);\nconst installDir = path.join(root, lock.installDir ?? '.agents/skills');\nconst privateSources = (lock.sources ?? []).filter(\n (source) => source.install === 'clone-if-authorized',\n);\n\nif (checkOnly) {\n const missing = privateSources.flatMap((source) =>\n (source.baseline ?? [])\n .map((skill) => skill.name)\n .filter((skillName) => !fs.existsSync(path.join(installDir, skillName, 'SKILL.md'))),\n );\n if (missing.length > 0) {\n console.warn(\n `Private skills not installed: ${missing.join(', ')}. Run pnpm skills:install if you have access.`,\n );\n } else {\n console.log('Agent skills are installed.');\n }\n process.exit(0);\n}\n\nfs.mkdirSync(installDir, { recursive: true });\n\nfor (const source of privateSources) {\n const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ultramodern-skills-'));\n try {\n cloneSource(source, tempDir);\n for (const skill of source.baseline ?? []) {\n const sourceSkillDir = resolveSkillDir(tempDir, skill.name);\n if (!sourceSkillDir) {\n throw new Error(`Skill ${skill.name} not found in ${source.repository}`);\n }\n const targetSkillDir = path.join(installDir, skill.name);\n if (fs.existsSync(targetSkillDir)) {\n if (!force) {\n console.log(`Skipping existing ${skill.name}`);\n continue;\n }\n fs.rmSync(targetSkillDir, { force: true, recursive: true });\n }\n fs.cpSync(sourceSkillDir, targetSkillDir, { recursive: true });\n console.log(`Installed ${skill.name}`);\n }\n } finally {\n fs.rmSync(tempDir, { force: true, recursive: true });\n }\n}\n",
|
|
45
|
-
"scripts/
|
|
45
|
+
"scripts/check-i18n-strings.mjs": "import fs from 'node:fs';\nimport path from 'node:path';\n\nconst root = process.cwd();\nconst scanRoots = ['src'].map((scanRoot) => path.join(root, scanRoot));\nconst ignoredDirectories = new Set(['.modern', '.modernjs', 'dist', 'node_modules']);\nconst visibleAttributePattern =\n /\\s(?:aria-label|alt|placeholder|title)=[\"']([^\"']*[A-Za-z][^\"']*)[\"']/gu;\nconst jsxTextPattern = />([^<>{}]*[A-Za-z][^<>{}]*)</gu;\n\nconst collectFiles = (directory) => {\n if (!fs.existsSync(directory)) {\n return [];\n }\n\n const files = [];\n for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {\n if (entry.isDirectory()) {\n if (!ignoredDirectories.has(entry.name)) {\n files.push(...collectFiles(path.join(directory, entry.name)));\n }\n continue;\n }\n\n if (entry.isFile() && /\\.(jsx|tsx)$/u.test(entry.name) && !entry.name.endsWith('.d.ts')) {\n files.push(path.join(directory, entry.name));\n }\n }\n return files;\n};\n\nconst lineNumberForIndex = (content, index) => content.slice(0, index).split('\\n').length;\nconst isIgnoredLine = (content, index) => {\n const lineStart = content.lastIndexOf('\\n', index) + 1;\n const lineEnd = content.indexOf('\\n', index);\n const currentLineEnd = lineEnd === -1 ? content.length : lineEnd;\n const previousLineStart = content.lastIndexOf('\\n', Math.max(0, lineStart - 2)) + 1;\n const nextLineEnd = content.indexOf('\\n', currentLineEnd + 1);\n const context = content.slice(\n previousLineStart,\n nextLineEnd === -1 ? content.length : nextLineEnd,\n );\n return /i18n-ignore/u.test(context);\n};\n\nconst violations = [];\nfor (const filePath of scanRoots.flatMap(collectFiles)) {\n const content = fs.readFileSync(filePath, 'utf-8');\n for (const match of content.matchAll(visibleAttributePattern)) {\n if (!isIgnoredLine(content, match.index ?? 0)) {\n violations.push({\n filePath,\n line: lineNumberForIndex(content, match.index ?? 0),\n text: match[1].trim(),\n });\n }\n }\n\n for (const match of content.matchAll(jsxTextPattern)) {\n const text = match[1].replaceAll(/\\s+/gu, ' ').trim();\n if (text && !isIgnoredLine(content, match.index ?? 0)) {\n violations.push({\n filePath,\n line: lineNumberForIndex(content, match.index ?? 0),\n text,\n });\n }\n }\n}\n\nif (violations.length > 0) {\n console.error('Hardcoded user-visible JSX strings found. Move copy to locale JSON files.');\n for (const violation of violations) {\n console.error(\n `${path.relative(root, violation.filePath)}:${violation.line} ${JSON.stringify(\n violation.text,\n )}`,\n );\n }\n process.exit(1);\n}\n\nconsole.log('No hardcoded user-visible JSX strings found.');\n",
|
|
46
|
+
"scripts/validate-ultramodern.mjs": "import fs from 'node:fs';\nimport path from 'node:path';\n\nconst configPath = path.resolve(process.cwd(), 'modern.config.ts');\nconst templateManifestPath = path.resolve(process.cwd(), '.modernjs/mv-template-manifest.json');\n\nif (!fs.existsSync(configPath)) {\n console.error('modern.config.ts not found');\n process.exit(1);\n}\n\nconst content = fs.readFileSync(configPath, 'utf-8');\nconst requiredTokens = [\n 'presetUltramodern(',\n 'appTools()',\n 'enableModuleFederationSSR',\n 'enableBffRequestId',\n 'enableTelemetryExporters',\n 'i18nPlugin(',\n];\nconst missing = requiredTokens.filter((token) => !content.includes(token));\n\nif (missing.length > 0) {\n console.error(`Ultramodern contract check failed. Missing tokens: ${missing.join(', ')}`);\n process.exit(1);\n}\n\nif (!fs.existsSync(templateManifestPath)) {\n console.error('.modernjs/mv-template-manifest.json not found');\n process.exit(1);\n}\n\nconst templateManifest = JSON.parse(fs.readFileSync(templateManifestPath, 'utf-8'));\nconst requiredDeniedPaths = [\n '.git/**',\n '.github/**',\n '.npmrc',\n '.yarnrc',\n '.env',\n '.env.*',\n 'node_modules/**',\n 'dist/**',\n];\nconst requiredPostMaterialization = [\n 'ultramodern-contract-check',\n 'dependency-install-with-lifecycle-deny',\n 'template-manifest-retained',\n];\nconst requiredPaths = [\n 'AGENTS.md',\n '.agents/skills-lock.json',\n 'oxlint.config.ts',\n 'oxfmt.config.ts',\n 'scripts/bootstrap-agent-skills.mjs',\n 'scripts/check-i18n-strings.mjs',\n 'config/public/locales/en/translation.json',\n 'config/public/locales/cs/translation.json',\n];\nconst manifestErrors = [];\n\nfor (const requiredPath of requiredPaths) {\n if (!fs.existsSync(path.resolve(process.cwd(), requiredPath))) {\n console.error(`${requiredPath} not found`);\n process.exit(1);\n }\n}\n\nif (templateManifest.schemaVersion !== 1) {\n manifestErrors.push('schemaVersion');\n}\n\nif (templateManifest.source?.type !== 'builtin') {\n manifestErrors.push('source.type');\n}\n\nif (\n !Array.isArray(templateManifest.integrity?.checksums) ||\n !templateManifest.integrity.checksums.some(\n (checksum) =>\n checksum.algorithm === 'sha256' &&\n checksum.scope === 'source-tree' &&\n /^[0-9a-f]{64}$/u.test(checksum.value),\n )\n) {\n manifestErrors.push('integrity.checksums[source-tree]');\n}\n\nfor (const deniedPath of requiredDeniedPaths) {\n if (!templateManifest.materialization?.deniedPaths?.includes(deniedPath)) {\n manifestErrors.push(`materialization.deniedPaths:${deniedPath}`);\n }\n}\n\nif (templateManifest.lifecyclePolicy?.denyByDefault !== true) {\n manifestErrors.push('lifecyclePolicy.denyByDefault');\n}\n\nfor (const token of requiredPostMaterialization) {\n if (!templateManifest.validation?.postMaterializationValidation?.includes(token)) {\n manifestErrors.push(`validation.postMaterializationValidation:${token}`);\n }\n}\n\nif (manifestErrors.length > 0) {\n console.error(\n `Ultramodern template manifest check failed. Invalid fields: ${manifestErrors.join(', ')}`,\n );\n process.exit(1);\n}\n\nconst packageJson = JSON.parse(\n fs.readFileSync(path.resolve(process.cwd(), 'package.json'), 'utf-8'),\n);\nconst unresolvedTemplateMarker = String.fromCodePoint(123, 123);\nif (JSON.stringify(packageJson).includes(unresolvedTemplateMarker)) {\n console.error('package.json contains unresolved template markers');\n process.exit(1);\n}\nconst skillsLock = JSON.parse(\n fs.readFileSync(path.resolve(process.cwd(), '.agents/skills-lock.json'), 'utf-8'),\n);\nconst requiredScripts = {\n format: 'oxfmt .',\n 'format:check': 'oxfmt --check .',\n 'i18n:check': 'node ./scripts/check-i18n-strings.mjs',\n lint: 'oxlint .',\n 'lint:fix': 'oxlint . --fix',\n 'skills:check': 'node ./scripts/bootstrap-agent-skills.mjs --check',\n 'skills:install': 'node ./scripts/bootstrap-agent-skills.mjs',\n};\n\nfor (const [scriptName, scriptCommand] of Object.entries(requiredScripts)) {\n if (packageJson.scripts?.[scriptName] !== scriptCommand) {\n console.error(`Missing or invalid package script: ${scriptName}`);\n process.exit(1);\n }\n}\n\nif (\n !packageJson.scripts?.typecheck?.includes('effect-tsgo') ||\n !packageJson.scripts.typecheck.includes('get-exe-path')\n) {\n console.error('typecheck must use effect-tsgo as the TypeScript checker');\n process.exit(1);\n}\n\nfor (const dependency of ['@modern-js/plugin-i18n', 'i18next', 'react-i18next']) {\n if (!packageJson.dependencies?.[dependency]) {\n console.error(`Missing dependency: ${dependency}`);\n process.exit(1);\n }\n}\n\nfor (const dependency of [\n '@effect/tsgo',\n '@typescript/native-preview',\n 'oxlint',\n 'oxfmt',\n 'ultracite',\n]) {\n if (!packageJson.devDependencies?.[dependency]) {\n console.error(`Missing devDependency: ${dependency}`);\n process.exit(1);\n }\n}\n\nconst privateSource = skillsLock.sources?.find(\n (source) => source.repository === 'https://github.com/TechsioCZ/skills',\n);\nconst privateSkills = new Set(privateSource?.baseline?.map((skill) => skill.name));\nfor (const skillName of ['plan-graph', 'dag', 'subagent-graph', 'helm', 'debugger-mode']) {\n if (!privateSkills.has(skillName)) {\n console.error(`Missing private skill allowlist entry: ${skillName}`);\n process.exit(1);\n }\n}\n\nconsole.log('Ultramodern contract check passed.');\n",
|
|
46
47
|
".github/workflows/ultramodern-gates.yml": "name: Ultramodern Gates\n\non:\n push:\n pull_request:\n\njobs:\n ultramodern-gates:\n runs-on: ubuntu-latest\n steps:\n - name: Checkout\n uses: actions/checkout@v4\n\n - name: Setup pnpm\n uses: pnpm/action-setup@v4\n\n - name: Setup Node.js\n uses: actions/setup-node@v4\n with:\n node-version: 20\n cache: pnpm\n\n - name: Install Dependencies\n run: pnpm install\n\n - name: Validate Ultramodern Contract\n run: pnpm run ultramodern:check\n\n - name: Build\n run: pnpm run build\n",
|
|
47
48
|
"api/effect/index.ts": "\n",
|
|
48
49
|
"api/lambda/hello.ts": "",
|
|
49
50
|
"shared/effect/api.ts": "\n",
|
|
50
51
|
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n",
|
|
51
|
-
"src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\n\nexport default defineRuntimeConfig({\n\n});\n",
|
|
52
|
+
"src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\nimport { createInstance } from 'i18next';\n\nconst i18nInstance = createInstance();\n\nexport default defineRuntimeConfig({\n i18n: {\n i18nInstance,\n initOptions: {\n defaultNS: 'translation',\n fallbackLng: 'en',\n interpolation: {\n escapeValue: false,\n },\n ns: ['translation'],\n supportedLngs: ['en', 'cs'],\n },\n },\n});\n",
|
|
52
53
|
"src/routes/index.css": "html,\nbody {\n padding: 0;\n margin: 0;\n font-family:\n PingFang SC,\n Hiragino Sans GB,\n Microsoft YaHei,\n Arial,\n sans-serif;\n background: linear-gradient(to bottom, transparent, #fff) #eceeef;\n}\n\np {\n margin: 0;\n}\n\n* {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n box-sizing: border-box;\n}\n\n.container-box {\n min-height: 100vh;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding-top: 10px;\n}\n\nmain {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.title {\n display: flex;\n margin: 4rem 0 4rem;\n align-items: center;\n font-size: 4rem;\n font-weight: 600;\n}\n\n.logo {\n width: 6rem;\n margin: 7px 0 0 1rem;\n}\n\n.name {\n color: #4ecaff;\n}\n\n.description {\n text-align: center;\n line-height: 1.5;\n font-size: 1.3rem;\n color: #1b3a42;\n margin-bottom: 5rem;\n}\n\n.code {\n background: #fafafa;\n border-radius: 12px;\n padding: 0.6rem 0.9rem;\n font-size: 1.05rem;\n font-family:\n Menlo,\n Monaco,\n Lucida Console,\n Liberation Mono,\n DejaVu Sans Mono,\n Bitstream Vera Sans Mono,\n Courier New,\n monospace;\n}\n\n.container-box .grid {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1100px;\n margin-top: 3rem;\n}\n\n.card {\n padding: 1.5rem;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100px;\n color: inherit;\n text-decoration: none;\n transition: 0.15s ease;\n width: 45%;\n}\n\n.card:hover,\n.card:focus {\n transform: scale(1.05);\n}\n\n.card h2 {\n display: flex;\n align-items: center;\n font-size: 1.5rem;\n margin: 0;\n padding: 0;\n}\n\n.card p {\n opacity: 0.6;\n font-size: 0.9rem;\n line-height: 1.5;\n margin-top: 1rem;\n}\n\n.arrow-right {\n width: 1.3rem;\n margin-left: 0.5rem;\n margin-top: 3px;\n}\n",
|
|
53
54
|
"src/routes/layout.tsx": "import { Outlet } from '@modern-js/runtime/';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n",
|
|
54
|
-
"src/routes/page.tsx": 'import { Helmet } from \'@modern-js/runtime/head\';\nimport \'./index.css\';\n\nconst Index = () => {\n return (\n <div className="container-box">\n <Helmet>\n <link\n rel="icon"\n type="image/x-icon"\n href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"\n />\n </Helmet>\n <main>\n <
|
|
55
|
+
"src/routes/page.tsx": 'import { Helmet } from \'@modern-js/runtime/head\';\nimport { useModernI18n } from \'@modern-js/plugin-i18n/runtime\';\nimport { useTranslation } from \'react-i18next\';\nimport \'./index.css\';\n\nconst Index = () => {\n const { t } = useTranslation();\n const { changeLanguage, language } = useModernI18n();\n const languageOptions = [\n { code: \'en\', label: t(\'home.language.en\') },\n { code: \'cs\', label: t(\'home.language.cs\') },\n ];\n return (\n <div className="container-box">\n <Helmet>\n <link\n rel="icon"\n type="image/x-icon"\n href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"\n />\n </Helmet>\n <main>\n <nav className="language-switcher" aria-label={t(\'home.language.switcher\')}>\n {languageOptions.map((option) => (\n <button\n disabled={language === option.code}\n key={option.code}\n onClick={() => void changeLanguage(option.code)}\n type="button"\n >\n {option.label}\n </button>\n ))}\n </nav>\n <div className="title">\n {t(\'home.title\')}\n <img\n alt={t(\'home.logoAlt\')}\n className="logo"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"\n />\n <p className="name">{t(\'home.name\')}</p>\n </div>\n <p className="description">\n {t(\'home.description.intro\')} <code className="code">presetUltramodern(...)</code>{\' \'}\n {/* i18n-ignore technical token */}\n {t(\'home.description.afterPreset\')}\n <code className="code">modern.config.ts</code>\n {/* i18n-ignore technical token */}\n {t(\'home.description.afterConfig\')}\n <code className="code">pnpm run ultramodern:check</code>\n {/* i18n-ignore technical token */}\n {t(\'home.description.end\')}\n </p>\n <div className="grid">\n <a\n href="https://bleedingdev.github.io/ultramodern.js/guides/get-started/ultramodern.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n {t(\'home.cards.guide.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.guide.body\')}</p>\n </a>\n <a\n href="https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n {t(\'home.cards.config.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.config.body\')}</p>\n </a>\n <a\n href="https://github.com/BleedingDev/ultramodern.js/blob/main-ultramodern/packages/toolkit/create/template/.github/workflows/ultramodern-gates.yml.handlebars"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n {t(\'home.cards.gates.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.gates.body\')}</p>\n </a>\n <a\n href="https://bleedingdev.github.io/ultramodern.js/configure/app/bff/effect.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n {t(\'home.cards.bff.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.bff.body\')}</p>\n </a>\n </div>\n </main>\n </div>\n );\n};\n\nexport default Index;\n',
|
|
56
|
+
"config/public/locales/cs/translation.json": '{\n "home": {\n "bff": {\n "response": "Odpoved Effect HttpApi:"\n },\n "cards": {\n "bff": {\n "body": "Pouzivej Effect jako hlavni BFF cestu, Hono nech jako explicitni zalozni volbu.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Upravuj vygenerovane vychozi hodnoty v modern.config.ts.",\n "title": "Konfigurace presetUltramodern"\n },\n "gates": {\n "body": "Starter obsahuje PR workflow pro ultramodern:check a build.",\n "title": "Ultramodern kontroly"\n },\n "guide": {\n "body": "Projdi si verejny preset pripraveny pro MV, TanStack a Effect.",\n "title": "UltraModern.js pruvodce"\n }\n },\n "description": {\n "afterConfig": ", udrzuj",\n "afterPreset": "profil. Zacni v",\n "end": "zelene a lad vygenerovany preset jen tam, kde aplikace potrebuje mekci cestu.",\n "intro": "Tento starter prinasi verejny"\n },\n "language": {\n "cs": "Cestina",\n "en": "Anglictina",\n "switcher": "Jazyk"\n },\n "logoAlt": "Logo UltraModern.js",\n "name": "presetUltramodern",\n "title": "UltraModern.js 3.0"\n }\n}\n',
|
|
57
|
+
"config/public/locales/en/translation.json": '{\n "home": {\n "bff": {\n "response": "Effect HttpApi response:"\n },\n "cards": {\n "bff": {\n "body": "Keep Effect as the preferred BFF lane while Hono stays an explicit fallback.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Tune the generated defaults in modern.config.ts.",\n "title": "Configure presetUltramodern"\n },\n "gates": {\n "body": "The starter includes a PR workflow for ultramodern:check and build.",\n "title": "Ultramodern Gates"\n },\n "guide": {\n "body": "Review the MV-first, TanStack-ready, Effect-ready public preset.",\n "title": "UltraModern.js Guide"\n }\n },\n "description": {\n "afterConfig": ", keep",\n "afterPreset": "profile. Start in",\n "end": "green, and tune the generated preset only where your app needs a softer lane.",\n "intro": "This starter ships the public"\n },\n "language": {\n "cs": "Czech",\n "en": "English",\n "switcher": "Language"\n },\n "logoAlt": "UltraModern.js Logo",\n "name": "presetUltramodern",\n "title": "UltraModern.js 3.0"\n }\n}\n'
|
|
55
58
|
};
|
|
56
59
|
exports.MWAFiles = __webpack_exports__.MWAFiles;
|
|
57
60
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const commonFiles = {
|
|
2
|
-
".codesandbox/
|
|
3
|
-
".codesandbox/
|
|
2
|
+
".codesandbox/tasks.json": "{\n \"$schema\": \"https://codesandbox.io/schemas/tasks.json\",\n \"setupTasks\": [\n {\n \"name\": \"Installing Dependencies\",\n \"command\": \"pnpm install\"\n }\n ],\n \"tasks\": {\n \"start\": {\n \"name\": \"Application\",\n \"command\": \"pnpm run start\",\n \"runAtStart\": true,\n \"restartOn\": {\n \"files\": [\"pnpm-lock.yaml\"]\n }\n }\n }\n}\n",
|
|
3
|
+
".codesandbox/environment.json": "{\n \"nodeVersion\": 18\n}\n"
|
|
4
4
|
};
|
|
5
5
|
export { commonFiles };
|
|
@@ -4,25 +4,28 @@ const MWAFiles = {
|
|
|
4
4
|
".browserslistrc": "chrome >= 87\nedge >= 88\nfirefox >= 78\nsafari >= 14\n",
|
|
5
5
|
".gitignore": ".DS_Store\n\n.pnp\n.pnp.js\n.env.local\n.env.*.local\n.history\n*.log*\n\nnode_modules/\n.yarn-integrity\n.pnpm-store/\n*.tsbuildinfo\n.changeset/pre.json\n\ndist/\ncoverage/\nrelease/\noutput/\noutput_resource/\nlog/\n\n.vscode/**/*\n!.vscode/settings.json\n!.vscode/extensions.json\n.idea/\n\n**/*/typings/auto-generated\n\nmodern.config.local.*\n",
|
|
6
6
|
".npmrc": "strict-peer-dependencies=false\n",
|
|
7
|
-
"AGENTS.md": "# UltraModern Agent Contract\n\nThis project is generated for Codex-first UltraModern.js work.\n\n## Quality Gates\n\n- `pnpm lint` runs Oxlint with the Ultracite preset.\n- `pnpm format` runs oxfmt.\n- `pnpm typecheck` runs effect-tsgo as the TypeScript checker.\n- `pnpm ultramodern:check` verifies the generated contract.\n\n## Private Skills\n\nPrivate orchestration skills are not vendored into this template. If you are authorized for `TechsioCZ/skills`, run:\n\n```bash\npnpm skills:install\n```\n\nThe installer clones that private repository and copies only the allowlisted skills from `.agents/skills-lock.json`.\n",
|
|
8
|
-
"modern.config.ts": "// @effect-diagnostics nodeBuiltinImport:off processEnv:off\nimport { appTools, defineConfig, presetUltramodern } from '@modern-js/app-tools';\nimport path from 'node:path';\nconst appId = process.env['MODERN_BASELINE_APP_ID'] || path.basename(process.cwd());\nconst enableModuleFederationSSR = process.env['MODERN_BASELINE_ENABLE_MF_SSR'] !== 'false';\nconst enableBffRequestId = process.env['MODERN_BASELINE_ENABLE_BFF_REQUEST_ID'] !== 'false';\nconst enableTelemetryExporters =\n process.env['MODERN_BASELINE_ENABLE_TELEMETRY_EXPORTERS'] !== 'false';\nconst telemetryFailLoudStartup = process.env['MODERN_TELEMETRY_FAIL_LOUD_STARTUP'] !== 'false';\nconst otlpEndpoint = process.env['MODERN_TELEMETRY_OTLP_ENDPOINT'];\nconst victoriaMetricsEndpoint = process.env['MODERN_TELEMETRY_VICTORIA_ENDPOINT'];\n\n// https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html\nexport default defineConfig(\n presetUltramodern(\n {\n plugins: [\n appTools(),\n ],\n },\n {\n appId,\n enableBffRequestId,\n enableModuleFederationSSR,\n enableTelemetryExporters,\n telemetryFailLoudStartup,\n ...(typeof otlpEndpoint === 'string' ? { otlpEndpoint } : {}),\n ...(typeof victoriaMetricsEndpoint === 'string' ? { victoriaMetricsEndpoint } : {}),\n },\n ),\n);\n",
|
|
7
|
+
"AGENTS.md": "# UltraModern Agent Contract\n\nThis project is generated for Codex-first UltraModern.js work.\n\n## Quality Gates\n\n- `pnpm lint` runs Oxlint with the Ultracite preset.\n- `pnpm format` runs oxfmt.\n- `pnpm typecheck` runs effect-tsgo as the TypeScript checker.\n- `pnpm i18n:check` rejects hardcoded user-visible JSX text.\n- `pnpm ultramodern:check` verifies the generated contract.\n\n## Internationalization\n\nRuntime 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.\n\n## Private Skills\n\nPrivate orchestration skills are not vendored into this template. If you are authorized for `TechsioCZ/skills`, run:\n\n```bash\npnpm skills:install\n```\n\nThe installer clones that private repository and copies only the allowlisted skills from `.agents/skills-lock.json`.\n",
|
|
8
|
+
"modern.config.ts": "// @effect-diagnostics nodeBuiltinImport:off processEnv:off\nimport { appTools, defineConfig, presetUltramodern } from '@modern-js/app-tools';\nimport path from 'node:path';\nimport { i18nPlugin } from '@modern-js/plugin-i18n';\nconst appId = process.env['MODERN_BASELINE_APP_ID'] || path.basename(process.cwd());\nconst enableModuleFederationSSR = process.env['MODERN_BASELINE_ENABLE_MF_SSR'] !== 'false';\nconst enableBffRequestId = process.env['MODERN_BASELINE_ENABLE_BFF_REQUEST_ID'] !== 'false';\nconst enableTelemetryExporters =\n process.env['MODERN_BASELINE_ENABLE_TELEMETRY_EXPORTERS'] !== 'false';\nconst telemetryFailLoudStartup = process.env['MODERN_TELEMETRY_FAIL_LOUD_STARTUP'] !== 'false';\nconst otlpEndpoint = process.env['MODERN_TELEMETRY_OTLP_ENDPOINT'];\nconst victoriaMetricsEndpoint = process.env['MODERN_TELEMETRY_VICTORIA_ENDPOINT'];\n\n// https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html\nexport default defineConfig(\n presetUltramodern(\n {\n plugins: [\n appTools(),\n i18nPlugin({\n localeDetection: {\n fallbackLanguage: 'en',\n languages: ['en', 'cs'],\n },\n }),\n ],\n },\n {\n appId,\n enableBffRequestId,\n enableModuleFederationSSR,\n enableTelemetryExporters,\n telemetryFailLoudStartup,\n ...(typeof otlpEndpoint === 'string' ? { otlpEndpoint } : {}),\n ...(typeof victoriaMetricsEndpoint === 'string' ? { victoriaMetricsEndpoint } : {}),\n },\n ),\n);\n",
|
|
9
9
|
"oxfmt.config.ts": "import { defineConfig } from 'oxfmt';\nimport ultracite from 'ultracite/oxfmt';\n\nexport default defineConfig({\n extends: [ultracite],\n ignorePatterns: ['dist', 'node_modules', '.modern', '.modernjs', '**/routeTree.gen.ts'],\n singleQuote: true,\n});\n",
|
|
10
10
|
"oxlint.config.ts": "import { defineConfig } from 'oxlint';\nimport core from 'ultracite/oxlint/core';\nimport react from 'ultracite/oxlint/react';\n\nexport default defineConfig({\n env: {\n browser: true,\n node: true,\n },\n extends: [core, react],\n ignorePatterns: ['dist', 'node_modules', '.modern', '.modernjs', '**/routeTree.gen.ts'],\n});\n",
|
|
11
|
-
"package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "type": "module",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "serve": "modern serve",\n "typecheck": "node -e \\"const fs = require(\'node:fs\'); const { execFileSync, spawnSync } = require(\'node:child_process\'); const bin = execFileSync(\'effect-tsgo\', [\'get-exe-path\'], { encoding: \'utf8\' }).trim(); if (process.platform !== \'win32\') fs.chmodSync(bin, 0o755); const result = spawnSync(bin, [\'--noEmit\', \'-p\', \'tsconfig.json\'], { stdio: \'inherit\' }); process.exit(result.status ?? 1);\\"",\n "skills:install": "node ./scripts/bootstrap-agent-skills.mjs",\n "skills:check": "node ./scripts/bootstrap-agent-skills.mjs --check",\n "ultramodern:check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm skills:check && node ./scripts/validate-ultramodern.mjs",\n "format": "oxfmt .",\n "format:check": "oxfmt --check .",\n "lint": "oxlint .",\n "lint:fix": "oxlint . --fix",\n "prepare": "simple-git-hooks"\n },\n "dependencies": {\n "@modern-js/runtime": "",\n "react": "^19.2.3",\n "react-dom": "^19.2.0"\n },\n "devDependencies": {\n "@effect/tsgo": "0.7.3",\n "@modern-js/app-tools": "",\n "@modern-js/tsconfig": "",\n "@types/node": "^20",\n "@types/react": "^19.1.8",\n "@types/react-dom": "^19.1.6",\n "@typescript/native-preview": "7.0.0-dev.20260518.1",\n "lint-staged": "~15.4.0",\n "oxfmt": "0.50.0",\n "oxlint": "1.65.0",\n "rimraf": "^6.0.1",\n "simple-git-hooks": "^2.11.1",\n "ultracite": "7.7.0"\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "oxfmt --write",\n "oxlint --fix"\n ]\n },\n "engines": {\n "node": ">=20"\n }\n}\n',
|
|
11
|
+
"package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "type": "module",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "serve": "modern serve",\n "typecheck": "node -e \\"const fs = require(\'node:fs\'); const { execFileSync, spawnSync } = require(\'node:child_process\'); const bin = execFileSync(\'effect-tsgo\', [\'get-exe-path\'], { encoding: \'utf8\' }).trim(); if (process.platform !== \'win32\') fs.chmodSync(bin, 0o755); const result = spawnSync(bin, [\'--noEmit\', \'-p\', \'tsconfig.json\'], { stdio: \'inherit\' }); process.exit(result.status ?? 1);\\"",\n "i18n:check": "node ./scripts/check-i18n-strings.mjs",\n "skills:install": "node ./scripts/bootstrap-agent-skills.mjs",\n "skills:check": "node ./scripts/bootstrap-agent-skills.mjs --check",\n "ultramodern:check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm i18n:check && pnpm skills:check && node ./scripts/validate-ultramodern.mjs",\n "format": "oxfmt .",\n "format:check": "oxfmt --check .",\n "lint": "oxlint .",\n "lint:fix": "oxlint . --fix",\n "prepare": "simple-git-hooks"\n },\n "dependencies": {\n "@modern-js/plugin-i18n": "",\n "@modern-js/runtime": "",\n "i18next": "26.2.0",\n "react": "^19.2.3",\n "react-dom": "^19.2.0",\n "react-i18next": "17.0.8"\n },\n "devDependencies": {\n "@effect/tsgo": "0.7.3",\n "@modern-js/app-tools": "",\n "@modern-js/tsconfig": "",\n "@types/node": "^20",\n "@types/react": "^19.1.8",\n "@types/react-dom": "^19.1.6",\n "@typescript/native-preview": "7.0.0-dev.20260518.1",\n "lint-staged": "~15.4.0",\n "oxfmt": "0.50.0",\n "oxlint": "1.65.0",\n "rimraf": "^6.0.1",\n "simple-git-hooks": "^2.11.1",\n "ultracite": "7.7.0"\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "oxfmt --write",\n "oxlint --fix"\n ]\n },\n "engines": {\n "node": ">=20"\n }\n}\n',
|
|
12
12
|
"postcss.config.mjs": "",
|
|
13
13
|
"tailwind.config.ts": "",
|
|
14
14
|
"tsconfig.json": "{\n \"extends\": \"@modern-js/tsconfig/base\",\n \"compilerOptions\": {\n \"declaration\": false,\n \"jsx\": \"preserve\",\n \"target\": \"ESNext\",\n \"lib\": [\"ESNext\", \"DOM\", \"DOM.Iterable\"],\n \"module\": \"preserve\",\n \"moduleResolution\": \"Bundler\",\n \"moduleDetection\": \"force\",\n \"isolatedModules\": true,\n \"verbatimModuleSyntax\": true,\n \"noEmit\": true,\n \"allowJs\": true,\n \"resolveJsonModule\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true,\n \"strict\": true,\n \"noUncheckedIndexedAccess\": true,\n \"exactOptionalPropertyTypes\": true,\n \"noImplicitOverride\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"paths\": {\n \"@/*\": [\"./src/*\"],\n \"@api/*\": [\"./api/*\"],\n \"@shared/*\": [\"./shared/*\"]\n },\n \"rootDir\": \".\",\n \"plugins\": [\n {\n \"name\": \"@effect/language-service\",\n \"diagnostics\": true,\n \"includeSuggestionsInTsc\": true,\n \"ignoreEffectSuggestionsInTscExitCode\": false,\n \"ignoreEffectWarningsInTscExitCode\": false,\n \"ignoreEffectErrorsInTscExitCode\": false,\n \"skipDisabledOptimization\": true,\n \"diagnosticSeverity\": {\n \"anyUnknownInErrorContext\": \"error\",\n \"classSelfMismatch\": \"error\",\n \"duplicatePackage\": \"error\",\n \"effectFnImplicitAny\": \"error\",\n \"floatingEffect\": \"error\",\n \"genericEffectServices\": \"error\",\n \"missingEffectContext\": \"error\",\n \"missingEffectError\": \"error\",\n \"missingLayerContext\": \"error\",\n \"missingReturnYieldStar\": \"error\",\n \"missingStarInYieldEffectGen\": \"error\",\n \"nonObjectEffectServiceType\": \"error\",\n \"outdatedApi\": \"error\",\n \"overriddenSchemaConstructor\": \"error\",\n \"catchUnfailableEffect\": \"error\",\n \"effectFnIife\": \"error\",\n \"effectGenUsesAdapter\": \"error\",\n \"effectInFailure\": \"error\",\n \"effectInVoidSuccess\": \"error\",\n \"globalErrorInEffectCatch\": \"error\",\n \"globalErrorInEffectFailure\": \"error\",\n \"layerMergeAllWithDependencies\": \"error\",\n \"lazyPromiseInEffectSync\": \"error\",\n \"leakingRequirements\": \"error\",\n \"multipleEffectProvide\": \"error\",\n \"returnEffectInGen\": \"error\",\n \"runEffectInsideEffect\": \"error\",\n \"schemaSyncInEffect\": \"error\",\n \"scopeInLayerEffect\": \"error\",\n \"strictEffectProvide\": \"error\",\n \"tryCatchInEffectGen\": \"error\",\n \"unknownInEffectCatch\": \"error\",\n \"asyncFunction\": \"error\",\n \"cryptoRandomUUID\": \"error\",\n \"cryptoRandomUUIDInEffect\": \"error\",\n \"extendsNativeError\": \"error\",\n \"globalConsole\": \"error\",\n \"globalConsoleInEffect\": \"error\",\n \"globalDate\": \"error\",\n \"globalDateInEffect\": \"error\",\n \"globalFetch\": \"error\",\n \"globalFetchInEffect\": \"error\",\n \"globalRandom\": \"error\",\n \"globalRandomInEffect\": \"error\",\n \"globalTimers\": \"error\",\n \"globalTimersInEffect\": \"error\",\n \"instanceOfSchema\": \"error\",\n \"newPromise\": \"error\",\n \"nodeBuiltinImport\": \"error\",\n \"preferSchemaOverJson\": \"error\",\n \"processEnv\": \"error\",\n \"processEnvInEffect\": \"error\",\n \"unsafeEffectTypeAssertion\": \"error\",\n \"catchAllToMapError\": \"error\",\n \"deterministicKeys\": \"error\",\n \"effectDoNotation\": \"error\",\n \"effectFnOpportunity\": \"error\",\n \"effectMapFlatten\": \"error\",\n \"effectMapVoid\": \"error\",\n \"effectSucceedWithVoid\": \"error\",\n \"missedPipeableOpportunity\": \"error\",\n \"missingEffectServiceDependency\": \"error\",\n \"nestedEffectGenYield\": \"error\",\n \"redundantSchemaTagIdentifier\": \"error\",\n \"schemaStructWithTag\": \"error\",\n \"schemaUnionOfLiterals\": \"error\",\n \"serviceNotAsClass\": \"error\",\n \"strictBooleanExpressions\": \"error\",\n \"unnecessaryArrowBlock\": \"error\",\n \"unnecessaryEffectGen\": \"error\",\n \"unnecessaryFailYieldableError\": \"error\",\n \"unnecessaryPipe\": \"error\",\n \"unnecessaryPipeChain\": \"error\"\n }\n }\n ]\n },\n \"include\": [\"src\", \"api\", \"shared\", \"config\", \"modern.config.ts\"],\n \"exclude\": [\"**/node_modules\"]\n}\n",
|
|
15
15
|
".agents/skills-lock.json": "{\n \"schemaVersion\": 2,\n \"installDir\": \".agents/skills\",\n \"sources\": [\n {\n \"id\": \"techsiocz-private\",\n \"visibility\": \"private\",\n \"repository\": \"https://github.com/TechsioCZ/skills\",\n \"install\": \"clone-if-authorized\",\n \"baseline\": [\n {\n \"name\": \"plan-graph\",\n \"reason\": \"Build and validate DAGs from .plan.md files\"\n },\n {\n \"name\": \"dag\",\n \"reason\": \"Inspect current plan frontiers and blocked lanes\"\n },\n {\n \"name\": \"subagent-graph\",\n \"reason\": \"Design dependency-aware multi-agent launch graphs\"\n },\n {\n \"name\": \"helm\",\n \"reason\": \"Steer already-running multi-agent work\"\n },\n {\n \"name\": \"debugger-mode\",\n \"reason\": \"Run hypothesis-driven debugging with runtime evidence\"\n }\n ]\n }\n ]\n}\n",
|
|
16
16
|
"scripts/bootstrap-agent-skills.mjs": "import { execFileSync } from 'node:child_process';\nimport fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\n\nconst root = process.cwd();\nconst lockPath = path.join(root, '.agents/skills-lock.json');\nconst checkOnly = process.argv.includes('--check');\nconst force = process.argv.includes('--force');\n\nconst readJson = (filePath) => JSON.parse(fs.readFileSync(filePath, 'utf-8'));\n\nconst run = (command, args, options = {}) =>\n execFileSync(command, args, {\n cwd: options.cwd ?? root,\n encoding: 'utf-8',\n stdio: options.stdio ?? ['ignore', 'pipe', 'pipe'],\n });\n\nconst cloneSource = (source, targetDir) => {\n const repo = source.repository.replace(/^https:\\/\\/github.com\\//u, '');\n try {\n run('gh', ['repo', 'clone', repo, targetDir, '--', '--depth', '1'], {\n stdio: 'inherit',\n });\n } catch {\n run('git', ['clone', '--depth', '1', source.repository, targetDir], {\n stdio: 'inherit',\n });\n }\n};\n\nconst resolveSkillDir = (sourceRoot, skillName) => {\n const candidates = [\n path.join(sourceRoot, skillName),\n path.join(sourceRoot, 'skills', skillName),\n path.join(sourceRoot, 'skills', 'engineering', skillName),\n path.join(sourceRoot, 'skills', 'productivity', skillName),\n ];\n return candidates.find((candidate) => fs.existsSync(path.join(candidate, 'SKILL.md')));\n};\n\nif (!fs.existsSync(lockPath)) {\n console.error('Missing .agents/skills-lock.json');\n process.exit(1);\n}\n\nconst lock = readJson(lockPath);\nconst installDir = path.join(root, lock.installDir ?? '.agents/skills');\nconst privateSources = (lock.sources ?? []).filter(\n (source) => source.install === 'clone-if-authorized',\n);\n\nif (checkOnly) {\n const missing = privateSources.flatMap((source) =>\n (source.baseline ?? [])\n .map((skill) => skill.name)\n .filter((skillName) => !fs.existsSync(path.join(installDir, skillName, 'SKILL.md'))),\n );\n if (missing.length > 0) {\n console.warn(\n `Private skills not installed: ${missing.join(', ')}. Run pnpm skills:install if you have access.`,\n );\n } else {\n console.log('Agent skills are installed.');\n }\n process.exit(0);\n}\n\nfs.mkdirSync(installDir, { recursive: true });\n\nfor (const source of privateSources) {\n const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ultramodern-skills-'));\n try {\n cloneSource(source, tempDir);\n for (const skill of source.baseline ?? []) {\n const sourceSkillDir = resolveSkillDir(tempDir, skill.name);\n if (!sourceSkillDir) {\n throw new Error(`Skill ${skill.name} not found in ${source.repository}`);\n }\n const targetSkillDir = path.join(installDir, skill.name);\n if (fs.existsSync(targetSkillDir)) {\n if (!force) {\n console.log(`Skipping existing ${skill.name}`);\n continue;\n }\n fs.rmSync(targetSkillDir, { force: true, recursive: true });\n }\n fs.cpSync(sourceSkillDir, targetSkillDir, { recursive: true });\n console.log(`Installed ${skill.name}`);\n }\n } finally {\n fs.rmSync(tempDir, { force: true, recursive: true });\n }\n}\n",
|
|
17
|
-
"scripts/
|
|
17
|
+
"scripts/check-i18n-strings.mjs": "import fs from 'node:fs';\nimport path from 'node:path';\n\nconst root = process.cwd();\nconst scanRoots = ['src'].map((scanRoot) => path.join(root, scanRoot));\nconst ignoredDirectories = new Set(['.modern', '.modernjs', 'dist', 'node_modules']);\nconst visibleAttributePattern =\n /\\s(?:aria-label|alt|placeholder|title)=[\"']([^\"']*[A-Za-z][^\"']*)[\"']/gu;\nconst jsxTextPattern = />([^<>{}]*[A-Za-z][^<>{}]*)</gu;\n\nconst collectFiles = (directory) => {\n if (!fs.existsSync(directory)) {\n return [];\n }\n\n const files = [];\n for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {\n if (entry.isDirectory()) {\n if (!ignoredDirectories.has(entry.name)) {\n files.push(...collectFiles(path.join(directory, entry.name)));\n }\n continue;\n }\n\n if (entry.isFile() && /\\.(jsx|tsx)$/u.test(entry.name) && !entry.name.endsWith('.d.ts')) {\n files.push(path.join(directory, entry.name));\n }\n }\n return files;\n};\n\nconst lineNumberForIndex = (content, index) => content.slice(0, index).split('\\n').length;\nconst isIgnoredLine = (content, index) => {\n const lineStart = content.lastIndexOf('\\n', index) + 1;\n const lineEnd = content.indexOf('\\n', index);\n const currentLineEnd = lineEnd === -1 ? content.length : lineEnd;\n const previousLineStart = content.lastIndexOf('\\n', Math.max(0, lineStart - 2)) + 1;\n const nextLineEnd = content.indexOf('\\n', currentLineEnd + 1);\n const context = content.slice(\n previousLineStart,\n nextLineEnd === -1 ? content.length : nextLineEnd,\n );\n return /i18n-ignore/u.test(context);\n};\n\nconst violations = [];\nfor (const filePath of scanRoots.flatMap(collectFiles)) {\n const content = fs.readFileSync(filePath, 'utf-8');\n for (const match of content.matchAll(visibleAttributePattern)) {\n if (!isIgnoredLine(content, match.index ?? 0)) {\n violations.push({\n filePath,\n line: lineNumberForIndex(content, match.index ?? 0),\n text: match[1].trim(),\n });\n }\n }\n\n for (const match of content.matchAll(jsxTextPattern)) {\n const text = match[1].replaceAll(/\\s+/gu, ' ').trim();\n if (text && !isIgnoredLine(content, match.index ?? 0)) {\n violations.push({\n filePath,\n line: lineNumberForIndex(content, match.index ?? 0),\n text,\n });\n }\n }\n}\n\nif (violations.length > 0) {\n console.error('Hardcoded user-visible JSX strings found. Move copy to locale JSON files.');\n for (const violation of violations) {\n console.error(\n `${path.relative(root, violation.filePath)}:${violation.line} ${JSON.stringify(\n violation.text,\n )}`,\n );\n }\n process.exit(1);\n}\n\nconsole.log('No hardcoded user-visible JSX strings found.');\n",
|
|
18
|
+
"scripts/validate-ultramodern.mjs": "import fs from 'node:fs';\nimport path from 'node:path';\n\nconst configPath = path.resolve(process.cwd(), 'modern.config.ts');\nconst templateManifestPath = path.resolve(process.cwd(), '.modernjs/mv-template-manifest.json');\n\nif (!fs.existsSync(configPath)) {\n console.error('modern.config.ts not found');\n process.exit(1);\n}\n\nconst content = fs.readFileSync(configPath, 'utf-8');\nconst requiredTokens = [\n 'presetUltramodern(',\n 'appTools()',\n 'enableModuleFederationSSR',\n 'enableBffRequestId',\n 'enableTelemetryExporters',\n 'i18nPlugin(',\n];\nconst missing = requiredTokens.filter((token) => !content.includes(token));\n\nif (missing.length > 0) {\n console.error(`Ultramodern contract check failed. Missing tokens: ${missing.join(', ')}`);\n process.exit(1);\n}\n\nif (!fs.existsSync(templateManifestPath)) {\n console.error('.modernjs/mv-template-manifest.json not found');\n process.exit(1);\n}\n\nconst templateManifest = JSON.parse(fs.readFileSync(templateManifestPath, 'utf-8'));\nconst requiredDeniedPaths = [\n '.git/**',\n '.github/**',\n '.npmrc',\n '.yarnrc',\n '.env',\n '.env.*',\n 'node_modules/**',\n 'dist/**',\n];\nconst requiredPostMaterialization = [\n 'ultramodern-contract-check',\n 'dependency-install-with-lifecycle-deny',\n 'template-manifest-retained',\n];\nconst requiredPaths = [\n 'AGENTS.md',\n '.agents/skills-lock.json',\n 'oxlint.config.ts',\n 'oxfmt.config.ts',\n 'scripts/bootstrap-agent-skills.mjs',\n 'scripts/check-i18n-strings.mjs',\n 'config/public/locales/en/translation.json',\n 'config/public/locales/cs/translation.json',\n];\nconst manifestErrors = [];\n\nfor (const requiredPath of requiredPaths) {\n if (!fs.existsSync(path.resolve(process.cwd(), requiredPath))) {\n console.error(`${requiredPath} not found`);\n process.exit(1);\n }\n}\n\nif (templateManifest.schemaVersion !== 1) {\n manifestErrors.push('schemaVersion');\n}\n\nif (templateManifest.source?.type !== 'builtin') {\n manifestErrors.push('source.type');\n}\n\nif (\n !Array.isArray(templateManifest.integrity?.checksums) ||\n !templateManifest.integrity.checksums.some(\n (checksum) =>\n checksum.algorithm === 'sha256' &&\n checksum.scope === 'source-tree' &&\n /^[0-9a-f]{64}$/u.test(checksum.value),\n )\n) {\n manifestErrors.push('integrity.checksums[source-tree]');\n}\n\nfor (const deniedPath of requiredDeniedPaths) {\n if (!templateManifest.materialization?.deniedPaths?.includes(deniedPath)) {\n manifestErrors.push(`materialization.deniedPaths:${deniedPath}`);\n }\n}\n\nif (templateManifest.lifecyclePolicy?.denyByDefault !== true) {\n manifestErrors.push('lifecyclePolicy.denyByDefault');\n}\n\nfor (const token of requiredPostMaterialization) {\n if (!templateManifest.validation?.postMaterializationValidation?.includes(token)) {\n manifestErrors.push(`validation.postMaterializationValidation:${token}`);\n }\n}\n\nif (manifestErrors.length > 0) {\n console.error(\n `Ultramodern template manifest check failed. Invalid fields: ${manifestErrors.join(', ')}`,\n );\n process.exit(1);\n}\n\nconst packageJson = JSON.parse(\n fs.readFileSync(path.resolve(process.cwd(), 'package.json'), 'utf-8'),\n);\nconst unresolvedTemplateMarker = String.fromCodePoint(123, 123);\nif (JSON.stringify(packageJson).includes(unresolvedTemplateMarker)) {\n console.error('package.json contains unresolved template markers');\n process.exit(1);\n}\nconst skillsLock = JSON.parse(\n fs.readFileSync(path.resolve(process.cwd(), '.agents/skills-lock.json'), 'utf-8'),\n);\nconst requiredScripts = {\n format: 'oxfmt .',\n 'format:check': 'oxfmt --check .',\n 'i18n:check': 'node ./scripts/check-i18n-strings.mjs',\n lint: 'oxlint .',\n 'lint:fix': 'oxlint . --fix',\n 'skills:check': 'node ./scripts/bootstrap-agent-skills.mjs --check',\n 'skills:install': 'node ./scripts/bootstrap-agent-skills.mjs',\n};\n\nfor (const [scriptName, scriptCommand] of Object.entries(requiredScripts)) {\n if (packageJson.scripts?.[scriptName] !== scriptCommand) {\n console.error(`Missing or invalid package script: ${scriptName}`);\n process.exit(1);\n }\n}\n\nif (\n !packageJson.scripts?.typecheck?.includes('effect-tsgo') ||\n !packageJson.scripts.typecheck.includes('get-exe-path')\n) {\n console.error('typecheck must use effect-tsgo as the TypeScript checker');\n process.exit(1);\n}\n\nfor (const dependency of ['@modern-js/plugin-i18n', 'i18next', 'react-i18next']) {\n if (!packageJson.dependencies?.[dependency]) {\n console.error(`Missing dependency: ${dependency}`);\n process.exit(1);\n }\n}\n\nfor (const dependency of [\n '@effect/tsgo',\n '@typescript/native-preview',\n 'oxlint',\n 'oxfmt',\n 'ultracite',\n]) {\n if (!packageJson.devDependencies?.[dependency]) {\n console.error(`Missing devDependency: ${dependency}`);\n process.exit(1);\n }\n}\n\nconst privateSource = skillsLock.sources?.find(\n (source) => source.repository === 'https://github.com/TechsioCZ/skills',\n);\nconst privateSkills = new Set(privateSource?.baseline?.map((skill) => skill.name));\nfor (const skillName of ['plan-graph', 'dag', 'subagent-graph', 'helm', 'debugger-mode']) {\n if (!privateSkills.has(skillName)) {\n console.error(`Missing private skill allowlist entry: ${skillName}`);\n process.exit(1);\n }\n}\n\nconsole.log('Ultramodern contract check passed.');\n",
|
|
18
19
|
".github/workflows/ultramodern-gates.yml": "name: Ultramodern Gates\n\non:\n push:\n pull_request:\n\njobs:\n ultramodern-gates:\n runs-on: ubuntu-latest\n steps:\n - name: Checkout\n uses: actions/checkout@v4\n\n - name: Setup pnpm\n uses: pnpm/action-setup@v4\n\n - name: Setup Node.js\n uses: actions/setup-node@v4\n with:\n node-version: 20\n cache: pnpm\n\n - name: Install Dependencies\n run: pnpm install\n\n - name: Validate Ultramodern Contract\n run: pnpm run ultramodern:check\n\n - name: Build\n run: pnpm run build\n",
|
|
19
20
|
"api/effect/index.ts": "\n",
|
|
20
21
|
"api/lambda/hello.ts": "",
|
|
21
22
|
"shared/effect/api.ts": "\n",
|
|
22
23
|
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n",
|
|
23
|
-
"src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\n\nexport default defineRuntimeConfig({\n\n});\n",
|
|
24
|
+
"src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\nimport { createInstance } from 'i18next';\n\nconst i18nInstance = createInstance();\n\nexport default defineRuntimeConfig({\n i18n: {\n i18nInstance,\n initOptions: {\n defaultNS: 'translation',\n fallbackLng: 'en',\n interpolation: {\n escapeValue: false,\n },\n ns: ['translation'],\n supportedLngs: ['en', 'cs'],\n },\n },\n});\n",
|
|
24
25
|
"src/routes/index.css": "html,\nbody {\n padding: 0;\n margin: 0;\n font-family:\n PingFang SC,\n Hiragino Sans GB,\n Microsoft YaHei,\n Arial,\n sans-serif;\n background: linear-gradient(to bottom, transparent, #fff) #eceeef;\n}\n\np {\n margin: 0;\n}\n\n* {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n box-sizing: border-box;\n}\n\n.container-box {\n min-height: 100vh;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding-top: 10px;\n}\n\nmain {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.title {\n display: flex;\n margin: 4rem 0 4rem;\n align-items: center;\n font-size: 4rem;\n font-weight: 600;\n}\n\n.logo {\n width: 6rem;\n margin: 7px 0 0 1rem;\n}\n\n.name {\n color: #4ecaff;\n}\n\n.description {\n text-align: center;\n line-height: 1.5;\n font-size: 1.3rem;\n color: #1b3a42;\n margin-bottom: 5rem;\n}\n\n.code {\n background: #fafafa;\n border-radius: 12px;\n padding: 0.6rem 0.9rem;\n font-size: 1.05rem;\n font-family:\n Menlo,\n Monaco,\n Lucida Console,\n Liberation Mono,\n DejaVu Sans Mono,\n Bitstream Vera Sans Mono,\n Courier New,\n monospace;\n}\n\n.container-box .grid {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1100px;\n margin-top: 3rem;\n}\n\n.card {\n padding: 1.5rem;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100px;\n color: inherit;\n text-decoration: none;\n transition: 0.15s ease;\n width: 45%;\n}\n\n.card:hover,\n.card:focus {\n transform: scale(1.05);\n}\n\n.card h2 {\n display: flex;\n align-items: center;\n font-size: 1.5rem;\n margin: 0;\n padding: 0;\n}\n\n.card p {\n opacity: 0.6;\n font-size: 0.9rem;\n line-height: 1.5;\n margin-top: 1rem;\n}\n\n.arrow-right {\n width: 1.3rem;\n margin-left: 0.5rem;\n margin-top: 3px;\n}\n",
|
|
25
26
|
"src/routes/layout.tsx": "import { Outlet } from '@modern-js/runtime/';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n",
|
|
26
|
-
"src/routes/page.tsx": 'import { Helmet } from \'@modern-js/runtime/head\';\nimport \'./index.css\';\n\nconst Index = () => {\n return (\n <div className="container-box">\n <Helmet>\n <link\n rel="icon"\n type="image/x-icon"\n href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"\n />\n </Helmet>\n <main>\n <
|
|
27
|
+
"src/routes/page.tsx": 'import { Helmet } from \'@modern-js/runtime/head\';\nimport { useModernI18n } from \'@modern-js/plugin-i18n/runtime\';\nimport { useTranslation } from \'react-i18next\';\nimport \'./index.css\';\n\nconst Index = () => {\n const { t } = useTranslation();\n const { changeLanguage, language } = useModernI18n();\n const languageOptions = [\n { code: \'en\', label: t(\'home.language.en\') },\n { code: \'cs\', label: t(\'home.language.cs\') },\n ];\n return (\n <div className="container-box">\n <Helmet>\n <link\n rel="icon"\n type="image/x-icon"\n href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"\n />\n </Helmet>\n <main>\n <nav className="language-switcher" aria-label={t(\'home.language.switcher\')}>\n {languageOptions.map((option) => (\n <button\n disabled={language === option.code}\n key={option.code}\n onClick={() => void changeLanguage(option.code)}\n type="button"\n >\n {option.label}\n </button>\n ))}\n </nav>\n <div className="title">\n {t(\'home.title\')}\n <img\n alt={t(\'home.logoAlt\')}\n className="logo"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"\n />\n <p className="name">{t(\'home.name\')}</p>\n </div>\n <p className="description">\n {t(\'home.description.intro\')} <code className="code">presetUltramodern(...)</code>{\' \'}\n {/* i18n-ignore technical token */}\n {t(\'home.description.afterPreset\')}\n <code className="code">modern.config.ts</code>\n {/* i18n-ignore technical token */}\n {t(\'home.description.afterConfig\')}\n <code className="code">pnpm run ultramodern:check</code>\n {/* i18n-ignore technical token */}\n {t(\'home.description.end\')}\n </p>\n <div className="grid">\n <a\n href="https://bleedingdev.github.io/ultramodern.js/guides/get-started/ultramodern.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n {t(\'home.cards.guide.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.guide.body\')}</p>\n </a>\n <a\n href="https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n {t(\'home.cards.config.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.config.body\')}</p>\n </a>\n <a\n href="https://github.com/BleedingDev/ultramodern.js/blob/main-ultramodern/packages/toolkit/create/template/.github/workflows/ultramodern-gates.yml.handlebars"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n {t(\'home.cards.gates.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.gates.body\')}</p>\n </a>\n <a\n href="https://bleedingdev.github.io/ultramodern.js/configure/app/bff/effect.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n {t(\'home.cards.bff.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.bff.body\')}</p>\n </a>\n </div>\n </main>\n </div>\n );\n};\n\nexport default Index;\n',
|
|
28
|
+
"config/public/locales/cs/translation.json": '{\n "home": {\n "bff": {\n "response": "Odpoved Effect HttpApi:"\n },\n "cards": {\n "bff": {\n "body": "Pouzivej Effect jako hlavni BFF cestu, Hono nech jako explicitni zalozni volbu.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Upravuj vygenerovane vychozi hodnoty v modern.config.ts.",\n "title": "Konfigurace presetUltramodern"\n },\n "gates": {\n "body": "Starter obsahuje PR workflow pro ultramodern:check a build.",\n "title": "Ultramodern kontroly"\n },\n "guide": {\n "body": "Projdi si verejny preset pripraveny pro MV, TanStack a Effect.",\n "title": "UltraModern.js pruvodce"\n }\n },\n "description": {\n "afterConfig": ", udrzuj",\n "afterPreset": "profil. Zacni v",\n "end": "zelene a lad vygenerovany preset jen tam, kde aplikace potrebuje mekci cestu.",\n "intro": "Tento starter prinasi verejny"\n },\n "language": {\n "cs": "Cestina",\n "en": "Anglictina",\n "switcher": "Jazyk"\n },\n "logoAlt": "Logo UltraModern.js",\n "name": "presetUltramodern",\n "title": "UltraModern.js 3.0"\n }\n}\n',
|
|
29
|
+
"config/public/locales/en/translation.json": '{\n "home": {\n "bff": {\n "response": "Effect HttpApi response:"\n },\n "cards": {\n "bff": {\n "body": "Keep Effect as the preferred BFF lane while Hono stays an explicit fallback.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Tune the generated defaults in modern.config.ts.",\n "title": "Configure presetUltramodern"\n },\n "gates": {\n "body": "The starter includes a PR workflow for ultramodern:check and build.",\n "title": "Ultramodern Gates"\n },\n "guide": {\n "body": "Review the MV-first, TanStack-ready, Effect-ready public preset.",\n "title": "UltraModern.js Guide"\n }\n },\n "description": {\n "afterConfig": ", keep",\n "afterPreset": "profile. Start in",\n "end": "green, and tune the generated preset only where your app needs a softer lane.",\n "intro": "This starter ships the public"\n },\n "language": {\n "cs": "Czech",\n "en": "English",\n "switcher": "Language"\n },\n "logoAlt": "UltraModern.js Logo",\n "name": "presetUltramodern",\n "title": "UltraModern.js 3.0"\n }\n}\n'
|
|
27
30
|
};
|
|
28
31
|
export { MWAFiles };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "node:module";
|
|
2
2
|
const commonFiles = {
|
|
3
|
-
".codesandbox/
|
|
4
|
-
".codesandbox/
|
|
3
|
+
".codesandbox/tasks.json": "{\n \"$schema\": \"https://codesandbox.io/schemas/tasks.json\",\n \"setupTasks\": [\n {\n \"name\": \"Installing Dependencies\",\n \"command\": \"pnpm install\"\n }\n ],\n \"tasks\": {\n \"start\": {\n \"name\": \"Application\",\n \"command\": \"pnpm run start\",\n \"runAtStart\": true,\n \"restartOn\": {\n \"files\": [\"pnpm-lock.yaml\"]\n }\n }\n }\n}\n",
|
|
4
|
+
".codesandbox/environment.json": "{\n \"nodeVersion\": 18\n}\n"
|
|
5
5
|
};
|
|
6
6
|
export { commonFiles };
|
|
@@ -5,25 +5,28 @@ const MWAFiles = {
|
|
|
5
5
|
".browserslistrc": "chrome >= 87\nedge >= 88\nfirefox >= 78\nsafari >= 14\n",
|
|
6
6
|
".gitignore": ".DS_Store\n\n.pnp\n.pnp.js\n.env.local\n.env.*.local\n.history\n*.log*\n\nnode_modules/\n.yarn-integrity\n.pnpm-store/\n*.tsbuildinfo\n.changeset/pre.json\n\ndist/\ncoverage/\nrelease/\noutput/\noutput_resource/\nlog/\n\n.vscode/**/*\n!.vscode/settings.json\n!.vscode/extensions.json\n.idea/\n\n**/*/typings/auto-generated\n\nmodern.config.local.*\n",
|
|
7
7
|
".npmrc": "strict-peer-dependencies=false\n",
|
|
8
|
-
"AGENTS.md": "# UltraModern Agent Contract\n\nThis project is generated for Codex-first UltraModern.js work.\n\n## Quality Gates\n\n- `pnpm lint` runs Oxlint with the Ultracite preset.\n- `pnpm format` runs oxfmt.\n- `pnpm typecheck` runs effect-tsgo as the TypeScript checker.\n- `pnpm ultramodern:check` verifies the generated contract.\n\n## Private Skills\n\nPrivate orchestration skills are not vendored into this template. If you are authorized for `TechsioCZ/skills`, run:\n\n```bash\npnpm skills:install\n```\n\nThe installer clones that private repository and copies only the allowlisted skills from `.agents/skills-lock.json`.\n",
|
|
9
|
-
"modern.config.ts": "// @effect-diagnostics nodeBuiltinImport:off processEnv:off\nimport { appTools, defineConfig, presetUltramodern } from '@modern-js/app-tools';\nimport path from 'node:path';\nconst appId = process.env['MODERN_BASELINE_APP_ID'] || path.basename(process.cwd());\nconst enableModuleFederationSSR = process.env['MODERN_BASELINE_ENABLE_MF_SSR'] !== 'false';\nconst enableBffRequestId = process.env['MODERN_BASELINE_ENABLE_BFF_REQUEST_ID'] !== 'false';\nconst enableTelemetryExporters =\n process.env['MODERN_BASELINE_ENABLE_TELEMETRY_EXPORTERS'] !== 'false';\nconst telemetryFailLoudStartup = process.env['MODERN_TELEMETRY_FAIL_LOUD_STARTUP'] !== 'false';\nconst otlpEndpoint = process.env['MODERN_TELEMETRY_OTLP_ENDPOINT'];\nconst victoriaMetricsEndpoint = process.env['MODERN_TELEMETRY_VICTORIA_ENDPOINT'];\n\n// https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html\nexport default defineConfig(\n presetUltramodern(\n {\n plugins: [\n appTools(),\n ],\n },\n {\n appId,\n enableBffRequestId,\n enableModuleFederationSSR,\n enableTelemetryExporters,\n telemetryFailLoudStartup,\n ...(typeof otlpEndpoint === 'string' ? { otlpEndpoint } : {}),\n ...(typeof victoriaMetricsEndpoint === 'string' ? { victoriaMetricsEndpoint } : {}),\n },\n ),\n);\n",
|
|
8
|
+
"AGENTS.md": "# UltraModern Agent Contract\n\nThis project is generated for Codex-first UltraModern.js work.\n\n## Quality Gates\n\n- `pnpm lint` runs Oxlint with the Ultracite preset.\n- `pnpm format` runs oxfmt.\n- `pnpm typecheck` runs effect-tsgo as the TypeScript checker.\n- `pnpm i18n:check` rejects hardcoded user-visible JSX text.\n- `pnpm ultramodern:check` verifies the generated contract.\n\n## Internationalization\n\nRuntime 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.\n\n## Private Skills\n\nPrivate orchestration skills are not vendored into this template. If you are authorized for `TechsioCZ/skills`, run:\n\n```bash\npnpm skills:install\n```\n\nThe installer clones that private repository and copies only the allowlisted skills from `.agents/skills-lock.json`.\n",
|
|
9
|
+
"modern.config.ts": "// @effect-diagnostics nodeBuiltinImport:off processEnv:off\nimport { appTools, defineConfig, presetUltramodern } from '@modern-js/app-tools';\nimport path from 'node:path';\nimport { i18nPlugin } from '@modern-js/plugin-i18n';\nconst appId = process.env['MODERN_BASELINE_APP_ID'] || path.basename(process.cwd());\nconst enableModuleFederationSSR = process.env['MODERN_BASELINE_ENABLE_MF_SSR'] !== 'false';\nconst enableBffRequestId = process.env['MODERN_BASELINE_ENABLE_BFF_REQUEST_ID'] !== 'false';\nconst enableTelemetryExporters =\n process.env['MODERN_BASELINE_ENABLE_TELEMETRY_EXPORTERS'] !== 'false';\nconst telemetryFailLoudStartup = process.env['MODERN_TELEMETRY_FAIL_LOUD_STARTUP'] !== 'false';\nconst otlpEndpoint = process.env['MODERN_TELEMETRY_OTLP_ENDPOINT'];\nconst victoriaMetricsEndpoint = process.env['MODERN_TELEMETRY_VICTORIA_ENDPOINT'];\n\n// https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html\nexport default defineConfig(\n presetUltramodern(\n {\n plugins: [\n appTools(),\n i18nPlugin({\n localeDetection: {\n fallbackLanguage: 'en',\n languages: ['en', 'cs'],\n },\n }),\n ],\n },\n {\n appId,\n enableBffRequestId,\n enableModuleFederationSSR,\n enableTelemetryExporters,\n telemetryFailLoudStartup,\n ...(typeof otlpEndpoint === 'string' ? { otlpEndpoint } : {}),\n ...(typeof victoriaMetricsEndpoint === 'string' ? { victoriaMetricsEndpoint } : {}),\n },\n ),\n);\n",
|
|
10
10
|
"oxfmt.config.ts": "import { defineConfig } from 'oxfmt';\nimport ultracite from 'ultracite/oxfmt';\n\nexport default defineConfig({\n extends: [ultracite],\n ignorePatterns: ['dist', 'node_modules', '.modern', '.modernjs', '**/routeTree.gen.ts'],\n singleQuote: true,\n});\n",
|
|
11
11
|
"oxlint.config.ts": "import { defineConfig } from 'oxlint';\nimport core from 'ultracite/oxlint/core';\nimport react from 'ultracite/oxlint/react';\n\nexport default defineConfig({\n env: {\n browser: true,\n node: true,\n },\n extends: [core, react],\n ignorePatterns: ['dist', 'node_modules', '.modern', '.modernjs', '**/routeTree.gen.ts'],\n});\n",
|
|
12
|
-
"package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "type": "module",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "serve": "modern serve",\n "typecheck": "node -e \\"const fs = require(\'node:fs\'); const { execFileSync, spawnSync } = require(\'node:child_process\'); const bin = execFileSync(\'effect-tsgo\', [\'get-exe-path\'], { encoding: \'utf8\' }).trim(); if (process.platform !== \'win32\') fs.chmodSync(bin, 0o755); const result = spawnSync(bin, [\'--noEmit\', \'-p\', \'tsconfig.json\'], { stdio: \'inherit\' }); process.exit(result.status ?? 1);\\"",\n "skills:install": "node ./scripts/bootstrap-agent-skills.mjs",\n "skills:check": "node ./scripts/bootstrap-agent-skills.mjs --check",\n "ultramodern:check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm skills:check && node ./scripts/validate-ultramodern.mjs",\n "format": "oxfmt .",\n "format:check": "oxfmt --check .",\n "lint": "oxlint .",\n "lint:fix": "oxlint . --fix",\n "prepare": "simple-git-hooks"\n },\n "dependencies": {\n "@modern-js/runtime": "",\n "react": "^19.2.3",\n "react-dom": "^19.2.0"\n },\n "devDependencies": {\n "@effect/tsgo": "0.7.3",\n "@modern-js/app-tools": "",\n "@modern-js/tsconfig": "",\n "@types/node": "^20",\n "@types/react": "^19.1.8",\n "@types/react-dom": "^19.1.6",\n "@typescript/native-preview": "7.0.0-dev.20260518.1",\n "lint-staged": "~15.4.0",\n "oxfmt": "0.50.0",\n "oxlint": "1.65.0",\n "rimraf": "^6.0.1",\n "simple-git-hooks": "^2.11.1",\n "ultracite": "7.7.0"\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "oxfmt --write",\n "oxlint --fix"\n ]\n },\n "engines": {\n "node": ">=20"\n }\n}\n',
|
|
12
|
+
"package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "type": "module",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "serve": "modern serve",\n "typecheck": "node -e \\"const fs = require(\'node:fs\'); const { execFileSync, spawnSync } = require(\'node:child_process\'); const bin = execFileSync(\'effect-tsgo\', [\'get-exe-path\'], { encoding: \'utf8\' }).trim(); if (process.platform !== \'win32\') fs.chmodSync(bin, 0o755); const result = spawnSync(bin, [\'--noEmit\', \'-p\', \'tsconfig.json\'], { stdio: \'inherit\' }); process.exit(result.status ?? 1);\\"",\n "i18n:check": "node ./scripts/check-i18n-strings.mjs",\n "skills:install": "node ./scripts/bootstrap-agent-skills.mjs",\n "skills:check": "node ./scripts/bootstrap-agent-skills.mjs --check",\n "ultramodern:check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm i18n:check && pnpm skills:check && node ./scripts/validate-ultramodern.mjs",\n "format": "oxfmt .",\n "format:check": "oxfmt --check .",\n "lint": "oxlint .",\n "lint:fix": "oxlint . --fix",\n "prepare": "simple-git-hooks"\n },\n "dependencies": {\n "@modern-js/plugin-i18n": "",\n "@modern-js/runtime": "",\n "i18next": "26.2.0",\n "react": "^19.2.3",\n "react-dom": "^19.2.0",\n "react-i18next": "17.0.8"\n },\n "devDependencies": {\n "@effect/tsgo": "0.7.3",\n "@modern-js/app-tools": "",\n "@modern-js/tsconfig": "",\n "@types/node": "^20",\n "@types/react": "^19.1.8",\n "@types/react-dom": "^19.1.6",\n "@typescript/native-preview": "7.0.0-dev.20260518.1",\n "lint-staged": "~15.4.0",\n "oxfmt": "0.50.0",\n "oxlint": "1.65.0",\n "rimraf": "^6.0.1",\n "simple-git-hooks": "^2.11.1",\n "ultracite": "7.7.0"\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "oxfmt --write",\n "oxlint --fix"\n ]\n },\n "engines": {\n "node": ">=20"\n }\n}\n',
|
|
13
13
|
"postcss.config.mjs": "",
|
|
14
14
|
"tailwind.config.ts": "",
|
|
15
15
|
"tsconfig.json": "{\n \"extends\": \"@modern-js/tsconfig/base\",\n \"compilerOptions\": {\n \"declaration\": false,\n \"jsx\": \"preserve\",\n \"target\": \"ESNext\",\n \"lib\": [\"ESNext\", \"DOM\", \"DOM.Iterable\"],\n \"module\": \"preserve\",\n \"moduleResolution\": \"Bundler\",\n \"moduleDetection\": \"force\",\n \"isolatedModules\": true,\n \"verbatimModuleSyntax\": true,\n \"noEmit\": true,\n \"allowJs\": true,\n \"resolveJsonModule\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true,\n \"strict\": true,\n \"noUncheckedIndexedAccess\": true,\n \"exactOptionalPropertyTypes\": true,\n \"noImplicitOverride\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"paths\": {\n \"@/*\": [\"./src/*\"],\n \"@api/*\": [\"./api/*\"],\n \"@shared/*\": [\"./shared/*\"]\n },\n \"rootDir\": \".\",\n \"plugins\": [\n {\n \"name\": \"@effect/language-service\",\n \"diagnostics\": true,\n \"includeSuggestionsInTsc\": true,\n \"ignoreEffectSuggestionsInTscExitCode\": false,\n \"ignoreEffectWarningsInTscExitCode\": false,\n \"ignoreEffectErrorsInTscExitCode\": false,\n \"skipDisabledOptimization\": true,\n \"diagnosticSeverity\": {\n \"anyUnknownInErrorContext\": \"error\",\n \"classSelfMismatch\": \"error\",\n \"duplicatePackage\": \"error\",\n \"effectFnImplicitAny\": \"error\",\n \"floatingEffect\": \"error\",\n \"genericEffectServices\": \"error\",\n \"missingEffectContext\": \"error\",\n \"missingEffectError\": \"error\",\n \"missingLayerContext\": \"error\",\n \"missingReturnYieldStar\": \"error\",\n \"missingStarInYieldEffectGen\": \"error\",\n \"nonObjectEffectServiceType\": \"error\",\n \"outdatedApi\": \"error\",\n \"overriddenSchemaConstructor\": \"error\",\n \"catchUnfailableEffect\": \"error\",\n \"effectFnIife\": \"error\",\n \"effectGenUsesAdapter\": \"error\",\n \"effectInFailure\": \"error\",\n \"effectInVoidSuccess\": \"error\",\n \"globalErrorInEffectCatch\": \"error\",\n \"globalErrorInEffectFailure\": \"error\",\n \"layerMergeAllWithDependencies\": \"error\",\n \"lazyPromiseInEffectSync\": \"error\",\n \"leakingRequirements\": \"error\",\n \"multipleEffectProvide\": \"error\",\n \"returnEffectInGen\": \"error\",\n \"runEffectInsideEffect\": \"error\",\n \"schemaSyncInEffect\": \"error\",\n \"scopeInLayerEffect\": \"error\",\n \"strictEffectProvide\": \"error\",\n \"tryCatchInEffectGen\": \"error\",\n \"unknownInEffectCatch\": \"error\",\n \"asyncFunction\": \"error\",\n \"cryptoRandomUUID\": \"error\",\n \"cryptoRandomUUIDInEffect\": \"error\",\n \"extendsNativeError\": \"error\",\n \"globalConsole\": \"error\",\n \"globalConsoleInEffect\": \"error\",\n \"globalDate\": \"error\",\n \"globalDateInEffect\": \"error\",\n \"globalFetch\": \"error\",\n \"globalFetchInEffect\": \"error\",\n \"globalRandom\": \"error\",\n \"globalRandomInEffect\": \"error\",\n \"globalTimers\": \"error\",\n \"globalTimersInEffect\": \"error\",\n \"instanceOfSchema\": \"error\",\n \"newPromise\": \"error\",\n \"nodeBuiltinImport\": \"error\",\n \"preferSchemaOverJson\": \"error\",\n \"processEnv\": \"error\",\n \"processEnvInEffect\": \"error\",\n \"unsafeEffectTypeAssertion\": \"error\",\n \"catchAllToMapError\": \"error\",\n \"deterministicKeys\": \"error\",\n \"effectDoNotation\": \"error\",\n \"effectFnOpportunity\": \"error\",\n \"effectMapFlatten\": \"error\",\n \"effectMapVoid\": \"error\",\n \"effectSucceedWithVoid\": \"error\",\n \"missedPipeableOpportunity\": \"error\",\n \"missingEffectServiceDependency\": \"error\",\n \"nestedEffectGenYield\": \"error\",\n \"redundantSchemaTagIdentifier\": \"error\",\n \"schemaStructWithTag\": \"error\",\n \"schemaUnionOfLiterals\": \"error\",\n \"serviceNotAsClass\": \"error\",\n \"strictBooleanExpressions\": \"error\",\n \"unnecessaryArrowBlock\": \"error\",\n \"unnecessaryEffectGen\": \"error\",\n \"unnecessaryFailYieldableError\": \"error\",\n \"unnecessaryPipe\": \"error\",\n \"unnecessaryPipeChain\": \"error\"\n }\n }\n ]\n },\n \"include\": [\"src\", \"api\", \"shared\", \"config\", \"modern.config.ts\"],\n \"exclude\": [\"**/node_modules\"]\n}\n",
|
|
16
16
|
".agents/skills-lock.json": "{\n \"schemaVersion\": 2,\n \"installDir\": \".agents/skills\",\n \"sources\": [\n {\n \"id\": \"techsiocz-private\",\n \"visibility\": \"private\",\n \"repository\": \"https://github.com/TechsioCZ/skills\",\n \"install\": \"clone-if-authorized\",\n \"baseline\": [\n {\n \"name\": \"plan-graph\",\n \"reason\": \"Build and validate DAGs from .plan.md files\"\n },\n {\n \"name\": \"dag\",\n \"reason\": \"Inspect current plan frontiers and blocked lanes\"\n },\n {\n \"name\": \"subagent-graph\",\n \"reason\": \"Design dependency-aware multi-agent launch graphs\"\n },\n {\n \"name\": \"helm\",\n \"reason\": \"Steer already-running multi-agent work\"\n },\n {\n \"name\": \"debugger-mode\",\n \"reason\": \"Run hypothesis-driven debugging with runtime evidence\"\n }\n ]\n }\n ]\n}\n",
|
|
17
17
|
"scripts/bootstrap-agent-skills.mjs": "import { execFileSync } from 'node:child_process';\nimport fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\n\nconst root = process.cwd();\nconst lockPath = path.join(root, '.agents/skills-lock.json');\nconst checkOnly = process.argv.includes('--check');\nconst force = process.argv.includes('--force');\n\nconst readJson = (filePath) => JSON.parse(fs.readFileSync(filePath, 'utf-8'));\n\nconst run = (command, args, options = {}) =>\n execFileSync(command, args, {\n cwd: options.cwd ?? root,\n encoding: 'utf-8',\n stdio: options.stdio ?? ['ignore', 'pipe', 'pipe'],\n });\n\nconst cloneSource = (source, targetDir) => {\n const repo = source.repository.replace(/^https:\\/\\/github.com\\//u, '');\n try {\n run('gh', ['repo', 'clone', repo, targetDir, '--', '--depth', '1'], {\n stdio: 'inherit',\n });\n } catch {\n run('git', ['clone', '--depth', '1', source.repository, targetDir], {\n stdio: 'inherit',\n });\n }\n};\n\nconst resolveSkillDir = (sourceRoot, skillName) => {\n const candidates = [\n path.join(sourceRoot, skillName),\n path.join(sourceRoot, 'skills', skillName),\n path.join(sourceRoot, 'skills', 'engineering', skillName),\n path.join(sourceRoot, 'skills', 'productivity', skillName),\n ];\n return candidates.find((candidate) => fs.existsSync(path.join(candidate, 'SKILL.md')));\n};\n\nif (!fs.existsSync(lockPath)) {\n console.error('Missing .agents/skills-lock.json');\n process.exit(1);\n}\n\nconst lock = readJson(lockPath);\nconst installDir = path.join(root, lock.installDir ?? '.agents/skills');\nconst privateSources = (lock.sources ?? []).filter(\n (source) => source.install === 'clone-if-authorized',\n);\n\nif (checkOnly) {\n const missing = privateSources.flatMap((source) =>\n (source.baseline ?? [])\n .map((skill) => skill.name)\n .filter((skillName) => !fs.existsSync(path.join(installDir, skillName, 'SKILL.md'))),\n );\n if (missing.length > 0) {\n console.warn(\n `Private skills not installed: ${missing.join(', ')}. Run pnpm skills:install if you have access.`,\n );\n } else {\n console.log('Agent skills are installed.');\n }\n process.exit(0);\n}\n\nfs.mkdirSync(installDir, { recursive: true });\n\nfor (const source of privateSources) {\n const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ultramodern-skills-'));\n try {\n cloneSource(source, tempDir);\n for (const skill of source.baseline ?? []) {\n const sourceSkillDir = resolveSkillDir(tempDir, skill.name);\n if (!sourceSkillDir) {\n throw new Error(`Skill ${skill.name} not found in ${source.repository}`);\n }\n const targetSkillDir = path.join(installDir, skill.name);\n if (fs.existsSync(targetSkillDir)) {\n if (!force) {\n console.log(`Skipping existing ${skill.name}`);\n continue;\n }\n fs.rmSync(targetSkillDir, { force: true, recursive: true });\n }\n fs.cpSync(sourceSkillDir, targetSkillDir, { recursive: true });\n console.log(`Installed ${skill.name}`);\n }\n } finally {\n fs.rmSync(tempDir, { force: true, recursive: true });\n }\n}\n",
|
|
18
|
-
"scripts/
|
|
18
|
+
"scripts/check-i18n-strings.mjs": "import fs from 'node:fs';\nimport path from 'node:path';\n\nconst root = process.cwd();\nconst scanRoots = ['src'].map((scanRoot) => path.join(root, scanRoot));\nconst ignoredDirectories = new Set(['.modern', '.modernjs', 'dist', 'node_modules']);\nconst visibleAttributePattern =\n /\\s(?:aria-label|alt|placeholder|title)=[\"']([^\"']*[A-Za-z][^\"']*)[\"']/gu;\nconst jsxTextPattern = />([^<>{}]*[A-Za-z][^<>{}]*)</gu;\n\nconst collectFiles = (directory) => {\n if (!fs.existsSync(directory)) {\n return [];\n }\n\n const files = [];\n for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {\n if (entry.isDirectory()) {\n if (!ignoredDirectories.has(entry.name)) {\n files.push(...collectFiles(path.join(directory, entry.name)));\n }\n continue;\n }\n\n if (entry.isFile() && /\\.(jsx|tsx)$/u.test(entry.name) && !entry.name.endsWith('.d.ts')) {\n files.push(path.join(directory, entry.name));\n }\n }\n return files;\n};\n\nconst lineNumberForIndex = (content, index) => content.slice(0, index).split('\\n').length;\nconst isIgnoredLine = (content, index) => {\n const lineStart = content.lastIndexOf('\\n', index) + 1;\n const lineEnd = content.indexOf('\\n', index);\n const currentLineEnd = lineEnd === -1 ? content.length : lineEnd;\n const previousLineStart = content.lastIndexOf('\\n', Math.max(0, lineStart - 2)) + 1;\n const nextLineEnd = content.indexOf('\\n', currentLineEnd + 1);\n const context = content.slice(\n previousLineStart,\n nextLineEnd === -1 ? content.length : nextLineEnd,\n );\n return /i18n-ignore/u.test(context);\n};\n\nconst violations = [];\nfor (const filePath of scanRoots.flatMap(collectFiles)) {\n const content = fs.readFileSync(filePath, 'utf-8');\n for (const match of content.matchAll(visibleAttributePattern)) {\n if (!isIgnoredLine(content, match.index ?? 0)) {\n violations.push({\n filePath,\n line: lineNumberForIndex(content, match.index ?? 0),\n text: match[1].trim(),\n });\n }\n }\n\n for (const match of content.matchAll(jsxTextPattern)) {\n const text = match[1].replaceAll(/\\s+/gu, ' ').trim();\n if (text && !isIgnoredLine(content, match.index ?? 0)) {\n violations.push({\n filePath,\n line: lineNumberForIndex(content, match.index ?? 0),\n text,\n });\n }\n }\n}\n\nif (violations.length > 0) {\n console.error('Hardcoded user-visible JSX strings found. Move copy to locale JSON files.');\n for (const violation of violations) {\n console.error(\n `${path.relative(root, violation.filePath)}:${violation.line} ${JSON.stringify(\n violation.text,\n )}`,\n );\n }\n process.exit(1);\n}\n\nconsole.log('No hardcoded user-visible JSX strings found.');\n",
|
|
19
|
+
"scripts/validate-ultramodern.mjs": "import fs from 'node:fs';\nimport path from 'node:path';\n\nconst configPath = path.resolve(process.cwd(), 'modern.config.ts');\nconst templateManifestPath = path.resolve(process.cwd(), '.modernjs/mv-template-manifest.json');\n\nif (!fs.existsSync(configPath)) {\n console.error('modern.config.ts not found');\n process.exit(1);\n}\n\nconst content = fs.readFileSync(configPath, 'utf-8');\nconst requiredTokens = [\n 'presetUltramodern(',\n 'appTools()',\n 'enableModuleFederationSSR',\n 'enableBffRequestId',\n 'enableTelemetryExporters',\n 'i18nPlugin(',\n];\nconst missing = requiredTokens.filter((token) => !content.includes(token));\n\nif (missing.length > 0) {\n console.error(`Ultramodern contract check failed. Missing tokens: ${missing.join(', ')}`);\n process.exit(1);\n}\n\nif (!fs.existsSync(templateManifestPath)) {\n console.error('.modernjs/mv-template-manifest.json not found');\n process.exit(1);\n}\n\nconst templateManifest = JSON.parse(fs.readFileSync(templateManifestPath, 'utf-8'));\nconst requiredDeniedPaths = [\n '.git/**',\n '.github/**',\n '.npmrc',\n '.yarnrc',\n '.env',\n '.env.*',\n 'node_modules/**',\n 'dist/**',\n];\nconst requiredPostMaterialization = [\n 'ultramodern-contract-check',\n 'dependency-install-with-lifecycle-deny',\n 'template-manifest-retained',\n];\nconst requiredPaths = [\n 'AGENTS.md',\n '.agents/skills-lock.json',\n 'oxlint.config.ts',\n 'oxfmt.config.ts',\n 'scripts/bootstrap-agent-skills.mjs',\n 'scripts/check-i18n-strings.mjs',\n 'config/public/locales/en/translation.json',\n 'config/public/locales/cs/translation.json',\n];\nconst manifestErrors = [];\n\nfor (const requiredPath of requiredPaths) {\n if (!fs.existsSync(path.resolve(process.cwd(), requiredPath))) {\n console.error(`${requiredPath} not found`);\n process.exit(1);\n }\n}\n\nif (templateManifest.schemaVersion !== 1) {\n manifestErrors.push('schemaVersion');\n}\n\nif (templateManifest.source?.type !== 'builtin') {\n manifestErrors.push('source.type');\n}\n\nif (\n !Array.isArray(templateManifest.integrity?.checksums) ||\n !templateManifest.integrity.checksums.some(\n (checksum) =>\n checksum.algorithm === 'sha256' &&\n checksum.scope === 'source-tree' &&\n /^[0-9a-f]{64}$/u.test(checksum.value),\n )\n) {\n manifestErrors.push('integrity.checksums[source-tree]');\n}\n\nfor (const deniedPath of requiredDeniedPaths) {\n if (!templateManifest.materialization?.deniedPaths?.includes(deniedPath)) {\n manifestErrors.push(`materialization.deniedPaths:${deniedPath}`);\n }\n}\n\nif (templateManifest.lifecyclePolicy?.denyByDefault !== true) {\n manifestErrors.push('lifecyclePolicy.denyByDefault');\n}\n\nfor (const token of requiredPostMaterialization) {\n if (!templateManifest.validation?.postMaterializationValidation?.includes(token)) {\n manifestErrors.push(`validation.postMaterializationValidation:${token}`);\n }\n}\n\nif (manifestErrors.length > 0) {\n console.error(\n `Ultramodern template manifest check failed. Invalid fields: ${manifestErrors.join(', ')}`,\n );\n process.exit(1);\n}\n\nconst packageJson = JSON.parse(\n fs.readFileSync(path.resolve(process.cwd(), 'package.json'), 'utf-8'),\n);\nconst unresolvedTemplateMarker = String.fromCodePoint(123, 123);\nif (JSON.stringify(packageJson).includes(unresolvedTemplateMarker)) {\n console.error('package.json contains unresolved template markers');\n process.exit(1);\n}\nconst skillsLock = JSON.parse(\n fs.readFileSync(path.resolve(process.cwd(), '.agents/skills-lock.json'), 'utf-8'),\n);\nconst requiredScripts = {\n format: 'oxfmt .',\n 'format:check': 'oxfmt --check .',\n 'i18n:check': 'node ./scripts/check-i18n-strings.mjs',\n lint: 'oxlint .',\n 'lint:fix': 'oxlint . --fix',\n 'skills:check': 'node ./scripts/bootstrap-agent-skills.mjs --check',\n 'skills:install': 'node ./scripts/bootstrap-agent-skills.mjs',\n};\n\nfor (const [scriptName, scriptCommand] of Object.entries(requiredScripts)) {\n if (packageJson.scripts?.[scriptName] !== scriptCommand) {\n console.error(`Missing or invalid package script: ${scriptName}`);\n process.exit(1);\n }\n}\n\nif (\n !packageJson.scripts?.typecheck?.includes('effect-tsgo') ||\n !packageJson.scripts.typecheck.includes('get-exe-path')\n) {\n console.error('typecheck must use effect-tsgo as the TypeScript checker');\n process.exit(1);\n}\n\nfor (const dependency of ['@modern-js/plugin-i18n', 'i18next', 'react-i18next']) {\n if (!packageJson.dependencies?.[dependency]) {\n console.error(`Missing dependency: ${dependency}`);\n process.exit(1);\n }\n}\n\nfor (const dependency of [\n '@effect/tsgo',\n '@typescript/native-preview',\n 'oxlint',\n 'oxfmt',\n 'ultracite',\n]) {\n if (!packageJson.devDependencies?.[dependency]) {\n console.error(`Missing devDependency: ${dependency}`);\n process.exit(1);\n }\n}\n\nconst privateSource = skillsLock.sources?.find(\n (source) => source.repository === 'https://github.com/TechsioCZ/skills',\n);\nconst privateSkills = new Set(privateSource?.baseline?.map((skill) => skill.name));\nfor (const skillName of ['plan-graph', 'dag', 'subagent-graph', 'helm', 'debugger-mode']) {\n if (!privateSkills.has(skillName)) {\n console.error(`Missing private skill allowlist entry: ${skillName}`);\n process.exit(1);\n }\n}\n\nconsole.log('Ultramodern contract check passed.');\n",
|
|
19
20
|
".github/workflows/ultramodern-gates.yml": "name: Ultramodern Gates\n\non:\n push:\n pull_request:\n\njobs:\n ultramodern-gates:\n runs-on: ubuntu-latest\n steps:\n - name: Checkout\n uses: actions/checkout@v4\n\n - name: Setup pnpm\n uses: pnpm/action-setup@v4\n\n - name: Setup Node.js\n uses: actions/setup-node@v4\n with:\n node-version: 20\n cache: pnpm\n\n - name: Install Dependencies\n run: pnpm install\n\n - name: Validate Ultramodern Contract\n run: pnpm run ultramodern:check\n\n - name: Build\n run: pnpm run build\n",
|
|
20
21
|
"api/effect/index.ts": "\n",
|
|
21
22
|
"api/lambda/hello.ts": "",
|
|
22
23
|
"shared/effect/api.ts": "\n",
|
|
23
24
|
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n",
|
|
24
|
-
"src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\n\nexport default defineRuntimeConfig({\n\n});\n",
|
|
25
|
+
"src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\nimport { createInstance } from 'i18next';\n\nconst i18nInstance = createInstance();\n\nexport default defineRuntimeConfig({\n i18n: {\n i18nInstance,\n initOptions: {\n defaultNS: 'translation',\n fallbackLng: 'en',\n interpolation: {\n escapeValue: false,\n },\n ns: ['translation'],\n supportedLngs: ['en', 'cs'],\n },\n },\n});\n",
|
|
25
26
|
"src/routes/index.css": "html,\nbody {\n padding: 0;\n margin: 0;\n font-family:\n PingFang SC,\n Hiragino Sans GB,\n Microsoft YaHei,\n Arial,\n sans-serif;\n background: linear-gradient(to bottom, transparent, #fff) #eceeef;\n}\n\np {\n margin: 0;\n}\n\n* {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n box-sizing: border-box;\n}\n\n.container-box {\n min-height: 100vh;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding-top: 10px;\n}\n\nmain {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.title {\n display: flex;\n margin: 4rem 0 4rem;\n align-items: center;\n font-size: 4rem;\n font-weight: 600;\n}\n\n.logo {\n width: 6rem;\n margin: 7px 0 0 1rem;\n}\n\n.name {\n color: #4ecaff;\n}\n\n.description {\n text-align: center;\n line-height: 1.5;\n font-size: 1.3rem;\n color: #1b3a42;\n margin-bottom: 5rem;\n}\n\n.code {\n background: #fafafa;\n border-radius: 12px;\n padding: 0.6rem 0.9rem;\n font-size: 1.05rem;\n font-family:\n Menlo,\n Monaco,\n Lucida Console,\n Liberation Mono,\n DejaVu Sans Mono,\n Bitstream Vera Sans Mono,\n Courier New,\n monospace;\n}\n\n.container-box .grid {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1100px;\n margin-top: 3rem;\n}\n\n.card {\n padding: 1.5rem;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100px;\n color: inherit;\n text-decoration: none;\n transition: 0.15s ease;\n width: 45%;\n}\n\n.card:hover,\n.card:focus {\n transform: scale(1.05);\n}\n\n.card h2 {\n display: flex;\n align-items: center;\n font-size: 1.5rem;\n margin: 0;\n padding: 0;\n}\n\n.card p {\n opacity: 0.6;\n font-size: 0.9rem;\n line-height: 1.5;\n margin-top: 1rem;\n}\n\n.arrow-right {\n width: 1.3rem;\n margin-left: 0.5rem;\n margin-top: 3px;\n}\n",
|
|
26
27
|
"src/routes/layout.tsx": "import { Outlet } from '@modern-js/runtime/';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n",
|
|
27
|
-
"src/routes/page.tsx": 'import { Helmet } from \'@modern-js/runtime/head\';\nimport \'./index.css\';\n\nconst Index = () => {\n return (\n <div className="container-box">\n <Helmet>\n <link\n rel="icon"\n type="image/x-icon"\n href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"\n />\n </Helmet>\n <main>\n <
|
|
28
|
+
"src/routes/page.tsx": 'import { Helmet } from \'@modern-js/runtime/head\';\nimport { useModernI18n } from \'@modern-js/plugin-i18n/runtime\';\nimport { useTranslation } from \'react-i18next\';\nimport \'./index.css\';\n\nconst Index = () => {\n const { t } = useTranslation();\n const { changeLanguage, language } = useModernI18n();\n const languageOptions = [\n { code: \'en\', label: t(\'home.language.en\') },\n { code: \'cs\', label: t(\'home.language.cs\') },\n ];\n return (\n <div className="container-box">\n <Helmet>\n <link\n rel="icon"\n type="image/x-icon"\n href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"\n />\n </Helmet>\n <main>\n <nav className="language-switcher" aria-label={t(\'home.language.switcher\')}>\n {languageOptions.map((option) => (\n <button\n disabled={language === option.code}\n key={option.code}\n onClick={() => void changeLanguage(option.code)}\n type="button"\n >\n {option.label}\n </button>\n ))}\n </nav>\n <div className="title">\n {t(\'home.title\')}\n <img\n alt={t(\'home.logoAlt\')}\n className="logo"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"\n />\n <p className="name">{t(\'home.name\')}</p>\n </div>\n <p className="description">\n {t(\'home.description.intro\')} <code className="code">presetUltramodern(...)</code>{\' \'}\n {/* i18n-ignore technical token */}\n {t(\'home.description.afterPreset\')}\n <code className="code">modern.config.ts</code>\n {/* i18n-ignore technical token */}\n {t(\'home.description.afterConfig\')}\n <code className="code">pnpm run ultramodern:check</code>\n {/* i18n-ignore technical token */}\n {t(\'home.description.end\')}\n </p>\n <div className="grid">\n <a\n href="https://bleedingdev.github.io/ultramodern.js/guides/get-started/ultramodern.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n {t(\'home.cards.guide.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.guide.body\')}</p>\n </a>\n <a\n href="https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n {t(\'home.cards.config.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.config.body\')}</p>\n </a>\n <a\n href="https://github.com/BleedingDev/ultramodern.js/blob/main-ultramodern/packages/toolkit/create/template/.github/workflows/ultramodern-gates.yml.handlebars"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n {t(\'home.cards.gates.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.gates.body\')}</p>\n </a>\n <a\n href="https://bleedingdev.github.io/ultramodern.js/configure/app/bff/effect.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n {t(\'home.cards.bff.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.bff.body\')}</p>\n </a>\n </div>\n </main>\n </div>\n );\n};\n\nexport default Index;\n',
|
|
29
|
+
"config/public/locales/cs/translation.json": '{\n "home": {\n "bff": {\n "response": "Odpoved Effect HttpApi:"\n },\n "cards": {\n "bff": {\n "body": "Pouzivej Effect jako hlavni BFF cestu, Hono nech jako explicitni zalozni volbu.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Upravuj vygenerovane vychozi hodnoty v modern.config.ts.",\n "title": "Konfigurace presetUltramodern"\n },\n "gates": {\n "body": "Starter obsahuje PR workflow pro ultramodern:check a build.",\n "title": "Ultramodern kontroly"\n },\n "guide": {\n "body": "Projdi si verejny preset pripraveny pro MV, TanStack a Effect.",\n "title": "UltraModern.js pruvodce"\n }\n },\n "description": {\n "afterConfig": ", udrzuj",\n "afterPreset": "profil. Zacni v",\n "end": "zelene a lad vygenerovany preset jen tam, kde aplikace potrebuje mekci cestu.",\n "intro": "Tento starter prinasi verejny"\n },\n "language": {\n "cs": "Cestina",\n "en": "Anglictina",\n "switcher": "Jazyk"\n },\n "logoAlt": "Logo UltraModern.js",\n "name": "presetUltramodern",\n "title": "UltraModern.js 3.0"\n }\n}\n',
|
|
30
|
+
"config/public/locales/en/translation.json": '{\n "home": {\n "bff": {\n "response": "Effect HttpApi response:"\n },\n "cards": {\n "bff": {\n "body": "Keep Effect as the preferred BFF lane while Hono stays an explicit fallback.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Tune the generated defaults in modern.config.ts.",\n "title": "Configure presetUltramodern"\n },\n "gates": {\n "body": "The starter includes a PR workflow for ultramodern:check and build.",\n "title": "Ultramodern Gates"\n },\n "guide": {\n "body": "Review the MV-first, TanStack-ready, Effect-ready public preset.",\n "title": "UltraModern.js Guide"\n }\n },\n "description": {\n "afterConfig": ", keep",\n "afterPreset": "profile. Start in",\n "end": "green, and tune the generated preset only where your app needs a softer lane.",\n "intro": "This starter ships the public"\n },\n "language": {\n "cs": "Czech",\n "en": "English",\n "switcher": "Language"\n },\n "logoAlt": "UltraModern.js Logo",\n "name": "presetUltramodern",\n "title": "UltraModern.js 3.0"\n }\n}\n'
|
|
28
31
|
};
|
|
29
32
|
export { MWAFiles };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const MWAFiles: {
|
|
2
|
-
".codesandbox/environment.json": string;
|
|
3
2
|
".codesandbox/tasks.json": string;
|
|
3
|
+
".codesandbox/environment.json": string;
|
|
4
4
|
".browserslistrc": string;
|
|
5
5
|
".gitignore": string;
|
|
6
6
|
".npmrc": string;
|
|
@@ -14,6 +14,7 @@ export declare const MWAFiles: {
|
|
|
14
14
|
"tsconfig.json": string;
|
|
15
15
|
".agents/skills-lock.json": string;
|
|
16
16
|
"scripts/bootstrap-agent-skills.mjs": string;
|
|
17
|
+
"scripts/check-i18n-strings.mjs": string;
|
|
17
18
|
"scripts/validate-ultramodern.mjs": string;
|
|
18
19
|
".github/workflows/ultramodern-gates.yml": string;
|
|
19
20
|
"api/effect/index.ts": string;
|
|
@@ -24,4 +25,6 @@ export declare const MWAFiles: {
|
|
|
24
25
|
"src/routes/index.css": string;
|
|
25
26
|
"src/routes/layout.tsx": string;
|
|
26
27
|
"src/routes/page.tsx": string;
|
|
28
|
+
"config/public/locales/cs/translation.json": string;
|
|
29
|
+
"config/public/locales/en/translation.json": string;
|
|
27
30
|
};
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.2.0-ultramodern.
|
|
20
|
+
"version": "3.2.0-ultramodern.12",
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"main": "./dist/cjs/index.js",
|
|
23
23
|
"module": "./dist/esm/index.mjs",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@types/recursive-readdir": "^2.2.4",
|
|
49
49
|
"@typescript/native-preview": "7.0.0-dev.20260516.1",
|
|
50
50
|
"recursive-readdir": "^2.2.3",
|
|
51
|
-
"@modern-js/create": "npm:@bleedingdev/modern-js-create@3.2.0-ultramodern.
|
|
51
|
+
"@modern-js/create": "npm:@bleedingdev/modern-js-create@3.2.0-ultramodern.12"
|
|
52
52
|
},
|
|
53
53
|
"sideEffects": false,
|
|
54
54
|
"publishConfig": {
|