create-obsession 0.0.0-stage → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +160 -2
- package/bin/README.md +6 -0
- package/bin/obsession.exe +0 -0
- package/bin/obsession.out +0 -0
- package/frontend/README.md +41 -0
- package/frontend/project-type.json +8 -0
- package/frontend/template/.agent/task-scope.example.json +7 -0
- package/frontend/template/.editorconfig +11 -0
- package/frontend/template/.env +2 -0
- package/frontend/template/.env.example +2 -0
- package/frontend/template/.github/dependabot.yml +11 -0
- package/frontend/template/.github/workflows/quality.yml +28 -0
- package/frontend/template/.gitignore.tpl +28 -0
- package/frontend/template/.vscode/extensions.json +3 -0
- package/frontend/template/.vscode/settings.json +13 -0
- package/frontend/template/.vscode/tasks.json +39 -0
- package/frontend/template/AGENTS.md +56 -0
- package/frontend/template/CLAUDE.md +18 -0
- package/frontend/template/README.md.tpl +57 -0
- package/frontend/template/docs/CHAPTER_8_9_10_ENFORCEMENT.md +82 -0
- package/frontend/template/docs/FEATURE_BLUEPRINT.md +164 -0
- package/frontend/template/docs/FRONTEND_ARCHITECTURE.md +132 -0
- package/frontend/template/docs/SECURITY_BASELINE.md +32 -0
- package/frontend/template/docs/STATE_OWNERSHIP.md +33 -0
- package/frontend/template/docs/TASK_PROTOCOL.md +50 -0
- package/frontend/template/docs/TASK_SCOPE.md +35 -0
- package/frontend/template/docs/TECHNOLOGY_AND_CONFIG.md +96 -0
- package/frontend/template/docs/TESTING_AND_GATES.md +109 -0
- package/frontend/template/docs/TESTING_STRATEGY.md +34 -0
- package/frontend/template/docs/UI_STATES.md +26 -0
- package/frontend/template/docs/reference/front-end-structure-course.html +1606 -0
- package/frontend/template/docs/reference/frontend-project-setup-manual.docx +0 -0
- package/frontend/template/e2e/smoke.spec.ts +12 -0
- package/frontend/template/index.html.tpl +13 -0
- package/frontend/template/package.json.tpl +45 -0
- package/frontend/template/playwright.config.ts +18 -0
- package/frontend/template/scripts/check-architecture.mjs +291 -0
- package/frontend/template/scripts/check-architecture.test.mjs +93 -0
- package/frontend/template/scripts/task-scope.mjs +70 -0
- package/frontend/template/scripts/task-scope.test.mjs +46 -0
- package/frontend/template/src/app/NotFoundPage.tsx +5 -0
- package/frontend/template/src/app/RootLayout.tsx +15 -0
- package/frontend/template/src/app/RouteErrorBoundary.tsx +12 -0
- package/frontend/template/src/app/main.tsx +11 -0
- package/frontend/template/src/app/providers.tsx +12 -0
- package/frontend/template/src/app/router.tsx +14 -0
- package/frontend/template/src/app/store.ts +12 -0
- package/frontend/template/src/features/counter/index.ts +2 -0
- package/frontend/template/src/features/counter/model/counterSlice.test.ts +12 -0
- package/frontend/template/src/features/counter/model/counterSlice.ts +16 -0
- package/frontend/template/src/features/counter/model/selectors.ts +4 -0
- package/frontend/template/src/features/counter/ui/CounterWidget.tsx +16 -0
- package/frontend/template/src/features/home/index.ts +1 -0
- package/frontend/template/src/features/home/routes.tsx +8 -0
- package/frontend/template/src/features/home/ui/HomePage.test.tsx +11 -0
- package/frontend/template/src/features/home/ui/HomePage.tsx +13 -0
- package/frontend/template/src/shared/api/baseApi.ts +9 -0
- package/frontend/template/src/shared/api/index.ts +1 -0
- package/frontend/template/src/shared/config/env.ts +3 -0
- package/frontend/template/src/shared/config/index.ts +1 -0
- package/frontend/template/src/shared/ui/Button.tsx +6 -0
- package/frontend/template/src/shared/ui/StatusPanel.test.tsx +25 -0
- package/frontend/template/src/shared/ui/StatusPanel.tsx +36 -0
- package/frontend/template/src/shared/ui/index.ts +4 -0
- package/frontend/template/src/shared/ui/styles.css +27 -0
- package/frontend/template/src/vite-env.d.ts +1 -0
- package/frontend/template/tests/setup.ts +1 -0
- package/frontend/template/tsconfig.json +21 -0
- package/frontend/template/vite.config.ts +73 -0
- package/npm/cli.js +53 -0
- package/package.json +30 -4
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('starter renders the OBSESSION home route', async ({ page }) => {
|
|
4
|
+
await page.goto('/')
|
|
5
|
+
await expect(page.getByRole('heading', { name: 'OBSESSION' })).toBeVisible()
|
|
6
|
+
await expect(page.getByRole('button', { name: 'TEST UI' })).toBeVisible()
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
test('unknown URL shows not-found state', async ({ page }) => {
|
|
10
|
+
await page.goto('/this-page-does-not-exist')
|
|
11
|
+
await expect(page.getByRole('heading', { name: 'Page not found' })).toBeVisible()
|
|
12
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta name="theme-color" content="#0e1115" />
|
|
7
|
+
<title>{{PROJECT_NAME}} | OBSESSION</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/app/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{PROJECT_NAME}}",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vp dev",
|
|
8
|
+
"build": "vp build",
|
|
9
|
+
"preview": "vp preview",
|
|
10
|
+
"guard": "node scripts/check-architecture.mjs",
|
|
11
|
+
"guard:test": "node --test scripts/check-architecture.test.mjs",
|
|
12
|
+
"lint": "vp lint",
|
|
13
|
+
"check": "node scripts/check-architecture.mjs && vp check",
|
|
14
|
+
"test": "vp test",
|
|
15
|
+
"verify": "npm run guard && npm run guard:test && npm run scope:test && vp check && vp test && vp build && npm run security:audit",
|
|
16
|
+
"scope:start": "node scripts/task-scope.mjs start",
|
|
17
|
+
"scope:check": "node scripts/task-scope.mjs check",
|
|
18
|
+
"scope:test": "node --test scripts/task-scope.test.mjs",
|
|
19
|
+
"test:e2e": "playwright test",
|
|
20
|
+
"test:e2e:ui": "playwright test --ui",
|
|
21
|
+
"security:audit": "npm audit --audit-level=high",
|
|
22
|
+
"verify:task": "npm run verify && npm run scope:check"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@reduxjs/toolkit": "^2.9.0",
|
|
26
|
+
"react": "^19.2.0",
|
|
27
|
+
"react-dom": "^19.2.0",
|
|
28
|
+
"react-redux": "^9.2.0",
|
|
29
|
+
"react-router": "^7.9.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/node": "^24.0.0",
|
|
33
|
+
"@types/react": "^19.2.0",
|
|
34
|
+
"@types/react-dom": "^19.2.0",
|
|
35
|
+
"@vitejs/plugin-react": "^5.1.0",
|
|
36
|
+
"typescript": "~5.9.3",
|
|
37
|
+
"vite-plus": "^1.0.0",
|
|
38
|
+
"@playwright/test": "^1.56.0",
|
|
39
|
+
"@testing-library/react": "^16.3.0",
|
|
40
|
+
"@testing-library/dom": "^10.4.0",
|
|
41
|
+
"@testing-library/jest-dom": "^6.9.0",
|
|
42
|
+
"@testing-library/user-event": "^14.6.0",
|
|
43
|
+
"jsdom": "^27.0.0"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineConfig, devices } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
testDir: './e2e',
|
|
5
|
+
fullyParallel: true,
|
|
6
|
+
forbidOnly: !!process.env.CI,
|
|
7
|
+
retries: process.env.CI ? 2 : 0,
|
|
8
|
+
workers: process.env.CI ? 1 : undefined,
|
|
9
|
+
reporter: process.env.CI ? 'github' : 'list',
|
|
10
|
+
use: { baseURL: 'http://127.0.0.1:4173', trace: 'retain-on-failure' },
|
|
11
|
+
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
|
|
12
|
+
webServer: {
|
|
13
|
+
command: 'npm run dev -- --host 127.0.0.1 --port 4173 --strictPort',
|
|
14
|
+
url: 'http://127.0.0.1:4173',
|
|
15
|
+
reuseExistingServer: !process.env.CI,
|
|
16
|
+
timeout: 90_000,
|
|
17
|
+
},
|
|
18
|
+
})
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Zero-dependency structural guard for the supplied frontend architecture.
|
|
4
|
+
* Runs in the project's root, never edits source files.
|
|
5
|
+
* Not a type checker, formatter, unit tester or semantic business-logic checker.
|
|
6
|
+
*/
|
|
7
|
+
import fs from 'node:fs'
|
|
8
|
+
import path from 'node:path'
|
|
9
|
+
import process from 'node:process'
|
|
10
|
+
|
|
11
|
+
const args = process.argv.slice(2)
|
|
12
|
+
if (args.includes('--help')) {
|
|
13
|
+
console.log('Usage: node scripts/check-architecture.mjs [--root <repository-directory>]')
|
|
14
|
+
process.exit(0)
|
|
15
|
+
}
|
|
16
|
+
const rootIdx = args.indexOf('--root')
|
|
17
|
+
if (rootIdx >= 0 && !args[rootIdx + 1]) {
|
|
18
|
+
console.error('ERROR: --root requires a path')
|
|
19
|
+
process.exit(2)
|
|
20
|
+
}
|
|
21
|
+
const projectRoot = path.resolve(rootIdx >= 0 ? args[rootIdx + 1] : process.cwd())
|
|
22
|
+
const sourceRoot = path.join(projectRoot, 'src')
|
|
23
|
+
const sourceExt = new Set(['.ts', '.tsx', '.mts', '.cts', '.js', '.jsx', '.mjs', '.cjs'])
|
|
24
|
+
const suffixes = ['', '.ts', '.tsx', '.mts', '.cts', '.js', '.jsx', '.mjs', '.cjs', '/index.ts', '/index.tsx', '/index.js', '/index.jsx']
|
|
25
|
+
const files = []
|
|
26
|
+
const errors = []
|
|
27
|
+
const edges = new Map()
|
|
28
|
+
const rel = f => path.relative(projectRoot, f).split(path.sep).join('/')
|
|
29
|
+
const exists = f => fs.existsSync(f) && fs.statSync(f).isFile()
|
|
30
|
+
const error = (f, rule, message) => errors.push(`${rel(f)}: ${rule}: ${message}`)
|
|
31
|
+
|
|
32
|
+
if (!fs.existsSync(sourceRoot) || !fs.statSync(sourceRoot).isDirectory()) {
|
|
33
|
+
console.error('FAIL: Missing src/ directory. Run this checker inside the actual frontend repository after installation.')
|
|
34
|
+
process.exit(1)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function walk(dir) {
|
|
38
|
+
for (const ent of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
39
|
+
const full = path.join(dir, ent.name)
|
|
40
|
+
if (ent.isDirectory()) {
|
|
41
|
+
if (ent.name !== 'node_modules' && ent.name !== 'dist' && ent.name !== 'coverage') walk(full)
|
|
42
|
+
} else if (ent.isFile() && sourceExt.has(path.extname(ent.name))) files.push(full)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
walk(sourceRoot)
|
|
46
|
+
files.sort()
|
|
47
|
+
|
|
48
|
+
function tokenize(source) {
|
|
49
|
+
const out = []
|
|
50
|
+
let i = 0
|
|
51
|
+
while (i < source.length) {
|
|
52
|
+
const c = source[i], n = source[i + 1]
|
|
53
|
+
if (/\s/.test(c)) { i++; continue }
|
|
54
|
+
if (c === '/' && n === '/') { i = source.indexOf('\n', i + 2); if (i < 0) break; continue }
|
|
55
|
+
if (c === '/' && n === '*') { const end = source.indexOf('*/', i + 2); i = end < 0 ? source.length : end + 2; continue }
|
|
56
|
+
if (c === "'" || c === '"' || c === '`') {
|
|
57
|
+
const quote = c
|
|
58
|
+
let value = '', start = i
|
|
59
|
+
i++
|
|
60
|
+
while (i < source.length) {
|
|
61
|
+
if (source[i] === '\\') { value += source.slice(i, i + 2); i += 2; continue }
|
|
62
|
+
if (source[i] === quote) { i++; break }
|
|
63
|
+
value += source[i++]
|
|
64
|
+
}
|
|
65
|
+
out.push({ type: quote === '`' ? 'template' : 'string', value, start })
|
|
66
|
+
continue
|
|
67
|
+
}
|
|
68
|
+
if (/[A-Za-z_$]/.test(c)) {
|
|
69
|
+
let start = i++
|
|
70
|
+
while (i < source.length && /[A-Za-z0-9_$]/.test(source[i])) i++
|
|
71
|
+
out.push({ type: 'word', value: source.slice(start, i), start })
|
|
72
|
+
continue
|
|
73
|
+
}
|
|
74
|
+
out.push({ type: 'punct', value: c, start: i++ })
|
|
75
|
+
}
|
|
76
|
+
return out
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function imports(tokens, f) {
|
|
80
|
+
const out = []
|
|
81
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
82
|
+
const t = tokens[i]
|
|
83
|
+
if (t.type !== 'word') continue
|
|
84
|
+
if (t.value === 'require' && tokens[i + 1]?.value === '(') {
|
|
85
|
+
if (tokens[i + 2]?.type === 'string') out.push(tokens[i + 2].value)
|
|
86
|
+
else error(f, 'IMPORT', 'Non-literal require(...) cannot be audited')
|
|
87
|
+
continue
|
|
88
|
+
}
|
|
89
|
+
if (t.value === 'import' && tokens[i + 1]?.value === '.') continue // import.meta
|
|
90
|
+
if (t.value === 'import' && tokens[i + 1]?.value === '(') {
|
|
91
|
+
if (tokens[i + 2]?.type === 'string') out.push(tokens[i + 2].value)
|
|
92
|
+
else error(f, 'IMPORT', 'Non-literal import(...) cannot be audited')
|
|
93
|
+
continue
|
|
94
|
+
}
|
|
95
|
+
if (t.value !== 'import' && t.value !== 'export') continue
|
|
96
|
+
if (t.value === 'import' && tokens[i + 1]?.type === 'string') {
|
|
97
|
+
out.push(tokens[i + 1].value)
|
|
98
|
+
continue
|
|
99
|
+
}
|
|
100
|
+
// Detect 'from "module"' after import/export, with a bounded look-ahead.
|
|
101
|
+
for (let j = i + 1; j < tokens.length && j < i + 150; j++) {
|
|
102
|
+
if (tokens[j].value === ';') break
|
|
103
|
+
if (tokens[j].value === 'from' && tokens[j + 1]?.type === 'string') {
|
|
104
|
+
out.push(tokens[j + 1].value)
|
|
105
|
+
break
|
|
106
|
+
}
|
|
107
|
+
if (tokens[j].value === 'import' || tokens[j].value === 'export') break
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return out
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function srcParts(f) {
|
|
114
|
+
return path.relative(sourceRoot, f).split(path.sep)
|
|
115
|
+
}
|
|
116
|
+
function zone(f) {
|
|
117
|
+
const p = srcParts(f)
|
|
118
|
+
if (p[0] === 'app') return { name: 'app', p }
|
|
119
|
+
if (p[0] === 'shared') return { name: 'shared', section: p[1], p }
|
|
120
|
+
if (p[0] === 'features' && p.length >= 3) return { name: 'feature', feature: p[1], p }
|
|
121
|
+
return { name: 'outside', p }
|
|
122
|
+
}
|
|
123
|
+
function locate(candidate) {
|
|
124
|
+
for (const suffix of suffixes) {
|
|
125
|
+
const p = path.resolve(candidate + suffix)
|
|
126
|
+
if (exists(p)) return p
|
|
127
|
+
}
|
|
128
|
+
return null
|
|
129
|
+
}
|
|
130
|
+
function resolveImport(importer, spec) {
|
|
131
|
+
if (spec.startsWith('@/')) return locate(path.join(sourceRoot, spec.slice(2)))
|
|
132
|
+
if (spec.startsWith('.')) return locate(path.resolve(path.dirname(importer), spec))
|
|
133
|
+
return null
|
|
134
|
+
}
|
|
135
|
+
function check(importer, spec, destination) {
|
|
136
|
+
const from = zone(importer)
|
|
137
|
+
const to = destination ? zone(destination) : null
|
|
138
|
+
const local = spec.startsWith('@/') || spec.startsWith('.')
|
|
139
|
+
if (spec.startsWith('src/') || spec.startsWith('~/')) {
|
|
140
|
+
error(importer, 'B', `Nonstandard alias bypass: "${spec}". Use @/ for src modules.`)
|
|
141
|
+
}
|
|
142
|
+
if (!local) return
|
|
143
|
+
if (!destination) {
|
|
144
|
+
if (spec.startsWith('@/') || spec.startsWith('.')) {
|
|
145
|
+
// An asset import may be handled by a different loader; TS module imports must resolve.
|
|
146
|
+
if (!/\.(css|scss|sass|less|png|jpe?g|webp|svg|gif|json|woff2?|mp4|pdf)(\?|$)/i.test(spec)) {
|
|
147
|
+
error(importer, 'RESOLVE', `Unresolved local module "${spec}"`)
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return
|
|
151
|
+
}
|
|
152
|
+
if (to.name === 'outside') {
|
|
153
|
+
error(importer, 'PLACEMENT', `Import resolves outside app/features/shared: "${spec}"`)
|
|
154
|
+
return
|
|
155
|
+
}
|
|
156
|
+
if (from.name === 'feature' && spec.startsWith('../../')) {
|
|
157
|
+
error(importer, 'B', `Forbidden ../../ traversal inside a feature: "${spec}"`)
|
|
158
|
+
}
|
|
159
|
+
if (from.name === 'feature' && to.name === 'app') {
|
|
160
|
+
error(importer, 'A', `Feature imports app: "${spec}"`)
|
|
161
|
+
}
|
|
162
|
+
if (from.name === 'shared' && (to.name === 'app' || to.name === 'feature')) {
|
|
163
|
+
error(importer, 'A', `Shared imports app/feature: "${spec}"`)
|
|
164
|
+
}
|
|
165
|
+
if (from.name === 'feature' && to.name === 'feature') {
|
|
166
|
+
if (from.feature !== to.feature) {
|
|
167
|
+
const door = `@/features/${to.feature}`
|
|
168
|
+
if (spec !== door || path.basename(destination) !== 'index.ts') {
|
|
169
|
+
error(importer, 'B', `Cross-feature import must use "${door}", not "${spec}"`)
|
|
170
|
+
}
|
|
171
|
+
} else if (spec.startsWith('@/')) {
|
|
172
|
+
error(importer, 'B', `Within feature ${from.feature} use relative imports, not "${spec}"`)
|
|
173
|
+
}
|
|
174
|
+
if (from.feature === to.feature && from.p[2] === 'model' && to.p[2] === 'ui') {
|
|
175
|
+
error(importer, 'D', `model/ must not import ui/: "${spec}"`)
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if (from.name === 'app' && to.name === 'feature') {
|
|
179
|
+
const door = `@/features/${to.feature}`
|
|
180
|
+
if (spec !== door || path.basename(destination) !== 'index.ts') {
|
|
181
|
+
error(importer, 'B', `app/ must use feature door "${door}", not "${spec}"`)
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (to.name === 'shared' && from.name !== 'shared') {
|
|
185
|
+
const door = `@/shared/${to.section}`
|
|
186
|
+
if (spec !== door || path.basename(destination) !== 'index.ts') {
|
|
187
|
+
error(importer, 'B', `Use shared section door "${door}", not "${spec}"`)
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (from.name === 'shared' && to.name === 'shared' && from.section !== to.section) {
|
|
191
|
+
const door = `@/shared/${to.section}`
|
|
192
|
+
if (spec !== door || path.basename(destination) !== 'index.ts') {
|
|
193
|
+
error(importer, 'B', `Cross-shared-section import must use "${door}", not "${spec}"`)
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (from.name === 'feature' && to.name === 'feature' && from.feature !== to.feature && !spec.startsWith('@/')) {
|
|
197
|
+
error(importer, 'B', `A different feature must be referenced via @/: "${spec}"`)
|
|
198
|
+
}
|
|
199
|
+
if (from.name === 'feature' && to.name === 'shared' && !spec.startsWith('@/')) {
|
|
200
|
+
error(importer, 'B', `Leave the feature through @/shared/<section>: "${spec}"`)
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
for (const f of files) {
|
|
205
|
+
const z = zone(f)
|
|
206
|
+
if (z.name === 'outside' && !/^(vite-env|env)\.d\.ts$/.test(z.p.join('/'))) {
|
|
207
|
+
error(f, 'PLACEMENT', 'Source module not in src/app, src/features/<name>, or src/shared')
|
|
208
|
+
}
|
|
209
|
+
if (z.name === 'feature' && z.p.length > 4) {
|
|
210
|
+
error(f, 'FLAT', 'Nested folders inside a feature room are forbidden; split into small sibling feature modules')
|
|
211
|
+
}
|
|
212
|
+
if (z.name === 'shared' && z.p[1] && !['ui', 'lib', 'api', 'config'].includes(z.section)) {
|
|
213
|
+
error(f, 'PLACEMENT', `Unexpected shared section "${z.section}"; expected ui/lib/api/config`)
|
|
214
|
+
}
|
|
215
|
+
const content = fs.readFileSync(f, 'utf8')
|
|
216
|
+
const toks = tokenize(content)
|
|
217
|
+
if (z.name === 'app') {
|
|
218
|
+
if (toks.some((t, i) => t.value === 'fetch' && toks[i + 1]?.value === '(')) {
|
|
219
|
+
error(f, 'D', 'Business HTTP fetch() in app; move request into a feature API')
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
if (z.name === 'shared' && z.section === 'ui') {
|
|
223
|
+
const usesStore = toks.some((t, i) => ['useSelector', 'useDispatch'].includes(t.value))
|
|
224
|
+
if (usesStore) error(f, 'E', 'Shared UI may not select/dispatch business state; pass props')
|
|
225
|
+
}
|
|
226
|
+
if (/\.test\.[cm]?[jt]sx?$/.test(f)) {
|
|
227
|
+
const base = f.replace(/\.test\.[cm]?[jt]sx?$/, '')
|
|
228
|
+
if (!['.ts', '.tsx', '.js', '.jsx', '.mts', '.cts', '.mjs', '.cjs'].some(ext => exists(base + ext))) {
|
|
229
|
+
error(f, 'H', 'Test must be beside its corresponding source module')
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
const refs = imports(toks, f)
|
|
233
|
+
const deps = new Set()
|
|
234
|
+
for (const spec of refs) {
|
|
235
|
+
if (z.name === 'shared' && z.section === 'ui' && spec === 'react-redux') {
|
|
236
|
+
error(f, 'E', 'shared/ui must receive business state via props, not react-redux')
|
|
237
|
+
}
|
|
238
|
+
const destination = resolveImport(f, spec)
|
|
239
|
+
check(f, spec, destination)
|
|
240
|
+
if (destination) deps.add(destination)
|
|
241
|
+
}
|
|
242
|
+
edges.set(f, [...deps].filter(p => files.includes(p)))
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
const featureFolders = path.join(sourceRoot, 'features')
|
|
246
|
+
if (fs.existsSync(featureFolders)) {
|
|
247
|
+
for (const ent of fs.readdirSync(featureFolders, { withFileTypes: true })) {
|
|
248
|
+
if (!ent.isDirectory()) continue
|
|
249
|
+
const folder = path.join(featureFolders, ent.name)
|
|
250
|
+
if (files.some(f => f.startsWith(folder + path.sep)) && !exists(path.join(folder, 'index.ts'))) {
|
|
251
|
+
error(folder, 'B', `Feature "${ent.name}" must have a public index.ts door`)
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
const sharedRoot = path.join(sourceRoot, 'shared')
|
|
256
|
+
if (fs.existsSync(sharedRoot)) {
|
|
257
|
+
for (const name of ['ui', 'lib', 'api', 'config']) {
|
|
258
|
+
const folder = path.join(sharedRoot, name)
|
|
259
|
+
if (files.some(f => f.startsWith(folder + path.sep)) && !exists(path.join(folder, 'index.ts'))) {
|
|
260
|
+
error(folder, 'B', `Shared section "${name}" must have a public index.ts door`)
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const state = new Map() // 0/unvisited, 1/visiting, 2/done
|
|
266
|
+
const stack = []
|
|
267
|
+
const foundCycles = new Set()
|
|
268
|
+
function visit(f) {
|
|
269
|
+
state.set(f, 1); stack.push(f)
|
|
270
|
+
for (const dest of edges.get(f) || []) {
|
|
271
|
+
if (state.get(dest) === 1) {
|
|
272
|
+
const at = stack.indexOf(dest)
|
|
273
|
+
const members = stack.slice(at)
|
|
274
|
+
const key = [...members].map(rel).sort().join(' | ')
|
|
275
|
+
if (!foundCycles.has(key)) {
|
|
276
|
+
foundCycles.add(key)
|
|
277
|
+
error(f, 'C', `Import cycle: ${[...members, dest].map(rel).join(' -> ')}`)
|
|
278
|
+
}
|
|
279
|
+
} else if (!state.has(dest)) visit(dest)
|
|
280
|
+
}
|
|
281
|
+
stack.pop(); state.set(f, 2)
|
|
282
|
+
}
|
|
283
|
+
for (const f of files) if (!state.has(f)) visit(f)
|
|
284
|
+
|
|
285
|
+
if (errors.length) {
|
|
286
|
+
console.error(`FAIL: ${errors.length} architecture violation(s) in ${files.length} scanned source files.`)
|
|
287
|
+
for (const e of errors.sort()) console.error(` ${e}`)
|
|
288
|
+
process.exit(1)
|
|
289
|
+
}
|
|
290
|
+
console.log(`PASS: architecture boundary checker (${files.length} source files scanned; A/B/C/placement/test-adjacency checks clear).`)
|
|
291
|
+
console.log('Manual review still required: business neutrality, shared copy/rule-of-two, route laziness, state ownership and test behavior.')
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import assert from 'node:assert/strict'
|
|
2
|
+
import { spawnSync } from 'node:child_process'
|
|
3
|
+
import fs from 'node:fs'
|
|
4
|
+
import os from 'node:os'
|
|
5
|
+
import path from 'node:path'
|
|
6
|
+
import { fileURLToPath } from 'node:url'
|
|
7
|
+
import test from 'node:test'
|
|
8
|
+
|
|
9
|
+
const checker = path.join(path.dirname(fileURLToPath(import.meta.url)), 'check-architecture.mjs')
|
|
10
|
+
function fixture(changes = {}) {
|
|
11
|
+
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'frontend-arch-fixture-'))
|
|
12
|
+
const baseline = {
|
|
13
|
+
'src/app/main.tsx': "import { Button } from '@/shared/ui'\nimport { CartPage } from '@/features/cart'\nvoid Button; void CartPage\n",
|
|
14
|
+
'src/features/cart/index.ts': "export { CartPage } from './ui/CartPage'\n",
|
|
15
|
+
'src/features/cart/ui/CartPage.tsx': "import { Button } from '@/shared/ui'\nexport const CartPage = () => Button\n",
|
|
16
|
+
'src/shared/ui/index.ts': "export { Button } from './Button'\n",
|
|
17
|
+
'src/shared/ui/Button.tsx': 'export const Button = () => null\n',
|
|
18
|
+
}
|
|
19
|
+
for (const [file, body] of Object.entries({ ...baseline, ...changes })) {
|
|
20
|
+
const destination = path.join(root, file)
|
|
21
|
+
fs.mkdirSync(path.dirname(destination), { recursive: true })
|
|
22
|
+
fs.writeFileSync(destination, body)
|
|
23
|
+
}
|
|
24
|
+
return root
|
|
25
|
+
}
|
|
26
|
+
function run(root) {
|
|
27
|
+
return spawnSync(process.execPath, [checker, '--root', root], { encoding: 'utf8' })
|
|
28
|
+
}
|
|
29
|
+
function withFixture(changes, fn) {
|
|
30
|
+
const root = fixture(changes)
|
|
31
|
+
try { fn(run(root)) } finally { fs.rmSync(root, { recursive: true, force: true }) }
|
|
32
|
+
}
|
|
33
|
+
const fail = (c, rule) => withFixture(c, r => {
|
|
34
|
+
assert.notEqual(r.status, 0, `Expected failure, got ${r.stdout}`)
|
|
35
|
+
assert.match(r.stderr, new RegExp(rule))
|
|
36
|
+
})
|
|
37
|
+
test('valid down-only imports, doors and basic feature pass', () => {
|
|
38
|
+
withFixture({}, r => assert.equal(r.status, 0, r.stderr))
|
|
39
|
+
})
|
|
40
|
+
test('A: feature importing app fails', () => fail({
|
|
41
|
+
'src/features/cart/ui/CartPage.tsx': "import { example } from '@/app/example'\nexport const CartPage = example\n",
|
|
42
|
+
'src/app/example.ts': 'export const example = 1\n',
|
|
43
|
+
}, 'A:'))
|
|
44
|
+
test('A: shared importing feature fails', () => fail({
|
|
45
|
+
'src/shared/ui/Button.tsx': "import { CartPage } from '@/features/cart'\nexport const Button = CartPage\n",
|
|
46
|
+
}, 'A:'))
|
|
47
|
+
test('B: feature deep import fails', () => fail({
|
|
48
|
+
'src/features/auth/index.ts': "export { loggedOut } from './model/authSlice'\n",
|
|
49
|
+
'src/features/auth/model/authSlice.ts': 'export const loggedOut = () => null\n',
|
|
50
|
+
'src/features/cart/ui/CartPage.tsx': "import { loggedOut } from '@/features/auth/model/authSlice'\nexport const CartPage = loggedOut\n",
|
|
51
|
+
}, 'B:'))
|
|
52
|
+
test('B: relative cross-feature import fails', () => fail({
|
|
53
|
+
'src/features/auth/index.ts': "export { loggedOut } from './model/authSlice'\n",
|
|
54
|
+
'src/features/auth/model/authSlice.ts': 'export const loggedOut = () => null\n',
|
|
55
|
+
'src/features/cart/ui/CartPage.tsx': "import { loggedOut } from '../../auth/model/authSlice'\nexport const CartPage = loggedOut\n",
|
|
56
|
+
}, 'B:'))
|
|
57
|
+
test('C: feature cycle fails', () => fail({
|
|
58
|
+
'src/features/auth/index.ts': "export { loggedOut } from './model/authSlice'\n",
|
|
59
|
+
'src/features/auth/model/authSlice.ts': "import { CartPage } from '@/features/cart'\nexport const loggedOut = () => CartPage\n",
|
|
60
|
+
'src/features/cart/ui/CartPage.tsx': "import { loggedOut } from '@/features/auth'\nexport const CartPage = loggedOut\n",
|
|
61
|
+
}, 'C:'))
|
|
62
|
+
test('C: intra-feature cycle fails', () => fail({
|
|
63
|
+
'src/features/cart/ui/CartPage.tsx': "import { helper } from '../lib/helper'\nexport const CartPage = helper\n",
|
|
64
|
+
'src/features/cart/lib/helper.ts': "import { CartPage } from '../ui/CartPage'\nexport const helper = CartPage\n",
|
|
65
|
+
}, 'C:'))
|
|
66
|
+
test('D: model importing UI fails', () => fail({
|
|
67
|
+
'src/features/cart/model/cartSlice.ts': "import { CartPage } from '../ui/CartPage'\nexport const cartSlice = CartPage\n",
|
|
68
|
+
}, 'D:'))
|
|
69
|
+
test('E: shared UI selecting Redux state fails', () => fail({
|
|
70
|
+
'src/shared/ui/Button.tsx': "import { useSelector } from 'react-redux'\nexport const Button = () => useSelector(() => null)\n",
|
|
71
|
+
}, 'E:'))
|
|
72
|
+
test('H: colocated test without matching implementation fails', () => fail({
|
|
73
|
+
'src/features/cart/lib/missing.test.ts': 'export const nothing = 0\n',
|
|
74
|
+
}, 'H:'))
|
|
75
|
+
test('valid adjacent test and feature door pass', () => {
|
|
76
|
+
withFixture({
|
|
77
|
+
'src/features/cart/lib/calcTotal.ts': 'export const calcTotal = () => 0\n',
|
|
78
|
+
'src/features/cart/lib/calcTotal.test.ts': "import { calcTotal } from './calcTotal'\nvoid calcTotal\n",
|
|
79
|
+
}, r => assert.equal(r.status, 0, r.stderr))
|
|
80
|
+
})
|
|
81
|
+
test('literal dynamic page import is resolved and allowed inside feature', () => {
|
|
82
|
+
withFixture({
|
|
83
|
+
'src/features/cart/routes.tsx': "export const routes = [{ lazy: () => import('./ui/CartPage') }]\n",
|
|
84
|
+
'src/features/cart/index.ts': "export { routes } from './routes'\n",
|
|
85
|
+
}, r => assert.equal(r.status, 0, r.stderr))
|
|
86
|
+
})
|
|
87
|
+
test('non-literal import fails closed', () => fail({
|
|
88
|
+
'src/features/cart/ui/CartPage.tsx': "const target = './foo'; export const CartPage = () => import(target)\n",
|
|
89
|
+
}, 'IMPORT:'))
|
|
90
|
+
|
|
91
|
+
test('FLAT: nested component directories fail', () => fail({
|
|
92
|
+
'src/features/cart/ui/components/Nested.tsx': 'export const Nested = () => null\n',
|
|
93
|
+
}, 'FLAT:'))
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Task-scope guard. Start before edits, then check changed/new/deleted files.
|
|
4
|
+
* Local safeguard, NOT an OS sandbox: a malicious agent can edit the manifest.
|
|
5
|
+
*/
|
|
6
|
+
import fs from 'node:fs'
|
|
7
|
+
import path from 'node:path'
|
|
8
|
+
import crypto from 'node:crypto'
|
|
9
|
+
import process from 'node:process'
|
|
10
|
+
|
|
11
|
+
const root = process.cwd()
|
|
12
|
+
const manifestPath = path.join(root, '.agent', 'task-scope.json')
|
|
13
|
+
const ignoredDirs = new Set(['.git', 'node_modules', 'dist', 'coverage', '.vite', '.vite-plus', 'playwright-report', 'test-results'])
|
|
14
|
+
const ignoredFiles = new Set(['.agent/task-scope.json', '.env', '.DS_Store'])
|
|
15
|
+
function snapshot() {
|
|
16
|
+
const result = {}
|
|
17
|
+
function walk(folder) {
|
|
18
|
+
for (const entry of fs.readdirSync(folder, { withFileTypes: true })) {
|
|
19
|
+
if (entry.isSymbolicLink()) continue
|
|
20
|
+
const full = path.join(folder, entry.name)
|
|
21
|
+
const rel = path.relative(root, full).split(path.sep).join('/')
|
|
22
|
+
if (entry.isDirectory()) {
|
|
23
|
+
if (!ignoredDirs.has(entry.name)) walk(full)
|
|
24
|
+
} else if (entry.isFile() && !ignoredFiles.has(rel) && !rel.startsWith('.env.')) {
|
|
25
|
+
result[rel] = crypto.createHash('sha256').update(fs.readFileSync(full)).digest('hex')
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
walk(root)
|
|
30
|
+
return result
|
|
31
|
+
}
|
|
32
|
+
function validPath(p) {
|
|
33
|
+
return typeof p === 'string' && !p.startsWith('/') && !p.startsWith('\\') &&
|
|
34
|
+
!p.includes('\\') && !p.includes('..') && !p.includes('//') &&
|
|
35
|
+
!p.includes('?') && !p.includes('[') && !p.includes('{') &&
|
|
36
|
+
p !== '**' && p !== 'src/**' && p !== 'src/features/**' && p !== '.' &&
|
|
37
|
+
(/^[A-Za-z0-9._/-]+$/.test(p) || (/^[A-Za-z0-9._/-]+\/\*\*$/.test(p)))
|
|
38
|
+
}
|
|
39
|
+
function matches(file, pattern) {
|
|
40
|
+
return pattern.endsWith('/**')
|
|
41
|
+
? file.startsWith(pattern.slice(0, -3) + '/')
|
|
42
|
+
: file === pattern
|
|
43
|
+
}
|
|
44
|
+
function fatal(message) { console.error('FAIL: task scope - ' + message); process.exit(1) }
|
|
45
|
+
const [cmd, ...args] = process.argv.slice(2)
|
|
46
|
+
if (cmd === 'start') {
|
|
47
|
+
if (fs.existsSync(manifestPath)) fatal('active task already exists; check and archive it before starting another')
|
|
48
|
+
const idAt = args.indexOf('--id')
|
|
49
|
+
const id = idAt >= 0 ? args[idAt + 1] : undefined
|
|
50
|
+
const allows = args.flatMap((a,i) => a === '--allow' ? [args[i+1]] : [])
|
|
51
|
+
if (!id || !/^[A-Za-z0-9][A-Za-z0-9._-]{1,100}$/.test(id)) fatal('pass --id OB-123')
|
|
52
|
+
if (!allows.length || allows.some(x => !validPath(x))) fatal('pass precise --allow <relative-path> options; only exact files or folder/**')
|
|
53
|
+
fs.mkdirSync(path.dirname(manifestPath), {recursive:true})
|
|
54
|
+
fs.writeFileSync(manifestPath, JSON.stringify({version:1, taskId:id, allowedPaths:allows, createdAt:new Date().toISOString(), baseline:snapshot()},null,2)+'\n', {flag:'wx',mode:0o600})
|
|
55
|
+
console.log(`PASS: scope started for ${id}; ${allows.length} approved path(s) recorded. Run npm run scope:check before completion.`)
|
|
56
|
+
} else if (cmd === 'check') {
|
|
57
|
+
if (!fs.existsSync(manifestPath)) fatal('no active task manifest. Run npm run scope:start -- --id OB-123 --allow "src/features/my-feature/**" before editing.')
|
|
58
|
+
let scope
|
|
59
|
+
try { scope=JSON.parse(fs.readFileSync(manifestPath,'utf8')) } catch { fatal('invalid JSON manifest') }
|
|
60
|
+
if (scope.version !== 1 || !scope.taskId || !Array.isArray(scope.allowedPaths) || scope.allowedPaths.length < 1 || scope.allowedPaths.some(x => !validPath(x)) || !scope.baseline || typeof scope.baseline !== 'object') fatal('invalid task manifest')
|
|
61
|
+
const now = snapshot()
|
|
62
|
+
const changed = [...new Set([...Object.keys(scope.baseline), ...Object.keys(now)])].filter(f => scope.baseline[f] !== now[f]).sort()
|
|
63
|
+
const illegal = changed.filter(f => !scope.allowedPaths.some(p => matches(f,p)))
|
|
64
|
+
for (const file of changed) console.log(` ${illegal.includes(file) ? 'BLOCKED' : 'ALLOWED'} ${file} (${!now[file] ? 'deleted' : !scope.baseline[file] ? 'created' : 'modified'})`)
|
|
65
|
+
if (illegal.length) fatal(`${illegal.length} out-of-scope file(s) for task ${scope.taskId}. Revert only your own modifications or obtain approval, then restart a new scope.`)
|
|
66
|
+
console.log(`PASS: task ${scope.taskId}; ${changed.length} changed file(s) in scope.`)
|
|
67
|
+
} else {
|
|
68
|
+
console.error('Usage:\n node scripts/task-scope.mjs start --id OB-123 --allow "src/features/home/**" [--allow "src/app/router.tsx"]\n node scripts/task-scope.mjs check')
|
|
69
|
+
process.exit(2)
|
|
70
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import test from 'node:test'
|
|
2
|
+
import assert from 'node:assert/strict'
|
|
3
|
+
import { spawnSync } from 'node:child_process'
|
|
4
|
+
import fs from 'node:fs'
|
|
5
|
+
import os from 'node:os'
|
|
6
|
+
import path from 'node:path'
|
|
7
|
+
import { fileURLToPath } from 'node:url'
|
|
8
|
+
|
|
9
|
+
const script = path.join(path.dirname(fileURLToPath(import.meta.url)), 'task-scope.mjs')
|
|
10
|
+
function fixture(action) {
|
|
11
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'obsession-scope-'))
|
|
12
|
+
try {
|
|
13
|
+
fs.mkdirSync(path.join(dir, 'src/features/home'), {recursive:true})
|
|
14
|
+
fs.mkdirSync(path.join(dir, 'src/app'), {recursive:true})
|
|
15
|
+
fs.writeFileSync(path.join(dir,'src/features/home/index.ts'), 'export const x=1\n')
|
|
16
|
+
fs.writeFileSync(path.join(dir,'src/app/router.tsx'), 'export const router=1\n')
|
|
17
|
+
const run = (...args) => spawnSync(process.execPath, [script,...args], {cwd:dir, encoding:'utf8'})
|
|
18
|
+
action({dir,run})
|
|
19
|
+
} finally {fs.rmSync(dir,{recursive:true,force:true})}
|
|
20
|
+
}
|
|
21
|
+
test('scope must be started before checking',()=> fixture(({run}) => {
|
|
22
|
+
assert.notEqual(run('check').status,0)
|
|
23
|
+
}))
|
|
24
|
+
test('an allowed change and new file pass',()=> fixture(({dir,run}) => {
|
|
25
|
+
assert.equal(run('start','--id','OB-123','--allow','src/features/home/**').status,0)
|
|
26
|
+
fs.writeFileSync(path.join(dir,'src/features/home/index.ts'),'export const x=2\n')
|
|
27
|
+
fs.writeFileSync(path.join(dir,'src/features/home/New.ts'),'export const y=3\n')
|
|
28
|
+
assert.equal(run('check').status,0)
|
|
29
|
+
}))
|
|
30
|
+
test('unexpected changes are blocked',()=> fixture(({dir,run}) => {
|
|
31
|
+
assert.equal(run('start','--id','OB-123','--allow','src/features/home/**').status,0)
|
|
32
|
+
fs.writeFileSync(path.join(dir,'src/app/router.tsx'),'export const router=2\n')
|
|
33
|
+
const result = run('check')
|
|
34
|
+
assert.notEqual(result.status,0)
|
|
35
|
+
assert.match(result.stderr,/out-of-scope/)
|
|
36
|
+
}))
|
|
37
|
+
test('deleted out-of-scope file is blocked',()=> fixture(({dir,run}) => {
|
|
38
|
+
assert.equal(run('start','--id','OB-123','--allow','src/features/home/**').status,0)
|
|
39
|
+
fs.rmSync(path.join(dir,'src/app/router.tsx'))
|
|
40
|
+
assert.notEqual(run('check').status,0)
|
|
41
|
+
}))
|
|
42
|
+
test('overly broad scope and duplicate start are blocked',()=> fixture(({run}) => {
|
|
43
|
+
assert.notEqual(run('start','--id','OB-123','--allow','src/**').status,0)
|
|
44
|
+
assert.equal(run('start','--id','OB-123','--allow','src/features/home/**').status,0)
|
|
45
|
+
assert.notEqual(run('start','--id','OB-456','--allow','src/features/home/**').status,0)
|
|
46
|
+
}))
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Outlet } from 'react-router'
|
|
2
|
+
import { CounterWidget } from '@/features/counter'
|
|
3
|
+
|
|
4
|
+
export function RootLayout() {
|
|
5
|
+
return (
|
|
6
|
+
<div className="app-frame">
|
|
7
|
+
<header className="app-header">
|
|
8
|
+
<span className="app-brand">OBSESSION / FRONTEND</span>
|
|
9
|
+
<CounterWidget />
|
|
10
|
+
</header>
|
|
11
|
+
<main><Outlet /></main>
|
|
12
|
+
<footer className="app-footer">app/ wires features. Features own logic.</footer>
|
|
13
|
+
</div>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { isRouteErrorResponse, useRouteError } from 'react-router'
|
|
2
|
+
import { StatusPanel } from '@/shared/ui'
|
|
3
|
+
|
|
4
|
+
/** App shell owns routing failures; business-specific 403 rules stay in features. */
|
|
5
|
+
export function RouteErrorBoundary() {
|
|
6
|
+
const error = useRouteError()
|
|
7
|
+
if (isRouteErrorResponse(error)) {
|
|
8
|
+
if (error.status === 401 || error.status === 403) return <StatusPanel kind="unauthorized" />
|
|
9
|
+
if (error.status === 404) return <StatusPanel kind="not-found" />
|
|
10
|
+
}
|
|
11
|
+
return <StatusPanel kind="error" description="The page could not be loaded." />
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StrictMode } from 'react'
|
|
2
|
+
import { createRoot } from 'react-dom/client'
|
|
3
|
+
import { Providers } from './providers'
|
|
4
|
+
|
|
5
|
+
const root = document.getElementById('root')
|
|
6
|
+
if (!root) throw new Error('Missing #root')
|
|
7
|
+
createRoot(root).render(
|
|
8
|
+
<StrictMode>
|
|
9
|
+
<Providers />
|
|
10
|
+
</StrictMode>,
|
|
11
|
+
)
|