create-m5kdev 0.41.0 → 0.41.1
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/package.json +1 -1
- package/templates/minimal-app/.cursor/rules/frontend-component-guide.mdc +95 -95
- package/templates/minimal-app/.cursor/rules/frontend-data-guide.mdc +103 -103
- package/templates/minimal-app/.cursor/rules/frontend-form-guide.mdc +80 -80
- package/templates/minimal-app/.cursor/rules/frontend-hook-guide.mdc +79 -79
- package/templates/minimal-app/.cursor/rules/frontend-i18n-guide.mdc +45 -45
- package/templates/minimal-app/.cursor/rules/module-dto-guide.mdc +60 -60
- package/templates/minimal-app/.cursor/rules/module-prompt-guide.mdc +214 -214
- package/templates/minimal-app/.cursor/rules/module-repository-guide.mdc +167 -167
- package/templates/minimal-app/.cursor/rules/module-schema-guide.mdc +53 -53
- package/templates/minimal-app/.cursor/rules/module-service-guide.mdc +367 -367
- package/templates/minimal-app/.cursor/rules/module-trpc-guide.mdc +71 -71
- package/templates/minimal-app/.github/workflows/check.yml.tpl +21 -0
- package/templates/minimal-app/AGENTS.md.tpl +22 -31
- package/templates/minimal-app/CLAUDE.md.tpl +15 -1
- package/templates/minimal-app/GLOSSARY.md.tpl +181 -0
- package/templates/minimal-app/README.md.tpl +2 -0
- package/templates/minimal-app/apps/.gitignore.tpl +13 -13
- package/templates/minimal-app/apps/e2e/package.json.tpl +23 -23
- package/templates/minimal-app/apps/email/package.json.tpl +34 -34
- package/templates/minimal-app/apps/expo/.gitignore.tpl +44 -44
- package/templates/minimal-app/apps/expo/.prettierignore +13 -13
- package/templates/minimal-app/apps/expo/.prettierrc.json.tpl +9 -9
- package/templates/minimal-app/apps/expo/CHANGELOG.md.tpl +156 -156
- package/templates/minimal-app/apps/expo/README.md.tpl +44 -44
- package/templates/minimal-app/apps/expo/expo-env.d.ts.tpl +3 -0
- package/templates/minimal-app/apps/expo/package.json.tpl +63 -63
- package/templates/minimal-app/apps/expo/uniwind-types.d.ts.tpl +10 -0
- package/templates/minimal-app/apps/landing/package.json.tpl +34 -34
- package/templates/minimal-app/apps/server/drizzle/0000_whole_echo.sql +366 -366
- package/templates/minimal-app/apps/server/drizzle/0002_crazy_lilith.sql +46 -46
- package/templates/minimal-app/apps/server/drizzle/0003_freezing_fantastic_four.sql +3 -3
- package/templates/minimal-app/apps/server/drizzle/0004_slow_ezekiel_stane.sql +98 -98
- package/templates/minimal-app/apps/server/drizzle/0005_wonderful_the_professor.sql +1 -1
- package/templates/minimal-app/apps/server/drizzle/0006_lazy_blue_marvel.sql +158 -158
- package/templates/minimal-app/apps/server/drizzle/0007_abnormal_ultimo.sql +1 -1
- package/templates/minimal-app/apps/server/drizzle/0008_steady_nekra.sql +86 -86
- package/templates/minimal-app/apps/server/drizzle/meta/0000_snapshot.json.tpl +2624 -2624
- package/templates/minimal-app/apps/server/drizzle/meta/0001_snapshot.json.tpl +2670 -2670
- package/templates/minimal-app/apps/server/drizzle/meta/0002_snapshot.json.tpl +2715 -2715
- package/templates/minimal-app/apps/server/drizzle/meta/0003_snapshot.json.tpl +2687 -2687
- package/templates/minimal-app/apps/server/drizzle/meta/0004_snapshot.json.tpl +2497 -2497
- package/templates/minimal-app/apps/server/drizzle/meta/0005_snapshot.json.tpl +2483 -2483
- package/templates/minimal-app/apps/server/drizzle/meta/0006_snapshot.json.tpl +3602 -3602
- package/templates/minimal-app/apps/server/drizzle/meta/0007_snapshot.json.tpl +3619 -3619
- package/templates/minimal-app/apps/server/drizzle/meta/0008_snapshot.json.tpl +3619 -3619
- package/templates/minimal-app/apps/server/drizzle/meta/_journal.json.tpl +76 -76
- package/templates/minimal-app/apps/server/package.json.tpl +57 -57
- package/templates/minimal-app/apps/server/src/app.ts.tpl +1 -0
- package/templates/minimal-app/apps/shared/package.json.tpl +27 -27
- package/templates/minimal-app/apps/webapp/AGENTS.md.tpl +24 -24
- package/templates/minimal-app/apps/webapp/index.html.tpl +22 -22
- package/templates/minimal-app/apps/webapp/package.json.tpl +53 -53
- package/templates/minimal-app/apps/webapp/public/logo.svg.tpl +6 -6
- package/templates/minimal-app/biome.json.tpl +1 -0
- package/templates/minimal-app/docs/adr/.gitkeep +0 -0
- package/templates/minimal-app/docs/agents/domain.md.tpl +38 -0
- package/templates/minimal-app/docs/agents/issue-tracker.md.tpl +45 -0
- package/templates/minimal-app/docs/agents/triage-labels.md.tpl +15 -0
- package/templates/minimal-app/pnpm-workspace.yaml.tpl +12 -12
- package/templates/minimal-app/template.manifest.json +12 -0
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "7",
|
|
3
|
-
"dialect": "sqlite",
|
|
4
|
-
"entries": [
|
|
5
|
-
{
|
|
6
|
-
"idx": 0,
|
|
7
|
-
"version": "6",
|
|
8
|
-
"when": 1787759631723,
|
|
9
|
-
"tag": "0000_whole_echo",
|
|
10
|
-
"breakpoints": true
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"idx": 1,
|
|
14
|
-
"version": "6",
|
|
15
|
-
"when": 1788197370969,
|
|
16
|
-
"tag": "0001_yummy_spectrum",
|
|
17
|
-
"breakpoints": true
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"idx": 2,
|
|
21
|
-
"version": "6",
|
|
22
|
-
"when": 1788197859737,
|
|
23
|
-
"tag": "0002_crazy_lilith",
|
|
24
|
-
"breakpoints": true
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"idx": 3,
|
|
28
|
-
"version": "6",
|
|
29
|
-
"when": 1788198203749,
|
|
30
|
-
"tag": "0003_freezing_fantastic_four",
|
|
31
|
-
"breakpoints": true
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"idx": 4,
|
|
35
|
-
"version": "6",
|
|
36
|
-
"when": 1788198833389,
|
|
37
|
-
"tag": "0004_slow_ezekiel_stane",
|
|
38
|
-
"breakpoints": true
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"idx": 5,
|
|
42
|
-
"version": "6",
|
|
43
|
-
"when": 1788253467922,
|
|
44
|
-
"tag": "0005_wonderful_the_professor",
|
|
45
|
-
"breakpoints": true
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"idx": 6,
|
|
49
|
-
"version": "6",
|
|
50
|
-
"when": 1788787832546,
|
|
51
|
-
"tag": "0006_lazy_blue_marvel",
|
|
52
|
-
"breakpoints": true
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"idx": 7,
|
|
56
|
-
"version": "6",
|
|
57
|
-
"when": 1788788533642,
|
|
58
|
-
"tag": "0007_abnormal_ultimo",
|
|
59
|
-
"breakpoints": true
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"idx": 8,
|
|
63
|
-
"version": "6",
|
|
64
|
-
"when": 1788789159968,
|
|
65
|
-
"tag": "0008_steady_nekra",
|
|
66
|
-
"breakpoints": true
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"idx": 9,
|
|
70
|
-
"version": "6",
|
|
71
|
-
"when": 1791905282553,
|
|
72
|
-
"tag": "0009_empty_starjammers",
|
|
73
|
-
"breakpoints": true
|
|
74
|
-
}
|
|
75
|
-
]
|
|
76
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"version": "7",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"entries": [
|
|
5
|
+
{
|
|
6
|
+
"idx": 0,
|
|
7
|
+
"version": "6",
|
|
8
|
+
"when": 1787759631723,
|
|
9
|
+
"tag": "0000_whole_echo",
|
|
10
|
+
"breakpoints": true
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"idx": 1,
|
|
14
|
+
"version": "6",
|
|
15
|
+
"when": 1788197370969,
|
|
16
|
+
"tag": "0001_yummy_spectrum",
|
|
17
|
+
"breakpoints": true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"idx": 2,
|
|
21
|
+
"version": "6",
|
|
22
|
+
"when": 1788197859737,
|
|
23
|
+
"tag": "0002_crazy_lilith",
|
|
24
|
+
"breakpoints": true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"idx": 3,
|
|
28
|
+
"version": "6",
|
|
29
|
+
"when": 1788198203749,
|
|
30
|
+
"tag": "0003_freezing_fantastic_four",
|
|
31
|
+
"breakpoints": true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"idx": 4,
|
|
35
|
+
"version": "6",
|
|
36
|
+
"when": 1788198833389,
|
|
37
|
+
"tag": "0004_slow_ezekiel_stane",
|
|
38
|
+
"breakpoints": true
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"idx": 5,
|
|
42
|
+
"version": "6",
|
|
43
|
+
"when": 1788253467922,
|
|
44
|
+
"tag": "0005_wonderful_the_professor",
|
|
45
|
+
"breakpoints": true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"idx": 6,
|
|
49
|
+
"version": "6",
|
|
50
|
+
"when": 1788787832546,
|
|
51
|
+
"tag": "0006_lazy_blue_marvel",
|
|
52
|
+
"breakpoints": true
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"idx": 7,
|
|
56
|
+
"version": "6",
|
|
57
|
+
"when": 1788788533642,
|
|
58
|
+
"tag": "0007_abnormal_ultimo",
|
|
59
|
+
"breakpoints": true
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"idx": 8,
|
|
63
|
+
"version": "6",
|
|
64
|
+
"when": 1788789159968,
|
|
65
|
+
"tag": "0008_steady_nekra",
|
|
66
|
+
"breakpoints": true
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"idx": 9,
|
|
70
|
+
"version": "6",
|
|
71
|
+
"when": 1791905282553,
|
|
72
|
+
"tag": "0009_empty_starjammers",
|
|
73
|
+
"breakpoints": true
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{PACKAGE_SCOPE}}/server",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "tsx watch --env-file=../shared/.env src/index.ts",
|
|
8
|
-
"build": "tsup",
|
|
9
|
-
"start": "node dist/index.js",
|
|
10
|
-
"lint": "biome check .",
|
|
11
|
-
"lint:fix": "biome check . --write",
|
|
12
|
-
"check-types": "tsc --noEmit",
|
|
13
|
-
"drizzle:generate": "drizzle-kit generate",
|
|
14
|
-
"drizzle:migrate": "drizzle-kit migrate",
|
|
15
|
-
"drizzle:studio": "drizzle-kit studio",
|
|
16
|
-
"drizzle:sync": "tsx --env-file=../shared/.env db.ts sync",
|
|
17
|
-
"drizzle:seed": "tsx --env-file=../shared/.env db.ts seed",
|
|
18
|
-
"drizzle:reset": "tsx --env-file=../shared/.env db.ts reset"
|
|
19
|
-
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"{{PACKAGE_SCOPE}}/email": "workspace:*",
|
|
22
|
-
"{{PACKAGE_SCOPE}}/shared": "workspace:*",
|
|
23
|
-
"@libsql/client": "catalog:m5kdev",
|
|
24
|
-
"@m5kdev/backend": "catalog:m5kdev",
|
|
25
|
-
"@m5kdev/commons": "catalog:m5kdev",
|
|
26
|
-
"@mastra/core": "catalog:m5kdev",
|
|
27
|
-
"@openrouter/ai-sdk-provider": "catalog:m5kdev",
|
|
28
|
-
"@opentelemetry/api": "catalog:m5kdev",
|
|
29
|
-
"@trpc/server": "catalog:m5kdev",
|
|
30
|
-
"better-auth": "catalog:m5kdev",
|
|
31
|
-
"dotenv": "catalog:m5kdev",
|
|
32
|
-
"drizzle-orm": "catalog:m5kdev",
|
|
33
|
-
"drizzle-zod": "catalog:m5kdev",
|
|
34
|
-
"express": "catalog:m5kdev",
|
|
35
|
-
"ioredis": "catalog:m5kdev",
|
|
36
|
-
"neverthrow": "catalog:m5kdev",
|
|
37
|
-
"react": "catalog:m5kdev",
|
|
38
|
-
"react-dom": "catalog:m5kdev",
|
|
39
|
-
"uuid": "catalog:m5kdev",
|
|
40
|
-
"zod": "catalog:m5kdev"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@m5kdev/config": "catalog:m5kdev",
|
|
44
|
-
"@types/express": "catalog:m5kdev",
|
|
45
|
-
"@types/node": "catalog:m5kdev",
|
|
46
|
-
"@types/react": "catalog:m5kdev",
|
|
47
|
-
"@types/react-dom": "catalog:m5kdev",
|
|
48
|
-
"drizzle-kit": "catalog:m5kdev",
|
|
49
|
-
"tslib": "catalog:m5kdev",
|
|
50
|
-
"tsup": "catalog:m5kdev",
|
|
51
|
-
"tsx": "catalog:m5kdev",
|
|
52
|
-
"typescript": "catalog:m5kdev"
|
|
53
|
-
},
|
|
54
|
-
"exports": {
|
|
55
|
-
"./types": "./src/types.ts"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "{{PACKAGE_SCOPE}}/server",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "tsx watch --env-file=../shared/.env src/index.ts",
|
|
8
|
+
"build": "tsup",
|
|
9
|
+
"start": "node dist/index.js",
|
|
10
|
+
"lint": "biome check .",
|
|
11
|
+
"lint:fix": "biome check . --write",
|
|
12
|
+
"check-types": "tsc --noEmit",
|
|
13
|
+
"drizzle:generate": "drizzle-kit generate",
|
|
14
|
+
"drizzle:migrate": "drizzle-kit migrate",
|
|
15
|
+
"drizzle:studio": "drizzle-kit studio",
|
|
16
|
+
"drizzle:sync": "tsx --env-file=../shared/.env db.ts sync",
|
|
17
|
+
"drizzle:seed": "tsx --env-file=../shared/.env db.ts seed",
|
|
18
|
+
"drizzle:reset": "tsx --env-file=../shared/.env db.ts reset"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"{{PACKAGE_SCOPE}}/email": "workspace:*",
|
|
22
|
+
"{{PACKAGE_SCOPE}}/shared": "workspace:*",
|
|
23
|
+
"@libsql/client": "catalog:m5kdev",
|
|
24
|
+
"@m5kdev/backend": "catalog:m5kdev",
|
|
25
|
+
"@m5kdev/commons": "catalog:m5kdev",
|
|
26
|
+
"@mastra/core": "catalog:m5kdev",
|
|
27
|
+
"@openrouter/ai-sdk-provider": "catalog:m5kdev",
|
|
28
|
+
"@opentelemetry/api": "catalog:m5kdev",
|
|
29
|
+
"@trpc/server": "catalog:m5kdev",
|
|
30
|
+
"better-auth": "catalog:m5kdev",
|
|
31
|
+
"dotenv": "catalog:m5kdev",
|
|
32
|
+
"drizzle-orm": "catalog:m5kdev",
|
|
33
|
+
"drizzle-zod": "catalog:m5kdev",
|
|
34
|
+
"express": "catalog:m5kdev",
|
|
35
|
+
"ioredis": "catalog:m5kdev",
|
|
36
|
+
"neverthrow": "catalog:m5kdev",
|
|
37
|
+
"react": "catalog:m5kdev",
|
|
38
|
+
"react-dom": "catalog:m5kdev",
|
|
39
|
+
"uuid": "catalog:m5kdev",
|
|
40
|
+
"zod": "catalog:m5kdev"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@m5kdev/config": "catalog:m5kdev",
|
|
44
|
+
"@types/express": "catalog:m5kdev",
|
|
45
|
+
"@types/node": "catalog:m5kdev",
|
|
46
|
+
"@types/react": "catalog:m5kdev",
|
|
47
|
+
"@types/react-dom": "catalog:m5kdev",
|
|
48
|
+
"drizzle-kit": "catalog:m5kdev",
|
|
49
|
+
"tslib": "catalog:m5kdev",
|
|
50
|
+
"tsup": "catalog:m5kdev",
|
|
51
|
+
"tsx": "catalog:m5kdev",
|
|
52
|
+
"typescript": "catalog:m5kdev"
|
|
53
|
+
},
|
|
54
|
+
"exports": {
|
|
55
|
+
"./types": "./src/types.ts"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{PACKAGE_SCOPE}}/shared",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"build": "tsc --noEmit",
|
|
7
|
-
"lint": "biome check .",
|
|
8
|
-
"lint:fix": "biome check . --write",
|
|
9
|
-
"check-types": "tsc --noEmit"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@m5kdev/commons": "catalog:m5kdev",
|
|
13
|
-
"zod": "catalog:m5kdev"
|
|
14
|
-
},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"@m5kdev/config": "catalog:m5kdev",
|
|
17
|
-
"tslib": "catalog:m5kdev",
|
|
18
|
-
"typescript": "catalog:m5kdev"
|
|
19
|
-
},
|
|
20
|
-
"exports": {
|
|
21
|
-
"./modules/app/*": "./src/modules/app/*.ts",
|
|
22
|
-
"./modules/conversation/*": "./src/modules/conversation/*.ts",
|
|
23
|
-
"./modules/demo-workflow/*": "./src/modules/demo-workflow/*.ts",
|
|
24
|
-
"./modules/notification/*": "./src/modules/notification/*.ts",
|
|
25
|
-
"./modules/posts/*": "./src/modules/posts/*.ts"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "{{PACKAGE_SCOPE}}/shared",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "tsc --noEmit",
|
|
7
|
+
"lint": "biome check .",
|
|
8
|
+
"lint:fix": "biome check . --write",
|
|
9
|
+
"check-types": "tsc --noEmit"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@m5kdev/commons": "catalog:m5kdev",
|
|
13
|
+
"zod": "catalog:m5kdev"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@m5kdev/config": "catalog:m5kdev",
|
|
17
|
+
"tslib": "catalog:m5kdev",
|
|
18
|
+
"typescript": "catalog:m5kdev"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
"./modules/app/*": "./src/modules/app/*.ts",
|
|
22
|
+
"./modules/conversation/*": "./src/modules/conversation/*.ts",
|
|
23
|
+
"./modules/demo-workflow/*": "./src/modules/demo-workflow/*.ts",
|
|
24
|
+
"./modules/notification/*": "./src/modules/notification/*.ts",
|
|
25
|
+
"./modules/posts/*": "./src/modules/posts/*.ts"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
# AGENTS.md
|
|
2
|
-
|
|
3
|
-
## Frontend Stack
|
|
4
|
-
|
|
5
|
-
- React 19 + TypeScript
|
|
6
|
-
- React Router v7
|
|
7
|
-
- HeroUI v3
|
|
8
|
-
- Tailwind CSS v4
|
|
9
|
-
- `nuqs` for URL state
|
|
10
|
-
- TanStack Query + tRPC
|
|
11
|
-
- i18next for all user-facing copy
|
|
12
|
-
|
|
13
|
-
## Conventions
|
|
14
|
-
|
|
15
|
-
- Keep providers centralized in `src/Providers.tsx`.
|
|
16
|
-
- Keep routing in `src/Router.tsx`.
|
|
17
|
-
- Keep feature code grouped under `src/modules/<feature>/` with `components/` and `hooks/` subfolders.
|
|
18
|
-
- Prefer HeroUI primitives and existing framework utilities before adding custom abstractions.
|
|
19
|
-
- Components stay display-focused: queries, mutations, URL state, and effects live in custom hooks (`hooks/use<Feature>Route.ts` composed from smaller hooks); ephemeral UI state (modal open, selected row) may stay in the component. Reusable tRPC actions (delete, publish) get their own hook.
|
|
20
|
-
- Derive values during render instead of syncing state with `useEffect`.
|
|
21
|
-
- Forms are uncontrolled: HeroUI `Form` + `TextField` with native HTML validation and `FieldError`, values read from `FormData` on submit. No form libraries. Extra checks that HTML validation cannot express happen in the submit handler.
|
|
22
|
-
- Fetch through `useTRPC()` + `queryOptions`/`mutationOptions` only; invalidate with `queryFilter()` after mutations.
|
|
23
|
-
- Use `useTranslation` for local app copy and rely on the bundled `web-ui` translations for auth routes.
|
|
24
|
-
- The `posts` module is the reference implementation; detailed guides live in `.cursor/rules/frontend-*.mdc`.
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
## Frontend Stack
|
|
4
|
+
|
|
5
|
+
- React 19 + TypeScript
|
|
6
|
+
- React Router v7
|
|
7
|
+
- HeroUI v3
|
|
8
|
+
- Tailwind CSS v4
|
|
9
|
+
- `nuqs` for URL state
|
|
10
|
+
- TanStack Query + tRPC
|
|
11
|
+
- i18next for all user-facing copy
|
|
12
|
+
|
|
13
|
+
## Conventions
|
|
14
|
+
|
|
15
|
+
- Keep providers centralized in `src/Providers.tsx`.
|
|
16
|
+
- Keep routing in `src/Router.tsx`.
|
|
17
|
+
- Keep feature code grouped under `src/modules/<feature>/` with `components/` and `hooks/` subfolders.
|
|
18
|
+
- Prefer HeroUI primitives and existing framework utilities before adding custom abstractions.
|
|
19
|
+
- Components stay display-focused: queries, mutations, URL state, and effects live in custom hooks (`hooks/use<Feature>Route.ts` composed from smaller hooks); ephemeral UI state (modal open, selected row) may stay in the component. Reusable tRPC actions (delete, publish) get their own hook.
|
|
20
|
+
- Derive values during render instead of syncing state with `useEffect`.
|
|
21
|
+
- Forms are uncontrolled: HeroUI `Form` + `TextField` with native HTML validation and `FieldError`, values read from `FormData` on submit. No form libraries. Extra checks that HTML validation cannot express happen in the submit handler.
|
|
22
|
+
- Fetch through `useTRPC()` + `queryOptions`/`mutationOptions` only; invalidate with `queryFilter()` after mutations.
|
|
23
|
+
- Use `useTranslation` for local app copy and rely on the bundled `web-ui` translations for auth routes.
|
|
24
|
+
- The `posts` module is the reference implementation; detailed guides live in `.cursor/rules/frontend-*.mdc`.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta
|
|
6
|
-
name="viewport"
|
|
7
|
-
content="width=device-width, initial-scale=1.0"
|
|
8
|
-
/>
|
|
9
|
-
<meta
|
|
10
|
-
name="description"
|
|
11
|
-
content="The m5kdev starter application."
|
|
12
|
-
/>
|
|
13
|
-
<title>{{APP_NAME}}</title>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<div id="root"></div>
|
|
17
|
-
<script
|
|
18
|
-
type="module"
|
|
19
|
-
src="/src/main.tsx"
|
|
20
|
-
></script>
|
|
21
|
-
</body>
|
|
22
|
-
</html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta
|
|
6
|
+
name="viewport"
|
|
7
|
+
content="width=device-width, initial-scale=1.0"
|
|
8
|
+
/>
|
|
9
|
+
<meta
|
|
10
|
+
name="description"
|
|
11
|
+
content="The m5kdev starter application."
|
|
12
|
+
/>
|
|
13
|
+
<title>{{APP_NAME}}</title>
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<div id="root"></div>
|
|
17
|
+
<script
|
|
18
|
+
type="module"
|
|
19
|
+
src="/src/main.tsx"
|
|
20
|
+
></script>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{PACKAGE_SCOPE}}/webapp",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
8
|
-
"build": "vite build",
|
|
9
|
-
"lint": "biome check .",
|
|
10
|
-
"lint:fix": "biome check . --write",
|
|
11
|
-
"check-types": "tsc --noEmit",
|
|
12
|
-
"preview": "vite preview"
|
|
13
|
-
},
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"{{PACKAGE_SCOPE}}/shared": "workspace:*",
|
|
16
|
-
"@heroui/react": "catalog:m5kdev",
|
|
17
|
-
"@heroui/styles": "catalog:m5kdev",
|
|
18
|
-
"@m5kdev/commons": "catalog:m5kdev",
|
|
19
|
-
"@m5kdev/frontend": "catalog:m5kdev",
|
|
20
|
-
"@m5kdev/web-ui": "catalog:m5kdev",
|
|
21
|
-
"@tanstack/react-query": "catalog:m5kdev",
|
|
22
|
-
"@trpc/client": "catalog:m5kdev",
|
|
23
|
-
"@trpc/tanstack-react-query": "catalog:m5kdev",
|
|
24
|
-
"better-auth": "catalog:m5kdev",
|
|
25
|
-
"i18next": "catalog:m5kdev",
|
|
26
|
-
"lucide-react": "catalog:m5kdev",
|
|
27
|
-
"nuqs": "catalog:m5kdev",
|
|
28
|
-
"posthog-js": "catalog:m5kdev",
|
|
29
|
-
"react": "catalog:m5kdev",
|
|
30
|
-
"react-dom": "catalog:m5kdev",
|
|
31
|
-
"react-hook-form": "catalog:m5kdev",
|
|
32
|
-
"react-i18next": "catalog:m5kdev",
|
|
33
|
-
"react-router": "catalog:m5kdev",
|
|
34
|
-
"sonner": "catalog:m5kdev",
|
|
35
|
-
"tailwindcss": "catalog:m5kdev",
|
|
36
|
-
"tw-animate-css": "catalog:m5kdev",
|
|
37
|
-
"zod": "catalog:m5kdev"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"{{PACKAGE_SCOPE}}/server": "workspace:*",
|
|
41
|
-
"@m5kdev/config": "catalog:m5kdev",
|
|
42
|
-
"@tailwindcss/vite": "catalog:m5kdev",
|
|
43
|
-
"@types/react": "catalog:m5kdev",
|
|
44
|
-
"@types/react-dom": "catalog:m5kdev",
|
|
45
|
-
"@vitejs/plugin-react": "catalog:m5kdev",
|
|
46
|
-
"babel-plugin-react-compiler": "catalog:m5kdev",
|
|
47
|
-
"typescript": "catalog:m5kdev",
|
|
48
|
-
"vite": "catalog:m5kdev",
|
|
49
|
-
"vite-plugin-i18next-loader": "catalog:m5kdev",
|
|
50
|
-
"vite-tsconfig-paths": "catalog:m5kdev",
|
|
51
|
-
"@trpc/server": "catalog:m5kdev"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "{{PACKAGE_SCOPE}}/webapp",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"lint": "biome check .",
|
|
10
|
+
"lint:fix": "biome check . --write",
|
|
11
|
+
"check-types": "tsc --noEmit",
|
|
12
|
+
"preview": "vite preview"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"{{PACKAGE_SCOPE}}/shared": "workspace:*",
|
|
16
|
+
"@heroui/react": "catalog:m5kdev",
|
|
17
|
+
"@heroui/styles": "catalog:m5kdev",
|
|
18
|
+
"@m5kdev/commons": "catalog:m5kdev",
|
|
19
|
+
"@m5kdev/frontend": "catalog:m5kdev",
|
|
20
|
+
"@m5kdev/web-ui": "catalog:m5kdev",
|
|
21
|
+
"@tanstack/react-query": "catalog:m5kdev",
|
|
22
|
+
"@trpc/client": "catalog:m5kdev",
|
|
23
|
+
"@trpc/tanstack-react-query": "catalog:m5kdev",
|
|
24
|
+
"better-auth": "catalog:m5kdev",
|
|
25
|
+
"i18next": "catalog:m5kdev",
|
|
26
|
+
"lucide-react": "catalog:m5kdev",
|
|
27
|
+
"nuqs": "catalog:m5kdev",
|
|
28
|
+
"posthog-js": "catalog:m5kdev",
|
|
29
|
+
"react": "catalog:m5kdev",
|
|
30
|
+
"react-dom": "catalog:m5kdev",
|
|
31
|
+
"react-hook-form": "catalog:m5kdev",
|
|
32
|
+
"react-i18next": "catalog:m5kdev",
|
|
33
|
+
"react-router": "catalog:m5kdev",
|
|
34
|
+
"sonner": "catalog:m5kdev",
|
|
35
|
+
"tailwindcss": "catalog:m5kdev",
|
|
36
|
+
"tw-animate-css": "catalog:m5kdev",
|
|
37
|
+
"zod": "catalog:m5kdev"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"{{PACKAGE_SCOPE}}/server": "workspace:*",
|
|
41
|
+
"@m5kdev/config": "catalog:m5kdev",
|
|
42
|
+
"@tailwindcss/vite": "catalog:m5kdev",
|
|
43
|
+
"@types/react": "catalog:m5kdev",
|
|
44
|
+
"@types/react-dom": "catalog:m5kdev",
|
|
45
|
+
"@vitejs/plugin-react": "catalog:m5kdev",
|
|
46
|
+
"babel-plugin-react-compiler": "catalog:m5kdev",
|
|
47
|
+
"typescript": "catalog:m5kdev",
|
|
48
|
+
"vite": "catalog:m5kdev",
|
|
49
|
+
"vite-plugin-i18next-loader": "catalog:m5kdev",
|
|
50
|
+
"vite-tsconfig-paths": "catalog:m5kdev",
|
|
51
|
+
"@trpc/server": "catalog:m5kdev"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="App logo">
|
|
2
|
-
<rect x="4" y="4" width="56" height="56" rx="14" fill="#b45309"/>
|
|
3
|
-
<path d="M20 18h18a6 6 0 0 1 6 6v22a2 2 0 0 1-3.2 1.6L36 44H20a4 4 0 0 1-4-4V22a4 4 0 0 1 4-4z" fill="#fffbeb"/>
|
|
4
|
-
<line x1="23" y1="27" x2="39" y2="27" stroke="#b45309" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
-
<line x1="23" y1="34" x2="39" y2="34" stroke="#d97706" stroke-width="3" stroke-linecap="round"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="App logo">
|
|
2
|
+
<rect x="4" y="4" width="56" height="56" rx="14" fill="#b45309"/>
|
|
3
|
+
<path d="M20 18h18a6 6 0 0 1 6 6v22a2 2 0 0 1-3.2 1.6L36 44H20a4 4 0 0 1-4-4V22a4 4 0 0 1 4-4z" fill="#fffbeb"/>
|
|
4
|
+
<line x1="23" y1="27" x2="39" y2="27" stroke="#b45309" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
+
<line x1="23" y1="34" x2="39" y2="34" stroke="#d97706" stroke-width="3" stroke-linecap="round"/>
|
|
6
|
+
</svg>
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Domain Docs
|
|
2
|
+
|
|
3
|
+
How the engineering skills should consume this repo's domain documentation when exploring the codebase.
|
|
4
|
+
|
|
5
|
+
## Before exploring, read these
|
|
6
|
+
|
|
7
|
+
- **`GLOSSARY.md`** at the repo root, or
|
|
8
|
+
- **`GLOSSARY-MAP.md`** at the repo root if it exists — it points at one `GLOSSARY.md` per context. Read each one relevant to the topic.
|
|
9
|
+
- **`docs/adr/`** — read ADRs that touch the area you're about to work in
|
|
10
|
+
|
|
11
|
+
If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The `/domain-modeling` skill (reached via `/grill-with-docs` and `/improve-codebase-architecture`) creates them lazily when terms or decisions actually get resolved.
|
|
12
|
+
|
|
13
|
+
## File structure
|
|
14
|
+
|
|
15
|
+
Single-context repo:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/
|
|
19
|
+
├── GLOSSARY.md
|
|
20
|
+
├── docs/
|
|
21
|
+
│ ├── agents/
|
|
22
|
+
│ └── adr/
|
|
23
|
+
│ ├── 0001-….md
|
|
24
|
+
│ └── 0002-….md
|
|
25
|
+
└── apps/
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Use the glossary's vocabulary
|
|
29
|
+
|
|
30
|
+
When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `GLOSSARY.md`. Don't drift to synonyms the glossary explicitly avoids.
|
|
31
|
+
|
|
32
|
+
If the concept you need isn't in the glossary yet, that's a signal — either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/domain-modeling`).
|
|
33
|
+
|
|
34
|
+
## Flag ADR conflicts
|
|
35
|
+
|
|
36
|
+
If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
|
|
37
|
+
|
|
38
|
+
> _Contradicts ADR-0007 (…) — but worth reopening because…_
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Issue tracker: GitHub
|
|
2
|
+
|
|
3
|
+
Issues and specs for this repo live as GitHub issues. Use the `gh` CLI for all operations.
|
|
4
|
+
|
|
5
|
+
## Conventions
|
|
6
|
+
|
|
7
|
+
- **Create an issue**: `gh issue create --title "..." --body "..."`. Use a heredoc for multi-line bodies.
|
|
8
|
+
- **Read an issue**: `gh issue view <number> --comments`, filtering comments by `jq` and also fetching labels.
|
|
9
|
+
- **List issues**: `gh issue list --state open --json number,title,body,labels,comments --jq '[.[] | {number, title, body, labels: [.labels[].name], comments: [.comments[].body]}]'` with appropriate `--label` and `--state` filters.
|
|
10
|
+
- **Comment on an issue**: `gh issue comment <number> --body "..."`
|
|
11
|
+
- **Apply / remove labels**: `gh issue edit <number> --add-label "..."` / `--remove-label "..."`
|
|
12
|
+
- **Close**: `gh issue close <number> --comment "..."`
|
|
13
|
+
|
|
14
|
+
Infer the repo from `git remote -v` — `gh` does this automatically when run inside a clone.
|
|
15
|
+
|
|
16
|
+
## Pull requests as a triage surface
|
|
17
|
+
|
|
18
|
+
**PRs as a request surface: no.** _(Set to `yes` if this repo treats external PRs as feature requests; `/triage` reads this flag.)_
|
|
19
|
+
|
|
20
|
+
When set to `yes`, PRs run through the same labels and states as issues, using the `gh pr` equivalents:
|
|
21
|
+
|
|
22
|
+
- **Read a PR**: `gh pr view <number> --comments` and `gh pr diff <number>` for the diff.
|
|
23
|
+
- **List external PRs for triage**: `gh pr list --state open --json number,title,body,labels,author,authorAssociation,comments` then keep only `authorAssociation` of `CONTRIBUTOR`, `FIRST_TIME_CONTRIBUTOR`, or `NONE` (drop `OWNER`/`MEMBER`/`COLLABORATOR`).
|
|
24
|
+
- **Comment / label / close**: `gh pr comment`, `gh pr edit --add-label`/`--remove-label`, `gh pr close`.
|
|
25
|
+
|
|
26
|
+
GitHub shares one number space across issues and PRs, so a bare `#42` may be either — resolve with `gh pr view 42` and fall back to `gh issue view 42`.
|
|
27
|
+
|
|
28
|
+
## When a skill says "publish to the issue tracker"
|
|
29
|
+
|
|
30
|
+
Create a GitHub issue.
|
|
31
|
+
|
|
32
|
+
## When a skill says "fetch the relevant ticket"
|
|
33
|
+
|
|
34
|
+
Run `gh issue view <number> --comments`.
|
|
35
|
+
|
|
36
|
+
## Wayfinding operations
|
|
37
|
+
|
|
38
|
+
Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets.
|
|
39
|
+
|
|
40
|
+
- **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body. `gh issue create --label wayfinder:map`.
|
|
41
|
+
- **Child ticket**: an issue linked to the map as a GitHub sub-issue (`gh api` on the sub-issues endpoint). Where sub-issues aren't enabled, add the child to a task list in the map body and put `Part of #<map>` at the top of the child body. Labels: `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev.
|
|
42
|
+
- **Blocking**: GitHub's **native issue dependencies** — the canonical, UI-visible representation. Add an edge with `gh api --method POST repos/<owner>/<repo>/issues/<child>/dependencies/blocked_by -F issue_id=<blocker-db-id>`, where `<blocker-db-id>` is the blocker's numeric **database id** (`gh api repos/<owner>/<repo>/issues/<n> --jq .id`, _not_ the `#number` or `node_id`). GitHub reports `issue_dependencies_summary.blocked_by` (open blockers only — the live gate). Where dependencies aren't available, fall back to a `Blocked by: #<n>, #<n>` line at the top of the child body. A ticket is unblocked when every blocker is closed.
|
|
43
|
+
- **Frontier query**: list the map's open children (`gh issue list --state open`, scoped to the map's sub-issues / task list), drop any with an open blocker (`issue_dependencies_summary.blocked_by > 0`, or an open issue in the `Blocked by` line) or an assignee; first in map order wins.
|
|
44
|
+
- **Claim**: `gh issue edit <n> --add-assignee @me` — the session's first write.
|
|
45
|
+
- **Resolve**: `gh issue comment <n> --body "<answer>"`, then `gh issue close <n>`, then append a context pointer (gist + link) to the map's Decisions-so-far.
|