@yosr-ai/template-next-fullstack 0.0.0-stage → 0.1.0-alpha.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/CHANGELOG.md +7 -0
- package/README.md +15 -2
- package/features/api-trpc/files/src/app/api/trpc/[trpc]/route.ts +15 -0
- package/features/api-trpc/files/src/app/trpc-provider.tsx +27 -0
- package/features/api-trpc/files/src/features/notes/components/note-form.tsx +48 -0
- package/features/api-trpc/files/src/server/api/context.ts +10 -0
- package/features/api-trpc/files/src/server/api/notes.test.ts +30 -0
- package/features/api-trpc/files/src/server/api/notes.ts +42 -0
- package/features/api-trpc/files/src/server/api/root.ts +8 -0
- package/features/api-trpc/files/src/server/api/trpc.ts +8 -0
- package/features/api-trpc/snippets/providers-imports.tsx +2 -0
- package/features/api-trpc/snippets/providers.tsx +1 -0
- package/features/auth-authjs/files/e2e/sign-in.spec.ts +10 -0
- package/features/auth-authjs/files/src/app/api/auth/[...nextauth]/route.ts +12 -0
- package/features/auth-authjs/files/src/app/auth-session-provider.tsx +8 -0
- package/features/auth-authjs/files/src/app/sign-in/page.tsx +19 -0
- package/features/auth-authjs/files/src/server/auth/config.ts +28 -0
- package/features/auth-authjs/files/src/server/auth/index.ts +15 -0
- package/features/auth-authjs/snippets/providers-imports.tsx +2 -0
- package/features/auth-authjs/snippets/providers.tsx +1 -0
- package/features/auth-authjs-drizzle/files/src/server/db/auth-tables.ts +86 -0
- package/features/auth-authjs-drizzle/snippets/adapter-db-imports.ts +8 -0
- package/features/auth-authjs-drizzle/snippets/adapter-imports.ts +1 -0
- package/features/auth-authjs-drizzle/snippets/adapter.ts +7 -0
- package/features/auth-authjs-drizzle/snippets/auth-tables.ts +7 -0
- package/features/auth-authjs-prisma/snippets/adapter-db-imports.ts +1 -0
- package/features/auth-authjs-prisma/snippets/adapter-imports.ts +1 -0
- package/features/auth-authjs-prisma/snippets/adapter.ts +1 -0
- package/features/auth-authjs-prisma/snippets/auth-models.prisma +58 -0
- package/features/auth-clerk/files/e2e/sign-in.spec.ts +15 -0
- package/features/auth-clerk/files/src/app/clerk-app-provider.tsx +13 -0
- package/features/auth-clerk/files/src/app/sign-in/[[...sign-in]]/page.tsx +18 -0
- package/features/auth-clerk/files/src/app/sign-up/[[...sign-up]]/page.tsx +18 -0
- package/features/auth-clerk/files/src/proxy.ts +24 -0
- package/features/auth-clerk/files/src/server/auth/index.ts +11 -0
- package/features/auth-clerk/snippets/providers-imports.tsx +2 -0
- package/features/auth-clerk/snippets/providers.tsx +1 -0
- package/features/deploy-docker/files/.dockerignore +6 -0
- package/features/deploy-docker/files/Dockerfile +24 -0
- package/features/deploy-docker/files/compose.yaml +6 -0
- package/features/deploy-docker-npm/files/Dockerfile +24 -0
- package/features/deploy-docker-postgres/snippets/postgres-service.yaml +4 -0
- package/features/deploy-vercel/snippets/readme-deploy.md +3 -0
- package/features/orm-drizzle/files/drizzle.config.ts +8 -0
- package/features/orm-drizzle/files/src/features/notes/notes-store.ts +21 -0
- package/features/orm-drizzle/files/src/server/db/index.ts +20 -0
- package/features/orm-drizzle/files/src/server/db/schema.ts +11 -0
- package/features/orm-drizzle/snippets/ci-e2e-setup.yaml +1 -0
- package/features/orm-drizzle/snippets/ci-job.yaml +11 -0
- package/features/orm-drizzle/snippets/readme-db.md +4 -0
- package/features/orm-prisma/files/prisma/schema.prisma +18 -0
- package/features/orm-prisma/files/prisma.config.ts +13 -0
- package/features/orm-prisma/files/src/features/notes/notes-store.ts +13 -0
- package/features/orm-prisma/files/src/server/db/index.ts +20 -0
- package/features/orm-prisma/snippets/ci-e2e-setup.yaml +1 -0
- package/features/orm-prisma/snippets/ci-job.yaml +11 -0
- package/features/orm-prisma/snippets/readme-db.md +4 -0
- package/features/payments-stripe/files/src/app/api/checkout/route.ts +27 -0
- package/features/payments-stripe/files/src/app/api/webhooks/stripe/route.ts +18 -0
- package/features/payments-stripe/files/src/server/billing/billing.test.ts +113 -0
- package/features/payments-stripe/files/src/server/billing/index.ts +102 -0
- package/features/payments-stripe/files/src/server/billing/stripe.ts +10 -0
- package/features/payments-stripe-drizzle/files/src/server/billing/store.ts +39 -0
- package/features/payments-stripe-drizzle/snippets/billing-tables.ts +13 -0
- package/features/payments-stripe-prisma/files/src/server/billing/store.ts +30 -0
- package/features/payments-stripe-prisma/snippets/billing-models.prisma +17 -0
- package/files/.env.example +1 -0
- package/files/.github/workflows/ci.yml +25 -0
- package/files/.prettierignore +7 -0
- package/files/.prettierrc.json +1 -0
- package/files/README.md +18 -0
- package/files/components.json +20 -0
- package/files/e2e/smoke.spec.ts +16 -0
- package/files/eslint.config.mjs +21 -0
- package/files/gitignore +25 -0
- package/files/next.config.ts +7 -0
- package/files/package.json +42 -0
- package/files/playwright.config.ts +20 -0
- package/files/pnpm-workspace.yaml +16 -0
- package/files/postcss.config.mjs +7 -0
- package/files/src/app/globals.css +68 -0
- package/files/src/app/layout.tsx +22 -0
- package/files/src/app/page.tsx +21 -0
- package/files/src/app/providers.tsx +15 -0
- package/files/src/components/ui/button.tsx +59 -0
- package/files/src/components/ui/input.tsx +21 -0
- package/files/src/features/notes/actions.ts +22 -0
- package/files/src/features/notes/components/note-form.tsx +32 -0
- package/files/src/features/notes/components/note-list.tsx +23 -0
- package/files/src/features/notes/create-note.test.ts +27 -0
- package/files/src/features/notes/create-note.ts +23 -0
- package/files/src/features/notes/note-schema.ts +13 -0
- package/files/src/features/notes/notes-store.ts +17 -0
- package/files/src/shared/utils.test.ts +13 -0
- package/files/src/shared/utils.ts +6 -0
- package/files/tsconfig.json +35 -0
- package/files/vitest.config.mts +9 -0
- package/package.json +26 -4
- package/rules/api-server-actions.md +1 -0
- package/rules/api-trpc.md +1 -0
- package/rules/architecture.md +11 -0
- package/rules/auth-authjs.md +1 -0
- package/rules/auth-clerk.md +1 -0
- package/rules/commands.md +5 -0
- package/rules/data-drizzle.md +1 -0
- package/rules/data-none.md +1 -0
- package/rules/data-prisma.md +1 -0
- package/rules/data-server-first.md +1 -0
- package/rules/errors-result.md +1 -0
- package/rules/errors-throw.md +1 -0
- package/rules/forms-zod.md +1 -0
- package/rules/layout-feature.md +5 -0
- package/rules/layout-flat.md +5 -0
- package/rules/layout-layer.md +6 -0
- package/rules/payments-stripe.md +1 -0
- package/rules/project-overview.md +5 -0
- package/rules/tests-colocated.md +1 -0
- package/rules/tests-folder.md +1 -0
- package/rules/tests-separate.md +1 -0
- package/rules/ui-shadcn.md +1 -0
- package/seed.template.json +1714 -0
- package/style/errors-result/files/src/features/notes/actions.ts +18 -0
- package/style/errors-result/files/src/features/notes/create-note.test.ts +30 -0
- package/style/errors-result/files/src/features/notes/create-note.ts +16 -0
- package/style/errors-result/files/src/shared/result.ts +12 -0
|
@@ -0,0 +1,1714 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../../docs/engineering/schemas/seed.template.schema.json",
|
|
3
|
+
"schemaVersion": "0.1",
|
|
4
|
+
"name": "next-fullstack",
|
|
5
|
+
"version": "0.1.0-alpha.0",
|
|
6
|
+
"title": "Next.js full-stack (TypeScript)",
|
|
7
|
+
"description": "Prototype of Yosr Seed's first base template (Next.js + TypeScript, Tailwind + shadcn/ui, Vitest + Playwright smoke test). Implemented: base files with the ADR 0006 defaults, the orm-drizzle and orm-prisma overlays (database=postgres), database=none (base without either overlay), deploy=docker (standalone image, compose Postgres only when database=postgres), Auth.js, Clerk, tRPC, Stripe, and a recorded AI delta for domain-features. x-prototype.stubbedFeatures is empty. Dependency versions pinned from the npm registry on 2026-10-19 (Prisma adapter on 2026-10-28, Clerk on 2026-10-28, tRPC on 2026-10-29, Stripe on 2026-10-29).",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"authors": [
|
|
10
|
+
"Yosr Seed"
|
|
11
|
+
],
|
|
12
|
+
"keywords": [
|
|
13
|
+
"nextjs",
|
|
14
|
+
"typescript",
|
|
15
|
+
"tailwind",
|
|
16
|
+
"shadcn",
|
|
17
|
+
"postgres"
|
|
18
|
+
],
|
|
19
|
+
"engines": {
|
|
20
|
+
"yosr": ">=0.1.0 <0.2.0",
|
|
21
|
+
"node": "^22.13.0 || ^24.0.0 || >=26.0.0"
|
|
22
|
+
},
|
|
23
|
+
"stack": {
|
|
24
|
+
"framework": "nextjs",
|
|
25
|
+
"language": "typescript",
|
|
26
|
+
"includes": [
|
|
27
|
+
"tailwindcss",
|
|
28
|
+
"shadcn-ui",
|
|
29
|
+
"vitest",
|
|
30
|
+
"playwright"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"packageManagers": {
|
|
34
|
+
"default": "pnpm",
|
|
35
|
+
"supported": [
|
|
36
|
+
"pnpm",
|
|
37
|
+
"npm"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"variables": {
|
|
41
|
+
"authLabel": {
|
|
42
|
+
"fromOption": "auth",
|
|
43
|
+
"map": {
|
|
44
|
+
"none": "none",
|
|
45
|
+
"authjs": "Auth.js",
|
|
46
|
+
"clerk": "Clerk"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"ormLabel": {
|
|
50
|
+
"fromOption": "orm",
|
|
51
|
+
"map": {
|
|
52
|
+
"prisma": "Prisma",
|
|
53
|
+
"drizzle": "Drizzle"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"storageLabel": {
|
|
57
|
+
"fromOption": "database",
|
|
58
|
+
"map": {
|
|
59
|
+
"none": "memory only (no database)",
|
|
60
|
+
"postgres": "Postgres"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"options": [
|
|
65
|
+
{
|
|
66
|
+
"id": "projectName",
|
|
67
|
+
"type": "string",
|
|
68
|
+
"label": {
|
|
69
|
+
"cli": "Project name",
|
|
70
|
+
"wizard": "What should we call your project?"
|
|
71
|
+
},
|
|
72
|
+
"help": {
|
|
73
|
+
"cli": "Lowercase, digits and dashes.",
|
|
74
|
+
"wizard": "A short name with no spaces. You can change the display name later."
|
|
75
|
+
},
|
|
76
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
77
|
+
"maxLength": 64
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "database",
|
|
81
|
+
"type": "enum",
|
|
82
|
+
"label": {
|
|
83
|
+
"cli": "Database",
|
|
84
|
+
"wizard": "Does your app need to save data?"
|
|
85
|
+
},
|
|
86
|
+
"help": {
|
|
87
|
+
"cli": "Postgres, or none for a frontend/static-first app.",
|
|
88
|
+
"wizard": "Pick 'Yes' if the app stores things like users, posts or orders."
|
|
89
|
+
},
|
|
90
|
+
"default": "postgres",
|
|
91
|
+
"choices": [
|
|
92
|
+
{
|
|
93
|
+
"value": "none",
|
|
94
|
+
"label": {
|
|
95
|
+
"cli": "None",
|
|
96
|
+
"wizard": "No, it doesn't need to save data"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"value": "postgres",
|
|
101
|
+
"label": {
|
|
102
|
+
"cli": "Postgres",
|
|
103
|
+
"wizard": "Yes, save data in a Postgres database"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "orm",
|
|
110
|
+
"type": "enum",
|
|
111
|
+
"label": {
|
|
112
|
+
"cli": "Postgres ORM",
|
|
113
|
+
"wizard": "How should the app talk to its database?"
|
|
114
|
+
},
|
|
115
|
+
"help": {
|
|
116
|
+
"cli": "Only asked when database is Postgres.",
|
|
117
|
+
"wizard": "Both work well; Drizzle is the default."
|
|
118
|
+
},
|
|
119
|
+
"default": "drizzle",
|
|
120
|
+
"choices": [
|
|
121
|
+
{
|
|
122
|
+
"value": "drizzle",
|
|
123
|
+
"label": {
|
|
124
|
+
"cli": "Drizzle",
|
|
125
|
+
"wizard": "Drizzle (schema in TypeScript, lightweight)"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"value": "prisma",
|
|
130
|
+
"label": {
|
|
131
|
+
"cli": "Prisma",
|
|
132
|
+
"wizard": "Prisma (schema file, very popular)"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"when": {
|
|
137
|
+
"option": "database",
|
|
138
|
+
"equals": "postgres"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "auth",
|
|
143
|
+
"type": "enum",
|
|
144
|
+
"label": {
|
|
145
|
+
"cli": "Authentication",
|
|
146
|
+
"wizard": "Do people need to sign in?"
|
|
147
|
+
},
|
|
148
|
+
"default": "none",
|
|
149
|
+
"choices": [
|
|
150
|
+
{
|
|
151
|
+
"value": "none",
|
|
152
|
+
"label": {
|
|
153
|
+
"cli": "None",
|
|
154
|
+
"wizard": "No, anyone can use it"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"value": "authjs",
|
|
159
|
+
"label": {
|
|
160
|
+
"cli": "Auth.js",
|
|
161
|
+
"wizard": "Yes, and I want to host sign-in myself"
|
|
162
|
+
},
|
|
163
|
+
"help": {
|
|
164
|
+
"cli": "Self-hosted, database sessions via the chosen ORM. Requires database=postgres.",
|
|
165
|
+
"wizard": "Free and open source. Sign-in data lives in your own database, so it needs one."
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"value": "clerk",
|
|
170
|
+
"label": {
|
|
171
|
+
"cli": "Clerk",
|
|
172
|
+
"wizard": "Yes, using a hosted sign-in service"
|
|
173
|
+
},
|
|
174
|
+
"help": {
|
|
175
|
+
"cli": "Hosted auth; works with or without a database. Requires a Clerk account and keys.",
|
|
176
|
+
"wizard": "Clerk handles sign-in screens and accounts for you. Needs a Clerk account; works even without a database."
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"id": "api",
|
|
183
|
+
"type": "enum",
|
|
184
|
+
"label": {
|
|
185
|
+
"cli": "API style",
|
|
186
|
+
"wizard": "How should the front end call the back end?"
|
|
187
|
+
},
|
|
188
|
+
"default": "server-actions",
|
|
189
|
+
"choices": [
|
|
190
|
+
{
|
|
191
|
+
"value": "server-actions",
|
|
192
|
+
"label": {
|
|
193
|
+
"cli": "Server actions",
|
|
194
|
+
"wizard": "Built-in Next.js server actions (simplest)"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"value": "trpc",
|
|
199
|
+
"label": {
|
|
200
|
+
"cli": "tRPC",
|
|
201
|
+
"wizard": "tRPC (typed API layer, good for larger apps)"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"id": "payments",
|
|
208
|
+
"type": "boolean",
|
|
209
|
+
"label": {
|
|
210
|
+
"cli": "Add Stripe payments?",
|
|
211
|
+
"wizard": "Will you charge money in the app?"
|
|
212
|
+
},
|
|
213
|
+
"help": {
|
|
214
|
+
"cli": "Requires auth and database=postgres.",
|
|
215
|
+
"wizard": "Adds Stripe checkout. Needs sign-in and a database to remember who paid."
|
|
216
|
+
},
|
|
217
|
+
"default": false,
|
|
218
|
+
"when": {
|
|
219
|
+
"all": [
|
|
220
|
+
{
|
|
221
|
+
"not": {
|
|
222
|
+
"option": "auth",
|
|
223
|
+
"equals": "none"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"option": "database",
|
|
228
|
+
"equals": "postgres"
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"id": "deploy",
|
|
235
|
+
"type": "enum",
|
|
236
|
+
"label": {
|
|
237
|
+
"cli": "Deploy target",
|
|
238
|
+
"wizard": "Where will the app run?"
|
|
239
|
+
},
|
|
240
|
+
"default": "vercel",
|
|
241
|
+
"choices": [
|
|
242
|
+
{
|
|
243
|
+
"value": "vercel",
|
|
244
|
+
"label": {
|
|
245
|
+
"cli": "Vercel",
|
|
246
|
+
"wizard": "Vercel (easiest for Next.js)"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"value": "docker",
|
|
251
|
+
"label": {
|
|
252
|
+
"cli": "Docker",
|
|
253
|
+
"wizard": "Docker container (any server or cloud)"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
"constraints": [
|
|
260
|
+
{
|
|
261
|
+
"id": "orm-requires-database",
|
|
262
|
+
"if": {
|
|
263
|
+
"not": {
|
|
264
|
+
"option": "database",
|
|
265
|
+
"equals": "postgres"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"then": {
|
|
269
|
+
"not": {
|
|
270
|
+
"option": "orm",
|
|
271
|
+
"in": [
|
|
272
|
+
"drizzle",
|
|
273
|
+
"prisma"
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"message": {
|
|
278
|
+
"cli": "--orm only applies with --database postgres.",
|
|
279
|
+
"wizard": "Choosing how to talk to the database only matters if you have one."
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"id": "authjs-requires-database",
|
|
284
|
+
"if": {
|
|
285
|
+
"option": "auth",
|
|
286
|
+
"equals": "authjs"
|
|
287
|
+
},
|
|
288
|
+
"then": {
|
|
289
|
+
"option": "database",
|
|
290
|
+
"equals": "postgres"
|
|
291
|
+
},
|
|
292
|
+
"message": {
|
|
293
|
+
"cli": "--auth authjs requires --database postgres (database sessions). Use --auth clerk for auth without a database.",
|
|
294
|
+
"wizard": "Self-hosted sign-in needs a database. Turn on the database, or pick the hosted sign-in option."
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"id": "payments-require-auth",
|
|
299
|
+
"if": {
|
|
300
|
+
"option": "payments",
|
|
301
|
+
"equals": true
|
|
302
|
+
},
|
|
303
|
+
"then": {
|
|
304
|
+
"not": {
|
|
305
|
+
"option": "auth",
|
|
306
|
+
"equals": "none"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"message": {
|
|
310
|
+
"cli": "--payments requires --auth authjs or clerk.",
|
|
311
|
+
"wizard": "Payments need sign-in, so we can tell who paid."
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"id": "payments-require-database",
|
|
316
|
+
"if": {
|
|
317
|
+
"option": "payments",
|
|
318
|
+
"equals": true
|
|
319
|
+
},
|
|
320
|
+
"then": {
|
|
321
|
+
"option": "database",
|
|
322
|
+
"equals": "postgres"
|
|
323
|
+
},
|
|
324
|
+
"message": {
|
|
325
|
+
"cli": "--payments requires --database postgres.",
|
|
326
|
+
"wizard": "Payments need a database to remember customers and subscriptions."
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
],
|
|
330
|
+
"aliases": {
|
|
331
|
+
"@/*": "src/*",
|
|
332
|
+
"@domain/*": "src/features/*",
|
|
333
|
+
"@featureUi/*": "src/features/notes/components/*",
|
|
334
|
+
"@server/*": "src/server/*",
|
|
335
|
+
"@ui/*": "src/components/ui/*",
|
|
336
|
+
"@shared/*": "src/shared/*"
|
|
337
|
+
},
|
|
338
|
+
"features": [
|
|
339
|
+
{
|
|
340
|
+
"id": "package-manager-npm",
|
|
341
|
+
"description": "Drop pnpm-only files when the package manager is npm.",
|
|
342
|
+
"when": {
|
|
343
|
+
"option": "packageManager",
|
|
344
|
+
"equals": "npm"
|
|
345
|
+
},
|
|
346
|
+
"patches": [
|
|
347
|
+
{
|
|
348
|
+
"op": "delete",
|
|
349
|
+
"target": "pnpm-workspace.yaml"
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"id": "orm-drizzle",
|
|
355
|
+
"description": "Drizzle ORM, drizzle-kit config, TS schema and db helper.",
|
|
356
|
+
"when": {
|
|
357
|
+
"all": [
|
|
358
|
+
{
|
|
359
|
+
"option": "database",
|
|
360
|
+
"equals": "postgres"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"option": "orm",
|
|
364
|
+
"equals": "drizzle"
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
"dependencies": {
|
|
369
|
+
"drizzle-orm": "0.45.4",
|
|
370
|
+
"postgres": "3.4.9"
|
|
371
|
+
},
|
|
372
|
+
"devDependencies": {
|
|
373
|
+
"drizzle-kit": "0.31.11"
|
|
374
|
+
},
|
|
375
|
+
"scripts": {
|
|
376
|
+
"db:generate": "drizzle-kit generate",
|
|
377
|
+
"db:migrate": "drizzle-kit migrate",
|
|
378
|
+
"db:push": "drizzle-kit push --force"
|
|
379
|
+
},
|
|
380
|
+
"patches": [
|
|
381
|
+
{
|
|
382
|
+
"op": "env",
|
|
383
|
+
"target": ".env.example",
|
|
384
|
+
"vars": [
|
|
385
|
+
{
|
|
386
|
+
"name": "DATABASE_URL",
|
|
387
|
+
"example": "postgresql://postgres:postgres@localhost:5432/app",
|
|
388
|
+
"description": "Postgres connection string"
|
|
389
|
+
}
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"op": "insert",
|
|
394
|
+
"target": ".github/workflows/ci.yml",
|
|
395
|
+
"anchor": "ci-job",
|
|
396
|
+
"source": "features/orm-drizzle/snippets/ci-job.yaml"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"op": "insert",
|
|
400
|
+
"target": ".github/workflows/ci.yml",
|
|
401
|
+
"anchor": "ci-e2e-setup",
|
|
402
|
+
"source": "features/orm-drizzle/snippets/ci-e2e-setup.yaml"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"op": "insert",
|
|
406
|
+
"target": "README.md",
|
|
407
|
+
"anchor": "readme-sections",
|
|
408
|
+
"source": "features/orm-drizzle/snippets/readme-db.md"
|
|
409
|
+
}
|
|
410
|
+
],
|
|
411
|
+
"replaces": [
|
|
412
|
+
"src/features/notes/notes-store.ts"
|
|
413
|
+
]
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"id": "orm-prisma",
|
|
417
|
+
"description": "Prisma client, schema and db helper.",
|
|
418
|
+
"when": {
|
|
419
|
+
"all": [
|
|
420
|
+
{
|
|
421
|
+
"option": "database",
|
|
422
|
+
"equals": "postgres"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"option": "orm",
|
|
426
|
+
"equals": "prisma"
|
|
427
|
+
}
|
|
428
|
+
]
|
|
429
|
+
},
|
|
430
|
+
"dependencies": {
|
|
431
|
+
"@prisma/adapter-pg": "7.10.1",
|
|
432
|
+
"@prisma/client": "7.10.1"
|
|
433
|
+
},
|
|
434
|
+
"devDependencies": {
|
|
435
|
+
"prisma": "7.10.1"
|
|
436
|
+
},
|
|
437
|
+
"scripts": {
|
|
438
|
+
"postinstall": "prisma generate",
|
|
439
|
+
"db:generate": "prisma generate",
|
|
440
|
+
"db:migrate": "prisma migrate dev",
|
|
441
|
+
"db:push": "prisma db push --accept-data-loss"
|
|
442
|
+
},
|
|
443
|
+
"patches": [
|
|
444
|
+
{
|
|
445
|
+
"op": "env",
|
|
446
|
+
"target": ".env.example",
|
|
447
|
+
"vars": [
|
|
448
|
+
{
|
|
449
|
+
"name": "DATABASE_URL",
|
|
450
|
+
"example": "postgresql://postgres:postgres@localhost:5432/app",
|
|
451
|
+
"description": "Postgres connection string"
|
|
452
|
+
}
|
|
453
|
+
]
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"op": "insert",
|
|
457
|
+
"target": ".github/workflows/ci.yml",
|
|
458
|
+
"anchor": "ci-job",
|
|
459
|
+
"source": "features/orm-prisma/snippets/ci-job.yaml"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"op": "insert",
|
|
463
|
+
"target": ".github/workflows/ci.yml",
|
|
464
|
+
"anchor": "ci-e2e-setup",
|
|
465
|
+
"source": "features/orm-prisma/snippets/ci-e2e-setup.yaml"
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"op": "insert",
|
|
469
|
+
"target": "README.md",
|
|
470
|
+
"anchor": "readme-sections",
|
|
471
|
+
"source": "features/orm-prisma/snippets/readme-db.md"
|
|
472
|
+
}
|
|
473
|
+
],
|
|
474
|
+
"replaces": [
|
|
475
|
+
"src/features/notes/notes-store.ts"
|
|
476
|
+
]
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"id": "auth-authjs",
|
|
480
|
+
"description": "Auth.js with database sessions (adapter added by the ORM combination feature): route handler, session helper, sign-in page, provider wrapper. Only valid with database=postgres.",
|
|
481
|
+
"when": {
|
|
482
|
+
"option": "auth",
|
|
483
|
+
"equals": "authjs"
|
|
484
|
+
},
|
|
485
|
+
"after": [
|
|
486
|
+
"orm-prisma",
|
|
487
|
+
"orm-drizzle"
|
|
488
|
+
],
|
|
489
|
+
"dependencies": {
|
|
490
|
+
"next-auth": "4.24.15"
|
|
491
|
+
},
|
|
492
|
+
"patches": [
|
|
493
|
+
{
|
|
494
|
+
"op": "env",
|
|
495
|
+
"target": ".env.example",
|
|
496
|
+
"vars": [
|
|
497
|
+
{
|
|
498
|
+
"name": "AUTH_SECRET",
|
|
499
|
+
"description": "Random secret used to sign sessions"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"name": "GITHUB_ID",
|
|
503
|
+
"description": "GitHub OAuth client id"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"name": "GITHUB_SECRET",
|
|
507
|
+
"description": "GitHub OAuth client secret"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"name": "GOOGLE_CLIENT_ID",
|
|
511
|
+
"description": "Google OAuth client id"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"name": "GOOGLE_CLIENT_SECRET",
|
|
515
|
+
"description": "Google OAuth client secret"
|
|
516
|
+
}
|
|
517
|
+
]
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"op": "insert",
|
|
521
|
+
"target": "src/app/providers.tsx",
|
|
522
|
+
"anchor": "providers-imports",
|
|
523
|
+
"source": "features/auth-authjs/snippets/providers-imports.tsx"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"op": "insert",
|
|
527
|
+
"target": "src/app/providers.tsx",
|
|
528
|
+
"anchor": "providers",
|
|
529
|
+
"source": "features/auth-authjs/snippets/providers.tsx"
|
|
530
|
+
}
|
|
531
|
+
]
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"id": "auth-authjs-prisma",
|
|
535
|
+
"description": "Combination overlay: Auth.js adapter and auth models for Prisma.",
|
|
536
|
+
"when": {
|
|
537
|
+
"all": [
|
|
538
|
+
{
|
|
539
|
+
"option": "auth",
|
|
540
|
+
"equals": "authjs"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"all": [
|
|
544
|
+
{
|
|
545
|
+
"option": "database",
|
|
546
|
+
"equals": "postgres"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"option": "orm",
|
|
550
|
+
"equals": "prisma"
|
|
551
|
+
}
|
|
552
|
+
]
|
|
553
|
+
}
|
|
554
|
+
]
|
|
555
|
+
},
|
|
556
|
+
"after": [
|
|
557
|
+
"auth-authjs"
|
|
558
|
+
],
|
|
559
|
+
"dependencies": {
|
|
560
|
+
"@auth/prisma-adapter": "2.11.3"
|
|
561
|
+
},
|
|
562
|
+
"patches": [
|
|
563
|
+
{
|
|
564
|
+
"op": "insert",
|
|
565
|
+
"target": "prisma/schema.prisma",
|
|
566
|
+
"anchor": "models",
|
|
567
|
+
"source": "features/auth-authjs-prisma/snippets/auth-models.prisma"
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"op": "insert",
|
|
571
|
+
"target": "src/server/auth/config.ts",
|
|
572
|
+
"anchor": "adapter-imports",
|
|
573
|
+
"source": "features/auth-authjs-prisma/snippets/adapter-imports.ts"
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"op": "insert",
|
|
577
|
+
"target": "src/server/auth/config.ts",
|
|
578
|
+
"anchor": "adapter-db-imports",
|
|
579
|
+
"source": "features/auth-authjs-prisma/snippets/adapter-db-imports.ts"
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"op": "insert",
|
|
583
|
+
"target": "src/server/auth/config.ts",
|
|
584
|
+
"anchor": "adapter",
|
|
585
|
+
"source": "features/auth-authjs-prisma/snippets/adapter.ts"
|
|
586
|
+
}
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"id": "auth-authjs-drizzle",
|
|
591
|
+
"description": "Combination overlay: Auth.js adapter and auth tables for Drizzle.",
|
|
592
|
+
"when": {
|
|
593
|
+
"all": [
|
|
594
|
+
{
|
|
595
|
+
"option": "auth",
|
|
596
|
+
"equals": "authjs"
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
"all": [
|
|
600
|
+
{
|
|
601
|
+
"option": "database",
|
|
602
|
+
"equals": "postgres"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"option": "orm",
|
|
606
|
+
"equals": "drizzle"
|
|
607
|
+
}
|
|
608
|
+
]
|
|
609
|
+
}
|
|
610
|
+
]
|
|
611
|
+
},
|
|
612
|
+
"after": [
|
|
613
|
+
"auth-authjs"
|
|
614
|
+
],
|
|
615
|
+
"dependencies": {
|
|
616
|
+
"@auth/drizzle-adapter": "1.11.3"
|
|
617
|
+
},
|
|
618
|
+
"patches": [
|
|
619
|
+
{
|
|
620
|
+
"op": "insert",
|
|
621
|
+
"target": "src/server/db/schema.ts",
|
|
622
|
+
"anchor": "tables",
|
|
623
|
+
"source": "features/auth-authjs-drizzle/snippets/auth-tables.ts"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"op": "insert",
|
|
627
|
+
"target": "src/server/auth/config.ts",
|
|
628
|
+
"anchor": "adapter-imports",
|
|
629
|
+
"source": "features/auth-authjs-drizzle/snippets/adapter-imports.ts"
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"op": "insert",
|
|
633
|
+
"target": "src/server/auth/config.ts",
|
|
634
|
+
"anchor": "adapter-db-imports",
|
|
635
|
+
"source": "features/auth-authjs-drizzle/snippets/adapter-db-imports.ts"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"op": "insert",
|
|
639
|
+
"target": "src/server/auth/config.ts",
|
|
640
|
+
"anchor": "adapter",
|
|
641
|
+
"source": "features/auth-authjs-drizzle/snippets/adapter.ts"
|
|
642
|
+
}
|
|
643
|
+
]
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"id": "auth-clerk",
|
|
647
|
+
"description": "Clerk provider, middleware and sign-in/up routes. Works with or without a database.",
|
|
648
|
+
"when": {
|
|
649
|
+
"option": "auth",
|
|
650
|
+
"equals": "clerk"
|
|
651
|
+
},
|
|
652
|
+
"dependencies": {
|
|
653
|
+
"@clerk/nextjs": "7.9.17"
|
|
654
|
+
},
|
|
655
|
+
"patches": [
|
|
656
|
+
{
|
|
657
|
+
"op": "env",
|
|
658
|
+
"target": ".env.example",
|
|
659
|
+
"vars": [
|
|
660
|
+
{
|
|
661
|
+
"name": "NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY",
|
|
662
|
+
"description": "Clerk publishable key",
|
|
663
|
+
"public": true
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"name": "CLERK_SECRET_KEY",
|
|
667
|
+
"description": "Clerk secret key"
|
|
668
|
+
}
|
|
669
|
+
]
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"op": "insert",
|
|
673
|
+
"target": "src/app/providers.tsx",
|
|
674
|
+
"anchor": "providers-imports",
|
|
675
|
+
"source": "features/auth-clerk/snippets/providers-imports.tsx"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"op": "insert",
|
|
679
|
+
"target": "src/app/providers.tsx",
|
|
680
|
+
"anchor": "providers",
|
|
681
|
+
"source": "features/auth-clerk/snippets/providers.tsx"
|
|
682
|
+
}
|
|
683
|
+
]
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"id": "api-server-actions",
|
|
687
|
+
"description": "Example server action, validation helper and test.",
|
|
688
|
+
"when": {
|
|
689
|
+
"option": "api",
|
|
690
|
+
"equals": "server-actions"
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"id": "api-trpc",
|
|
695
|
+
"description": "tRPC router, context, Next.js route handler and React client provider.",
|
|
696
|
+
"when": {
|
|
697
|
+
"option": "api",
|
|
698
|
+
"equals": "trpc"
|
|
699
|
+
},
|
|
700
|
+
"after": [
|
|
701
|
+
"auth-authjs",
|
|
702
|
+
"auth-clerk"
|
|
703
|
+
],
|
|
704
|
+
"dependencies": {
|
|
705
|
+
"@trpc/server": "11.19.0",
|
|
706
|
+
"@trpc/client": "11.19.0",
|
|
707
|
+
"@trpc/react-query": "11.19.0",
|
|
708
|
+
"@tanstack/react-query": "5.104.4"
|
|
709
|
+
},
|
|
710
|
+
"replaces": [
|
|
711
|
+
"src/features/notes/components/note-form.tsx"
|
|
712
|
+
],
|
|
713
|
+
"patches": [
|
|
714
|
+
{
|
|
715
|
+
"op": "insert",
|
|
716
|
+
"target": "src/app/providers.tsx",
|
|
717
|
+
"anchor": "providers-imports",
|
|
718
|
+
"source": "features/api-trpc/snippets/providers-imports.tsx"
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"op": "insert",
|
|
722
|
+
"target": "src/app/providers.tsx",
|
|
723
|
+
"anchor": "providers",
|
|
724
|
+
"source": "features/api-trpc/snippets/providers.tsx",
|
|
725
|
+
"position": "after"
|
|
726
|
+
}
|
|
727
|
+
]
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
"id": "payments-stripe",
|
|
731
|
+
"description": "Stripe checkout route, webhook handler and billing helper. Requires auth and Postgres.",
|
|
732
|
+
"when": {
|
|
733
|
+
"option": "payments",
|
|
734
|
+
"equals": true
|
|
735
|
+
},
|
|
736
|
+
"after": [
|
|
737
|
+
"auth-authjs",
|
|
738
|
+
"auth-clerk",
|
|
739
|
+
"orm-prisma",
|
|
740
|
+
"orm-drizzle"
|
|
741
|
+
],
|
|
742
|
+
"dependencies": {
|
|
743
|
+
"stripe": "23.0.0"
|
|
744
|
+
},
|
|
745
|
+
"patches": [
|
|
746
|
+
{
|
|
747
|
+
"op": "env",
|
|
748
|
+
"target": ".env.example",
|
|
749
|
+
"vars": [
|
|
750
|
+
{
|
|
751
|
+
"name": "STRIPE_SECRET_KEY",
|
|
752
|
+
"description": "Stripe secret key"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"name": "STRIPE_WEBHOOK_SECRET",
|
|
756
|
+
"description": "Signing secret for the Stripe webhook endpoint"
|
|
757
|
+
}
|
|
758
|
+
]
|
|
759
|
+
}
|
|
760
|
+
]
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"id": "payments-stripe-prisma",
|
|
764
|
+
"description": "Combination overlay: customer/subscription models for Prisma.",
|
|
765
|
+
"when": {
|
|
766
|
+
"all": [
|
|
767
|
+
{
|
|
768
|
+
"option": "payments",
|
|
769
|
+
"equals": true
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
"all": [
|
|
773
|
+
{
|
|
774
|
+
"option": "database",
|
|
775
|
+
"equals": "postgres"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"option": "orm",
|
|
779
|
+
"equals": "prisma"
|
|
780
|
+
}
|
|
781
|
+
]
|
|
782
|
+
}
|
|
783
|
+
]
|
|
784
|
+
},
|
|
785
|
+
"after": [
|
|
786
|
+
"payments-stripe",
|
|
787
|
+
"auth-authjs-prisma"
|
|
788
|
+
],
|
|
789
|
+
"patches": [
|
|
790
|
+
{
|
|
791
|
+
"op": "insert",
|
|
792
|
+
"target": "prisma/schema.prisma",
|
|
793
|
+
"anchor": "models",
|
|
794
|
+
"source": "features/payments-stripe-prisma/snippets/billing-models.prisma",
|
|
795
|
+
"position": "after"
|
|
796
|
+
}
|
|
797
|
+
]
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
"id": "payments-stripe-drizzle",
|
|
801
|
+
"description": "Combination overlay: customer/subscription tables for Drizzle.",
|
|
802
|
+
"when": {
|
|
803
|
+
"all": [
|
|
804
|
+
{
|
|
805
|
+
"option": "payments",
|
|
806
|
+
"equals": true
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"all": [
|
|
810
|
+
{
|
|
811
|
+
"option": "database",
|
|
812
|
+
"equals": "postgres"
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
"option": "orm",
|
|
816
|
+
"equals": "drizzle"
|
|
817
|
+
}
|
|
818
|
+
]
|
|
819
|
+
}
|
|
820
|
+
]
|
|
821
|
+
},
|
|
822
|
+
"after": [
|
|
823
|
+
"payments-stripe",
|
|
824
|
+
"auth-authjs-drizzle"
|
|
825
|
+
],
|
|
826
|
+
"patches": [
|
|
827
|
+
{
|
|
828
|
+
"op": "insert",
|
|
829
|
+
"target": "src/server/db/schema.ts",
|
|
830
|
+
"anchor": "tables",
|
|
831
|
+
"source": "features/payments-stripe-drizzle/snippets/billing-tables.ts",
|
|
832
|
+
"position": "after"
|
|
833
|
+
}
|
|
834
|
+
]
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"id": "deploy-vercel",
|
|
838
|
+
"description": "Vercel deploy notes and README section.",
|
|
839
|
+
"when": {
|
|
840
|
+
"option": "deploy",
|
|
841
|
+
"equals": "vercel"
|
|
842
|
+
},
|
|
843
|
+
"patches": [
|
|
844
|
+
{
|
|
845
|
+
"op": "insert",
|
|
846
|
+
"target": "README.md",
|
|
847
|
+
"anchor": "readme-sections",
|
|
848
|
+
"source": "features/deploy-vercel/snippets/readme-deploy.md",
|
|
849
|
+
"position": "before"
|
|
850
|
+
}
|
|
851
|
+
],
|
|
852
|
+
"after": [
|
|
853
|
+
"orm-drizzle"
|
|
854
|
+
]
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"id": "deploy-docker",
|
|
858
|
+
"description": "Dockerfile, .dockerignore, compose file for the app, standalone output.",
|
|
859
|
+
"when": {
|
|
860
|
+
"option": "deploy",
|
|
861
|
+
"equals": "docker"
|
|
862
|
+
},
|
|
863
|
+
"scripts": {
|
|
864
|
+
"image:build": "docker build -t yosr-seed-prototype:gate ."
|
|
865
|
+
},
|
|
866
|
+
"patches": [
|
|
867
|
+
{
|
|
868
|
+
"op": "insert",
|
|
869
|
+
"target": "next.config.ts",
|
|
870
|
+
"anchor": "next-config",
|
|
871
|
+
"content": "output: \"standalone\","
|
|
872
|
+
}
|
|
873
|
+
]
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"id": "deploy-docker-npm",
|
|
877
|
+
"description": "Docker install stage for npm: copy package-lock.json and run npm ci.",
|
|
878
|
+
"when": {
|
|
879
|
+
"all": [
|
|
880
|
+
{
|
|
881
|
+
"option": "deploy",
|
|
882
|
+
"equals": "docker"
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
"option": "packageManager",
|
|
886
|
+
"equals": "npm"
|
|
887
|
+
}
|
|
888
|
+
]
|
|
889
|
+
},
|
|
890
|
+
"after": [
|
|
891
|
+
"deploy-docker"
|
|
892
|
+
],
|
|
893
|
+
"replaces": [
|
|
894
|
+
"Dockerfile"
|
|
895
|
+
]
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
"id": "deploy-docker-postgres",
|
|
899
|
+
"description": "Combination overlay: adds a Postgres service to the compose file.",
|
|
900
|
+
"when": {
|
|
901
|
+
"all": [
|
|
902
|
+
{
|
|
903
|
+
"option": "deploy",
|
|
904
|
+
"equals": "docker"
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"option": "database",
|
|
908
|
+
"equals": "postgres"
|
|
909
|
+
}
|
|
910
|
+
]
|
|
911
|
+
},
|
|
912
|
+
"after": [
|
|
913
|
+
"deploy-docker"
|
|
914
|
+
],
|
|
915
|
+
"patches": [
|
|
916
|
+
{
|
|
917
|
+
"op": "insert",
|
|
918
|
+
"target": "compose.yaml",
|
|
919
|
+
"anchor": "services",
|
|
920
|
+
"source": "features/deploy-docker-postgres/snippets/postgres-service.yaml"
|
|
921
|
+
}
|
|
922
|
+
]
|
|
923
|
+
}
|
|
924
|
+
],
|
|
925
|
+
"style": {
|
|
926
|
+
"dimensions": [
|
|
927
|
+
{
|
|
928
|
+
"id": "layout",
|
|
929
|
+
"description": "Feature-based (by domain), layer-based (by technical type) or flat folders. Matches style-profile 'layout'.",
|
|
930
|
+
"default": "feature",
|
|
931
|
+
"values": {
|
|
932
|
+
"feature": {
|
|
933
|
+
"pathMap": {
|
|
934
|
+
"@domain": "src/features",
|
|
935
|
+
"@shared": "src/shared",
|
|
936
|
+
"@server": "src/server",
|
|
937
|
+
"@featureUi": "src/features/notes/components"
|
|
938
|
+
},
|
|
939
|
+
"rules": [
|
|
940
|
+
"layout-feature"
|
|
941
|
+
]
|
|
942
|
+
},
|
|
943
|
+
"layer": {
|
|
944
|
+
"pathMap": {
|
|
945
|
+
"@domain": "src/services",
|
|
946
|
+
"@shared": "src/lib",
|
|
947
|
+
"@server": "src/server",
|
|
948
|
+
"@featureUi": "src/components/notes"
|
|
949
|
+
},
|
|
950
|
+
"rules": [
|
|
951
|
+
"layout-layer"
|
|
952
|
+
]
|
|
953
|
+
},
|
|
954
|
+
"flat": {
|
|
955
|
+
"pathMap": {
|
|
956
|
+
"@domain": "src/lib",
|
|
957
|
+
"@shared": "src/lib",
|
|
958
|
+
"@server": "src/lib/server",
|
|
959
|
+
"@featureUi": "src/components/notes"
|
|
960
|
+
},
|
|
961
|
+
"rules": [
|
|
962
|
+
"layout-flat"
|
|
963
|
+
]
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
"id": "naming.files",
|
|
969
|
+
"description": "File naming convention for source files.",
|
|
970
|
+
"default": "kebab-case",
|
|
971
|
+
"values": {
|
|
972
|
+
"kebab-case": {},
|
|
973
|
+
"camelCase": {
|
|
974
|
+
"patches": [
|
|
975
|
+
{
|
|
976
|
+
"op": "codemod",
|
|
977
|
+
"codemod": "builtin:rename-files",
|
|
978
|
+
"args": {
|
|
979
|
+
"case": "camel",
|
|
980
|
+
"include": [
|
|
981
|
+
"src/**/*.ts",
|
|
982
|
+
"src/**/*.tsx"
|
|
983
|
+
],
|
|
984
|
+
"exclude": [
|
|
985
|
+
"src/app/**",
|
|
986
|
+
"src/components/ui/**"
|
|
987
|
+
]
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
]
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"id": "naming.componentFiles",
|
|
996
|
+
"description": "React component file names: same casing as other files, or PascalCase.",
|
|
997
|
+
"default": "same-as-files",
|
|
998
|
+
"values": {
|
|
999
|
+
"same-as-files": {},
|
|
1000
|
+
"PascalCase": {
|
|
1001
|
+
"patches": [
|
|
1002
|
+
{
|
|
1003
|
+
"op": "codemod",
|
|
1004
|
+
"codemod": "builtin:rename-files",
|
|
1005
|
+
"args": {
|
|
1006
|
+
"case": "pascal",
|
|
1007
|
+
"include": [
|
|
1008
|
+
"src/components/**/*.tsx",
|
|
1009
|
+
"@domain/**/components/**/*.tsx"
|
|
1010
|
+
],
|
|
1011
|
+
"exclude": [
|
|
1012
|
+
"src/components/ui/**"
|
|
1013
|
+
]
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
]
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"id": "errors.pattern",
|
|
1022
|
+
"description": "How expected failures are returned from server code.",
|
|
1023
|
+
"default": "throw",
|
|
1024
|
+
"values": {
|
|
1025
|
+
"throw": {
|
|
1026
|
+
"rules": [
|
|
1027
|
+
"errors-throw"
|
|
1028
|
+
]
|
|
1029
|
+
},
|
|
1030
|
+
"result": {
|
|
1031
|
+
"variantDir": "style/errors-result",
|
|
1032
|
+
"rules": [
|
|
1033
|
+
"errors-result"
|
|
1034
|
+
]
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
"id": "data.fetching",
|
|
1040
|
+
"description": "Only server-first is supported by this template in v0.1.",
|
|
1041
|
+
"default": "server-first",
|
|
1042
|
+
"values": {
|
|
1043
|
+
"server-first": {
|
|
1044
|
+
"rules": [
|
|
1045
|
+
"data-server-first"
|
|
1046
|
+
]
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
"id": "forms.validation",
|
|
1052
|
+
"description": "Only zod is supported by this template in v0.1.",
|
|
1053
|
+
"default": "zod",
|
|
1054
|
+
"values": {
|
|
1055
|
+
"zod": {
|
|
1056
|
+
"rules": [
|
|
1057
|
+
"forms-zod"
|
|
1058
|
+
]
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
"id": "tests.location",
|
|
1064
|
+
"description": "Unit tests next to the code, in adjacent __tests__/ folders, or in a top-level tests/ tree.",
|
|
1065
|
+
"default": "colocated",
|
|
1066
|
+
"values": {
|
|
1067
|
+
"colocated": {
|
|
1068
|
+
"rules": [
|
|
1069
|
+
"tests-colocated"
|
|
1070
|
+
]
|
|
1071
|
+
},
|
|
1072
|
+
"tests-folder": {
|
|
1073
|
+
"patches": [
|
|
1074
|
+
{
|
|
1075
|
+
"op": "codemod",
|
|
1076
|
+
"codemod": "builtin:move-tests",
|
|
1077
|
+
"args": {
|
|
1078
|
+
"mode": "adjacent-dir",
|
|
1079
|
+
"dir": "__tests__"
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
],
|
|
1083
|
+
"rules": [
|
|
1084
|
+
"tests-folder"
|
|
1085
|
+
]
|
|
1086
|
+
},
|
|
1087
|
+
"separate": {
|
|
1088
|
+
"patches": [
|
|
1089
|
+
{
|
|
1090
|
+
"op": "codemod",
|
|
1091
|
+
"codemod": "builtin:move-tests",
|
|
1092
|
+
"args": {
|
|
1093
|
+
"to": "tests/unit"
|
|
1094
|
+
}
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
"op": "json-merge",
|
|
1098
|
+
"target": "tsconfig.json",
|
|
1099
|
+
"arrays": "append",
|
|
1100
|
+
"value": {
|
|
1101
|
+
"include": [
|
|
1102
|
+
"tests/**/*.ts"
|
|
1103
|
+
]
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
],
|
|
1107
|
+
"rules": [
|
|
1108
|
+
"tests-separate"
|
|
1109
|
+
]
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
"id": "tests.naming",
|
|
1115
|
+
"description": "Unit-test file suffix. .test leaves shipped unit tests unchanged. .spec renames .test. to .spec. under src/ and tests/ only.",
|
|
1116
|
+
"default": ".test",
|
|
1117
|
+
"values": {
|
|
1118
|
+
".test": {},
|
|
1119
|
+
".spec": {
|
|
1120
|
+
"patches": [
|
|
1121
|
+
{
|
|
1122
|
+
"op": "codemod",
|
|
1123
|
+
"codemod": "builtin:rename-test-suffix",
|
|
1124
|
+
"args": {
|
|
1125
|
+
"from": ".test.",
|
|
1126
|
+
"to": ".spec."
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
]
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
]
|
|
1134
|
+
},
|
|
1135
|
+
"enforcement": {
|
|
1136
|
+
"eslint": {
|
|
1137
|
+
"target": "eslint.config.mjs",
|
|
1138
|
+
"anchor": "eslint-style"
|
|
1139
|
+
},
|
|
1140
|
+
"prettier": {
|
|
1141
|
+
"target": ".prettierrc.json"
|
|
1142
|
+
},
|
|
1143
|
+
"tsconfig": {
|
|
1144
|
+
"target": "tsconfig.json"
|
|
1145
|
+
}
|
|
1146
|
+
},
|
|
1147
|
+
"zones": [
|
|
1148
|
+
{
|
|
1149
|
+
"id": "domain-features",
|
|
1150
|
+
"intent": "Domain logic for the user's app: one folder per feature with its server functions, validation schemas and unit tests. Follow the existing example feature. Use the db helper in src/server/db only when a database is configured.",
|
|
1151
|
+
"paths": {
|
|
1152
|
+
"create": [
|
|
1153
|
+
"@domain/**",
|
|
1154
|
+
"@featureUi/**"
|
|
1155
|
+
],
|
|
1156
|
+
"modify": [
|
|
1157
|
+
"@domain/**",
|
|
1158
|
+
"@featureUi/**"
|
|
1159
|
+
]
|
|
1160
|
+
},
|
|
1161
|
+
"context": [
|
|
1162
|
+
"@domain/example/**",
|
|
1163
|
+
"AGENTS.md"
|
|
1164
|
+
],
|
|
1165
|
+
"constraints": {
|
|
1166
|
+
"maxFiles": 40,
|
|
1167
|
+
"allowDependencies": [
|
|
1168
|
+
"zod"
|
|
1169
|
+
],
|
|
1170
|
+
"forbidPatterns": [
|
|
1171
|
+
"process\\.env\\.[A-Z_]+_SECRET"
|
|
1172
|
+
]
|
|
1173
|
+
},
|
|
1174
|
+
"tests": {
|
|
1175
|
+
"required": true,
|
|
1176
|
+
"paths": [
|
|
1177
|
+
"@domain/**/*.test.ts"
|
|
1178
|
+
]
|
|
1179
|
+
}
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"id": "app-pages",
|
|
1183
|
+
"intent": "Pages and layouts for the user's app inside the authenticated app area, composed from shadcn/ui components.",
|
|
1184
|
+
"paths": {
|
|
1185
|
+
"create": [
|
|
1186
|
+
"src/app/(app)/**"
|
|
1187
|
+
],
|
|
1188
|
+
"modify": [
|
|
1189
|
+
"src/app/(app)/**"
|
|
1190
|
+
]
|
|
1191
|
+
},
|
|
1192
|
+
"context": [
|
|
1193
|
+
"src/components/ui/**",
|
|
1194
|
+
"src/app/layout.tsx"
|
|
1195
|
+
],
|
|
1196
|
+
"constraints": {
|
|
1197
|
+
"maxFiles": 30
|
|
1198
|
+
},
|
|
1199
|
+
"tests": {
|
|
1200
|
+
"required": false
|
|
1201
|
+
}
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
"id": "db-schema-prisma",
|
|
1205
|
+
"intent": "Add the app's data models to the Prisma schema below the models anchor. Do not change auth models.",
|
|
1206
|
+
"when": {
|
|
1207
|
+
"all": [
|
|
1208
|
+
{
|
|
1209
|
+
"option": "database",
|
|
1210
|
+
"equals": "postgres"
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
"option": "orm",
|
|
1214
|
+
"equals": "prisma"
|
|
1215
|
+
}
|
|
1216
|
+
]
|
|
1217
|
+
},
|
|
1218
|
+
"paths": {
|
|
1219
|
+
"modify": [
|
|
1220
|
+
"prisma/schema.prisma"
|
|
1221
|
+
]
|
|
1222
|
+
},
|
|
1223
|
+
"constraints": {
|
|
1224
|
+
"maxChangedLines": 200
|
|
1225
|
+
},
|
|
1226
|
+
"tests": {
|
|
1227
|
+
"required": false
|
|
1228
|
+
}
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
"id": "db-schema-drizzle",
|
|
1232
|
+
"intent": "Add the app's tables to the Drizzle schema. Do not change auth tables.",
|
|
1233
|
+
"when": {
|
|
1234
|
+
"all": [
|
|
1235
|
+
{
|
|
1236
|
+
"option": "database",
|
|
1237
|
+
"equals": "postgres"
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
"option": "orm",
|
|
1241
|
+
"equals": "drizzle"
|
|
1242
|
+
}
|
|
1243
|
+
]
|
|
1244
|
+
},
|
|
1245
|
+
"paths": {
|
|
1246
|
+
"modify": [
|
|
1247
|
+
"src/server/db/schema.ts"
|
|
1248
|
+
]
|
|
1249
|
+
},
|
|
1250
|
+
"constraints": {
|
|
1251
|
+
"maxChangedLines": 200
|
|
1252
|
+
},
|
|
1253
|
+
"tests": {
|
|
1254
|
+
"required": false
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
],
|
|
1258
|
+
"protected": [
|
|
1259
|
+
"src/server/auth/**",
|
|
1260
|
+
"src/middleware.ts",
|
|
1261
|
+
"src/proxy.ts",
|
|
1262
|
+
"src/app/api/webhooks/**",
|
|
1263
|
+
".github/**"
|
|
1264
|
+
],
|
|
1265
|
+
"rules": {
|
|
1266
|
+
"targets": [
|
|
1267
|
+
"agents-md",
|
|
1268
|
+
"claude-md",
|
|
1269
|
+
"cursor-rules"
|
|
1270
|
+
],
|
|
1271
|
+
"fragments": [
|
|
1272
|
+
{
|
|
1273
|
+
"id": "project-overview",
|
|
1274
|
+
"file": "rules/project-overview.md",
|
|
1275
|
+
"title": "Project overview",
|
|
1276
|
+
"order": 10,
|
|
1277
|
+
"cursor": {
|
|
1278
|
+
"alwaysApply": true,
|
|
1279
|
+
"description": "What this project is and how it is laid out"
|
|
1280
|
+
}
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"id": "commands",
|
|
1284
|
+
"file": "rules/commands.md",
|
|
1285
|
+
"title": "Commands",
|
|
1286
|
+
"order": 20,
|
|
1287
|
+
"cursor": {
|
|
1288
|
+
"alwaysApply": true
|
|
1289
|
+
}
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"id": "layout-feature",
|
|
1293
|
+
"file": "rules/layout-feature.md",
|
|
1294
|
+
"title": "Folder layout",
|
|
1295
|
+
"order": 30,
|
|
1296
|
+
"cursor": {
|
|
1297
|
+
"globs": [
|
|
1298
|
+
"src/**"
|
|
1299
|
+
]
|
|
1300
|
+
}
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
"id": "layout-layer",
|
|
1304
|
+
"file": "rules/layout-layer.md",
|
|
1305
|
+
"title": "Folder layout",
|
|
1306
|
+
"order": 30,
|
|
1307
|
+
"cursor": {
|
|
1308
|
+
"globs": [
|
|
1309
|
+
"src/**"
|
|
1310
|
+
]
|
|
1311
|
+
}
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"id": "layout-flat",
|
|
1315
|
+
"file": "rules/layout-flat.md",
|
|
1316
|
+
"title": "Folder layout",
|
|
1317
|
+
"order": 30,
|
|
1318
|
+
"cursor": {
|
|
1319
|
+
"globs": [
|
|
1320
|
+
"src/**"
|
|
1321
|
+
]
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
"id": "errors-throw",
|
|
1326
|
+
"file": "rules/errors-throw.md",
|
|
1327
|
+
"title": "Error handling",
|
|
1328
|
+
"order": 40,
|
|
1329
|
+
"cursor": {
|
|
1330
|
+
"globs": [
|
|
1331
|
+
"src/server/**",
|
|
1332
|
+
"@domain/**"
|
|
1333
|
+
]
|
|
1334
|
+
}
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
"id": "errors-result",
|
|
1338
|
+
"file": "rules/errors-result.md",
|
|
1339
|
+
"title": "Error handling",
|
|
1340
|
+
"order": 40,
|
|
1341
|
+
"cursor": {
|
|
1342
|
+
"globs": [
|
|
1343
|
+
"src/server/**",
|
|
1344
|
+
"@domain/**"
|
|
1345
|
+
]
|
|
1346
|
+
}
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"id": "data-server-first",
|
|
1350
|
+
"file": "rules/data-server-first.md",
|
|
1351
|
+
"title": "Data fetching",
|
|
1352
|
+
"order": 45
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
"id": "forms-zod",
|
|
1356
|
+
"file": "rules/forms-zod.md",
|
|
1357
|
+
"title": "Forms and validation",
|
|
1358
|
+
"order": 46
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
"id": "tests-colocated",
|
|
1362
|
+
"file": "rules/tests-colocated.md",
|
|
1363
|
+
"title": "Testing",
|
|
1364
|
+
"order": 50,
|
|
1365
|
+
"cursor": {
|
|
1366
|
+
"globs": [
|
|
1367
|
+
"**/*.test.ts",
|
|
1368
|
+
"**/*.test.tsx",
|
|
1369
|
+
"**/*.spec.ts",
|
|
1370
|
+
"**/*.spec.tsx"
|
|
1371
|
+
]
|
|
1372
|
+
}
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
"id": "tests-folder",
|
|
1376
|
+
"file": "rules/tests-folder.md",
|
|
1377
|
+
"title": "Testing",
|
|
1378
|
+
"order": 50,
|
|
1379
|
+
"cursor": {
|
|
1380
|
+
"globs": [
|
|
1381
|
+
"**/__tests__/**"
|
|
1382
|
+
]
|
|
1383
|
+
}
|
|
1384
|
+
},
|
|
1385
|
+
{
|
|
1386
|
+
"id": "tests-separate",
|
|
1387
|
+
"file": "rules/tests-separate.md",
|
|
1388
|
+
"title": "Testing",
|
|
1389
|
+
"order": 50,
|
|
1390
|
+
"cursor": {
|
|
1391
|
+
"globs": [
|
|
1392
|
+
"tests/**"
|
|
1393
|
+
]
|
|
1394
|
+
}
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
"id": "auth-authjs",
|
|
1398
|
+
"file": "rules/auth-authjs.md",
|
|
1399
|
+
"title": "Authentication (Auth.js)",
|
|
1400
|
+
"order": 60,
|
|
1401
|
+
"when": {
|
|
1402
|
+
"option": "auth",
|
|
1403
|
+
"equals": "authjs"
|
|
1404
|
+
}
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
"id": "auth-clerk",
|
|
1408
|
+
"file": "rules/auth-clerk.md",
|
|
1409
|
+
"title": "Authentication (Clerk)",
|
|
1410
|
+
"order": 60,
|
|
1411
|
+
"when": {
|
|
1412
|
+
"option": "auth",
|
|
1413
|
+
"equals": "clerk"
|
|
1414
|
+
}
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
"id": "data-prisma",
|
|
1418
|
+
"file": "rules/data-prisma.md",
|
|
1419
|
+
"title": "Data access (Prisma)",
|
|
1420
|
+
"order": 70,
|
|
1421
|
+
"when": {
|
|
1422
|
+
"all": [
|
|
1423
|
+
{
|
|
1424
|
+
"option": "database",
|
|
1425
|
+
"equals": "postgres"
|
|
1426
|
+
},
|
|
1427
|
+
{
|
|
1428
|
+
"option": "orm",
|
|
1429
|
+
"equals": "prisma"
|
|
1430
|
+
}
|
|
1431
|
+
]
|
|
1432
|
+
},
|
|
1433
|
+
"cursor": {
|
|
1434
|
+
"globs": [
|
|
1435
|
+
"prisma/**",
|
|
1436
|
+
"src/server/db/**"
|
|
1437
|
+
]
|
|
1438
|
+
}
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
"id": "data-drizzle",
|
|
1442
|
+
"file": "rules/data-drizzle.md",
|
|
1443
|
+
"title": "Data access (Drizzle)",
|
|
1444
|
+
"order": 70,
|
|
1445
|
+
"when": {
|
|
1446
|
+
"all": [
|
|
1447
|
+
{
|
|
1448
|
+
"option": "database",
|
|
1449
|
+
"equals": "postgres"
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
"option": "orm",
|
|
1453
|
+
"equals": "drizzle"
|
|
1454
|
+
}
|
|
1455
|
+
]
|
|
1456
|
+
},
|
|
1457
|
+
"cursor": {
|
|
1458
|
+
"globs": [
|
|
1459
|
+
"src/server/db/**"
|
|
1460
|
+
]
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1463
|
+
{
|
|
1464
|
+
"id": "data-none",
|
|
1465
|
+
"file": "rules/data-none.md",
|
|
1466
|
+
"title": "Data (no database)",
|
|
1467
|
+
"order": 70,
|
|
1468
|
+
"when": {
|
|
1469
|
+
"option": "database",
|
|
1470
|
+
"equals": "none"
|
|
1471
|
+
}
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
"id": "api-server-actions",
|
|
1475
|
+
"file": "rules/api-server-actions.md",
|
|
1476
|
+
"title": "API (server actions)",
|
|
1477
|
+
"order": 80,
|
|
1478
|
+
"when": {
|
|
1479
|
+
"option": "api",
|
|
1480
|
+
"equals": "server-actions"
|
|
1481
|
+
}
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"id": "api-trpc",
|
|
1485
|
+
"file": "rules/api-trpc.md",
|
|
1486
|
+
"title": "API (tRPC)",
|
|
1487
|
+
"order": 80,
|
|
1488
|
+
"when": {
|
|
1489
|
+
"option": "api",
|
|
1490
|
+
"equals": "trpc"
|
|
1491
|
+
},
|
|
1492
|
+
"cursor": {
|
|
1493
|
+
"globs": [
|
|
1494
|
+
"src/server/api/**"
|
|
1495
|
+
]
|
|
1496
|
+
}
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
"id": "payments-stripe",
|
|
1500
|
+
"file": "rules/payments-stripe.md",
|
|
1501
|
+
"title": "Payments (Stripe)",
|
|
1502
|
+
"order": 90,
|
|
1503
|
+
"when": {
|
|
1504
|
+
"option": "payments",
|
|
1505
|
+
"equals": true
|
|
1506
|
+
}
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
"id": "ui-shadcn",
|
|
1510
|
+
"file": "rules/ui-shadcn.md",
|
|
1511
|
+
"title": "UI components",
|
|
1512
|
+
"order": 100,
|
|
1513
|
+
"cursor": {
|
|
1514
|
+
"globs": [
|
|
1515
|
+
"src/components/**",
|
|
1516
|
+
"src/app/**/*.tsx"
|
|
1517
|
+
]
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
],
|
|
1521
|
+
"architectureNote": {
|
|
1522
|
+
"source": "rules/architecture.md",
|
|
1523
|
+
"target": "docs/architecture.md"
|
|
1524
|
+
}
|
|
1525
|
+
},
|
|
1526
|
+
"checks": {
|
|
1527
|
+
"maxFixAttempts": 3,
|
|
1528
|
+
"services": [
|
|
1529
|
+
{
|
|
1530
|
+
"id": "postgres",
|
|
1531
|
+
"image": "postgres:18.6-alpine",
|
|
1532
|
+
"env": {
|
|
1533
|
+
"POSTGRES_PASSWORD": "postgres"
|
|
1534
|
+
},
|
|
1535
|
+
"when": {
|
|
1536
|
+
"option": "database",
|
|
1537
|
+
"equals": "postgres"
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
],
|
|
1541
|
+
"steps": [
|
|
1542
|
+
{
|
|
1543
|
+
"id": "install",
|
|
1544
|
+
"kind": "install",
|
|
1545
|
+
"run": {
|
|
1546
|
+
"install": true
|
|
1547
|
+
},
|
|
1548
|
+
"timeoutSec": 600
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
"id": "lint",
|
|
1552
|
+
"kind": "lint",
|
|
1553
|
+
"run": {
|
|
1554
|
+
"script": "lint"
|
|
1555
|
+
},
|
|
1556
|
+
"timeoutSec": 300
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
"id": "typecheck",
|
|
1560
|
+
"kind": "typecheck",
|
|
1561
|
+
"run": {
|
|
1562
|
+
"script": "typecheck"
|
|
1563
|
+
},
|
|
1564
|
+
"timeoutSec": 300
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
"id": "build",
|
|
1568
|
+
"kind": "build",
|
|
1569
|
+
"run": {
|
|
1570
|
+
"script": "build"
|
|
1571
|
+
},
|
|
1572
|
+
"timeoutSec": 900,
|
|
1573
|
+
"env": {
|
|
1574
|
+
"SKIP_ENV_VALIDATION": "1"
|
|
1575
|
+
}
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
"id": "test",
|
|
1579
|
+
"kind": "test",
|
|
1580
|
+
"run": {
|
|
1581
|
+
"script": "test"
|
|
1582
|
+
},
|
|
1583
|
+
"timeoutSec": 600
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
"id": "image",
|
|
1587
|
+
"kind": "custom",
|
|
1588
|
+
"run": {
|
|
1589
|
+
"script": "image:build"
|
|
1590
|
+
},
|
|
1591
|
+
"timeoutSec": 900,
|
|
1592
|
+
"required": false,
|
|
1593
|
+
"when": {
|
|
1594
|
+
"option": "deploy",
|
|
1595
|
+
"equals": "docker"
|
|
1596
|
+
},
|
|
1597
|
+
"phases": [
|
|
1598
|
+
"handoff",
|
|
1599
|
+
"template-ci",
|
|
1600
|
+
"project-ci"
|
|
1601
|
+
]
|
|
1602
|
+
},
|
|
1603
|
+
{
|
|
1604
|
+
"id": "db-setup",
|
|
1605
|
+
"kind": "custom",
|
|
1606
|
+
"run": {
|
|
1607
|
+
"script": "db:push"
|
|
1608
|
+
},
|
|
1609
|
+
"timeoutSec": 120,
|
|
1610
|
+
"required": false,
|
|
1611
|
+
"when": {
|
|
1612
|
+
"option": "database",
|
|
1613
|
+
"equals": "postgres"
|
|
1614
|
+
},
|
|
1615
|
+
"phases": [
|
|
1616
|
+
"handoff",
|
|
1617
|
+
"template-ci",
|
|
1618
|
+
"project-ci"
|
|
1619
|
+
]
|
|
1620
|
+
},
|
|
1621
|
+
{
|
|
1622
|
+
"id": "e2e",
|
|
1623
|
+
"kind": "e2e",
|
|
1624
|
+
"run": {
|
|
1625
|
+
"script": "test:e2e"
|
|
1626
|
+
},
|
|
1627
|
+
"timeoutSec": 900,
|
|
1628
|
+
"required": false,
|
|
1629
|
+
"phases": [
|
|
1630
|
+
"handoff",
|
|
1631
|
+
"template-ci",
|
|
1632
|
+
"project-ci"
|
|
1633
|
+
]
|
|
1634
|
+
}
|
|
1635
|
+
],
|
|
1636
|
+
"report": {
|
|
1637
|
+
"path": ".seed/report.md"
|
|
1638
|
+
}
|
|
1639
|
+
},
|
|
1640
|
+
"matrix": {
|
|
1641
|
+
"strategy": "pairwise",
|
|
1642
|
+
"packageManagers": [
|
|
1643
|
+
"pnpm",
|
|
1644
|
+
"npm"
|
|
1645
|
+
],
|
|
1646
|
+
"styleDimensions": [
|
|
1647
|
+
"layout",
|
|
1648
|
+
"errors.pattern",
|
|
1649
|
+
"tests.location"
|
|
1650
|
+
],
|
|
1651
|
+
"include": [
|
|
1652
|
+
{
|
|
1653
|
+
"name": "defaults",
|
|
1654
|
+
"options": {}
|
|
1655
|
+
},
|
|
1656
|
+
{
|
|
1657
|
+
"name": "defaults-npm",
|
|
1658
|
+
"options": {},
|
|
1659
|
+
"packageManager": "npm"
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
"name": "minimal",
|
|
1663
|
+
"options": {
|
|
1664
|
+
"database": "none",
|
|
1665
|
+
"auth": "none",
|
|
1666
|
+
"api": "server-actions",
|
|
1667
|
+
"deploy": "vercel"
|
|
1668
|
+
}
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
"name": "no-db-clerk",
|
|
1672
|
+
"options": {
|
|
1673
|
+
"database": "none",
|
|
1674
|
+
"auth": "clerk",
|
|
1675
|
+
"api": "trpc",
|
|
1676
|
+
"deploy": "docker"
|
|
1677
|
+
}
|
|
1678
|
+
},
|
|
1679
|
+
{
|
|
1680
|
+
"name": "kitchen-sink",
|
|
1681
|
+
"options": {
|
|
1682
|
+
"database": "postgres",
|
|
1683
|
+
"orm": "prisma",
|
|
1684
|
+
"auth": "authjs",
|
|
1685
|
+
"api": "trpc",
|
|
1686
|
+
"payments": true,
|
|
1687
|
+
"deploy": "docker"
|
|
1688
|
+
},
|
|
1689
|
+
"style": {
|
|
1690
|
+
"layout": "layer",
|
|
1691
|
+
"naming.files": "camelCase",
|
|
1692
|
+
"naming.componentFiles": "PascalCase",
|
|
1693
|
+
"errors.pattern": "result",
|
|
1694
|
+
"tests.location": "tests-folder"
|
|
1695
|
+
}
|
|
1696
|
+
},
|
|
1697
|
+
{
|
|
1698
|
+
"name": "minimal-preset",
|
|
1699
|
+
"options": {
|
|
1700
|
+
"database": "none"
|
|
1701
|
+
},
|
|
1702
|
+
"style": {
|
|
1703
|
+
"layout": "flat"
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
]
|
|
1707
|
+
},
|
|
1708
|
+
"migrations": [],
|
|
1709
|
+
"x-prototype": {
|
|
1710
|
+
"status": "prototype, not published",
|
|
1711
|
+
"stubbedFeatures": [],
|
|
1712
|
+
"notes": "No features are stubbed. The prototype renderer still refuses any id listed in stubbedFeatures."
|
|
1713
|
+
}
|
|
1714
|
+
}
|