create-velox-app 0.6.82 → 0.6.83
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 +6 -0
- package/package.json +1 -1
- package/src/templates/source/root/CLAUDE.auth.md +35 -9
- package/src/templates/source/root/CLAUDE.default.md +34 -8
- package/src/templates/source/root/CLAUDE.trpc.md +33 -8
- package/src/templates/source/rsc/CLAUDE.md +32 -0
- package/src/templates/source/rsc-auth/CLAUDE.md +32 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
This file provides guidance to Claude Code and other AI assistants.
|
|
4
4
|
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
Full documentation is available at **[veloxts.dev/docs](https://www.veloxts.dev/docs/)**.
|
|
8
|
+
|
|
9
|
+
## Claude Code Skills
|
|
10
|
+
|
|
11
|
+
When using Claude Code (CLI), these skills are available:
|
|
12
|
+
|
|
13
|
+
### `/veloxts` - VeloxTS Development Assistant
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/veloxts
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
VeloxTS-specific help for:
|
|
20
|
+
- Code generation (`velox make resource`, `velox make procedure`)
|
|
21
|
+
- REST route inference from naming conventions
|
|
22
|
+
- Authentication and guards
|
|
23
|
+
- Validation with Zod schemas
|
|
24
|
+
- Troubleshooting common errors
|
|
25
|
+
|
|
26
|
+
### `/feature-dev` - Guided Feature Development
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
/feature-dev
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
General-purpose skill for:
|
|
33
|
+
- Codebase understanding and architecture analysis
|
|
34
|
+
- Step-by-step implementation guidance
|
|
35
|
+
- Best practices for VeloxTS patterns
|
|
36
|
+
|
|
5
37
|
## Project Overview
|
|
6
38
|
|
|
7
39
|
**__PROJECT_NAME__** is a VeloxTS full-stack application with:
|
|
@@ -54,7 +86,7 @@ export const postProcedures = procedures('posts', {
|
|
|
54
86
|
.input(z.object({ id: z.string().uuid() }))
|
|
55
87
|
.output(PostSchema)
|
|
56
88
|
.query(async ({ input, ctx }) => {
|
|
57
|
-
return ctx.db.post.
|
|
89
|
+
return ctx.db.post.findUniqueOrThrow({ where: { id: input.id } });
|
|
58
90
|
}),
|
|
59
91
|
|
|
60
92
|
// POST /api/posts
|
|
@@ -403,7 +435,7 @@ registerPolicy('Post', PostPolicy);
|
|
|
403
435
|
const deletePost = procedure()
|
|
404
436
|
.guard(authenticated)
|
|
405
437
|
.mutation(async ({ ctx, input }) => {
|
|
406
|
-
const post = await ctx.db.post.
|
|
438
|
+
const post = await ctx.db.post.findUniqueOrThrow({ where: { id: input.id } });
|
|
407
439
|
|
|
408
440
|
// Throws 403 if unauthorized
|
|
409
441
|
await authorize(ctx.user, 'delete', 'Post', post);
|
|
@@ -564,13 +596,7 @@ import { VeloxError } from '@veloxts/core';
|
|
|
564
596
|
const getUser = procedure()
|
|
565
597
|
.input(z.object({ id: z.string().uuid() }))
|
|
566
598
|
.query(async ({ ctx, input }) => {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
if (!user) {
|
|
570
|
-
throw VeloxError.notFound('User', input.id);
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
return user;
|
|
599
|
+
return ctx.db.user.findUniqueOrThrow({ where: { id: input.id } });
|
|
574
600
|
});
|
|
575
601
|
```
|
|
576
602
|
|
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
This file provides guidance to Claude Code and other AI assistants.
|
|
4
4
|
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
Full documentation is available at **[veloxts.dev/docs](https://www.veloxts.dev/docs/)**.
|
|
8
|
+
|
|
9
|
+
## Claude Code Skills
|
|
10
|
+
|
|
11
|
+
When using Claude Code (CLI), these skills are available:
|
|
12
|
+
|
|
13
|
+
### `/veloxts` - VeloxTS Development Assistant
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/veloxts
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
VeloxTS-specific help for:
|
|
20
|
+
- Code generation (`velox make resource`, `velox make procedure`)
|
|
21
|
+
- REST route inference from naming conventions
|
|
22
|
+
- Authentication and guards
|
|
23
|
+
- Validation with Zod schemas
|
|
24
|
+
- Troubleshooting common errors
|
|
25
|
+
|
|
26
|
+
### `/feature-dev` - Guided Feature Development
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
/feature-dev
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
General-purpose skill for:
|
|
33
|
+
- Codebase understanding and architecture analysis
|
|
34
|
+
- Step-by-step implementation guidance
|
|
35
|
+
- Best practices for VeloxTS patterns
|
|
36
|
+
|
|
5
37
|
## Project Overview
|
|
6
38
|
|
|
7
39
|
**__PROJECT_NAME__** is a VeloxTS full-stack application with:
|
|
@@ -53,7 +85,7 @@ export const postProcedures = procedures('posts', {
|
|
|
53
85
|
.input(z.object({ id: z.string().uuid() }))
|
|
54
86
|
.output(PostSchema)
|
|
55
87
|
.query(async ({ input, ctx }) => {
|
|
56
|
-
return ctx.db.post.
|
|
88
|
+
return ctx.db.post.findUniqueOrThrow({ where: { id: input.id } });
|
|
57
89
|
}),
|
|
58
90
|
|
|
59
91
|
// POST /api/posts
|
|
@@ -388,13 +420,7 @@ import { VeloxError } from '@veloxts/core';
|
|
|
388
420
|
const getUser = procedure()
|
|
389
421
|
.input(z.object({ id: z.string().uuid() }))
|
|
390
422
|
.query(async ({ ctx, input }) => {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
if (!user) {
|
|
394
|
-
throw VeloxError.notFound('User', input.id);
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
return user;
|
|
423
|
+
return ctx.db.user.findUniqueOrThrow({ where: { id: input.id } });
|
|
398
424
|
});
|
|
399
425
|
```
|
|
400
426
|
|
|
@@ -2,6 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
This file provides guidance to Claude Code and other AI assistants.
|
|
4
4
|
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
Full documentation is available at **[veloxts.dev/docs](https://www.veloxts.dev/docs/)**.
|
|
8
|
+
|
|
9
|
+
## Claude Code Skills
|
|
10
|
+
|
|
11
|
+
When using Claude Code (CLI), these skills are available:
|
|
12
|
+
|
|
13
|
+
### `/veloxts` - VeloxTS Development Assistant
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/veloxts
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
VeloxTS-specific help for:
|
|
20
|
+
- Code generation (`velox make resource`, `velox make procedure`)
|
|
21
|
+
- tRPC procedure patterns
|
|
22
|
+
- Validation with Zod schemas
|
|
23
|
+
- Troubleshooting common errors
|
|
24
|
+
|
|
25
|
+
### `/feature-dev` - Guided Feature Development
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
/feature-dev
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
General-purpose skill for:
|
|
32
|
+
- Codebase understanding and architecture analysis
|
|
33
|
+
- Step-by-step implementation guidance
|
|
34
|
+
- Best practices for VeloxTS patterns
|
|
35
|
+
|
|
5
36
|
## Project Overview
|
|
6
37
|
|
|
7
38
|
**__PROJECT_NAME__** is a VeloxTS full-stack application using **tRPC-only** architecture:
|
|
@@ -77,7 +108,7 @@ export const postProcedures = procedures('posts', {
|
|
|
77
108
|
.input(z.object({ id: z.string().uuid() }))
|
|
78
109
|
.output(PostSchema)
|
|
79
110
|
.query(async ({ input, ctx }) => {
|
|
80
|
-
return ctx.db.post.
|
|
111
|
+
return ctx.db.post.findUniqueOrThrow({ where: { id: input.id } });
|
|
81
112
|
}),
|
|
82
113
|
|
|
83
114
|
// tRPC mutation
|
|
@@ -307,13 +338,7 @@ import { VeloxError } from '@veloxts/core';
|
|
|
307
338
|
const getPost = procedure()
|
|
308
339
|
.input(z.object({ id: z.string().uuid() }))
|
|
309
340
|
.query(async ({ ctx, input }) => {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
if (!post) {
|
|
313
|
-
throw VeloxError.notFound('Post', input.id);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
return post;
|
|
341
|
+
return ctx.db.post.findUniqueOrThrow({ where: { id: input.id } });
|
|
317
342
|
});
|
|
318
343
|
```
|
|
319
344
|
|
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
This is a VeloxTS full-stack application using React Server Components.
|
|
4
4
|
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
Full documentation is available at **[veloxts.dev/docs](https://www.veloxts.dev/docs/)**.
|
|
8
|
+
|
|
9
|
+
## Claude Code Skills
|
|
10
|
+
|
|
11
|
+
When using Claude Code (CLI), these skills are available:
|
|
12
|
+
|
|
13
|
+
### `/veloxts` - VeloxTS Development Assistant
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/veloxts
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
VeloxTS-specific help for:
|
|
20
|
+
- Code generation (`velox make resource`, `velox make procedure`)
|
|
21
|
+
- REST route inference from naming conventions
|
|
22
|
+
- Server actions with `validated()`
|
|
23
|
+
- Validation with Zod schemas
|
|
24
|
+
- Troubleshooting common errors
|
|
25
|
+
|
|
26
|
+
### `/feature-dev` - Guided Feature Development
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
/feature-dev
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
General-purpose skill for:
|
|
33
|
+
- Codebase understanding and architecture analysis
|
|
34
|
+
- Step-by-step implementation guidance
|
|
35
|
+
- Best practices for VeloxTS patterns
|
|
36
|
+
|
|
5
37
|
## Project Structure
|
|
6
38
|
|
|
7
39
|
```
|
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
This is a VeloxTS full-stack application using React Server Components with JWT Authentication.
|
|
4
4
|
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
Full documentation is available at **[veloxts.dev/docs](https://www.veloxts.dev/docs/)**.
|
|
8
|
+
|
|
9
|
+
## Claude Code Skills
|
|
10
|
+
|
|
11
|
+
When using Claude Code (CLI), these skills are available:
|
|
12
|
+
|
|
13
|
+
### `/veloxts` - VeloxTS Development Assistant
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/veloxts
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
VeloxTS-specific help for:
|
|
20
|
+
- Code generation (`velox make resource`, `velox make procedure`)
|
|
21
|
+
- REST route inference from naming conventions
|
|
22
|
+
- Authentication and guards
|
|
23
|
+
- Server actions with `validated()`
|
|
24
|
+
- Troubleshooting common errors
|
|
25
|
+
|
|
26
|
+
### `/feature-dev` - Guided Feature Development
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
/feature-dev
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
General-purpose skill for:
|
|
33
|
+
- Codebase understanding and architecture analysis
|
|
34
|
+
- Step-by-step implementation guidance
|
|
35
|
+
- Best practices for VeloxTS patterns
|
|
36
|
+
|
|
5
37
|
## Project Structure
|
|
6
38
|
|
|
7
39
|
```
|