create-velox-app 0.6.64 → 0.6.65
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/dist/templates/auth.js +0 -8
- package/dist/templates/shared/root.d.ts +7 -0
- package/dist/templates/shared/root.js +32 -0
- package/dist/templates/spa.js +0 -8
- package/dist/templates/trpc.js +0 -8
- package/package.json +1 -1
- package/src/templates/source/root/.claude/skills/veloxts/GENERATORS.md +313 -0
- package/src/templates/source/root/.claude/skills/veloxts/PROCEDURES.md +466 -0
- package/src/templates/source/root/.claude/skills/veloxts/SKILL.md +225 -0
- package/src/templates/source/root/.claude/skills/veloxts/TROUBLESHOOTING.md +416 -0
- package/src/templates/source/root/CLAUDE.auth.md +33 -1
- package/src/templates/source/root/CLAUDE.default.md +33 -1
- package/src/templates/source/root/CLAUDE.trpc.md +20 -0
- package/src/templates/source/rsc/CLAUDE.md +19 -0
- package/src/templates/source/rsc-auth/CLAUDE.md +19 -0
- package/src/templates/source/web/api.ts +4 -5
- package/src/templates/source/web/main.tsx +2 -2
- package/src/templates/source/web/routes/__root.tsx +1 -1
- package/src/templates/source/api/router.types.auth.ts +0 -88
- package/src/templates/source/api/router.types.default.ts +0 -73
- package/src/templates/source/api/router.types.trpc.ts +0 -73
- package/src/templates/source/api/routes.auth.ts +0 -66
- package/src/templates/source/api/routes.default.ts +0 -53
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Router Types - Browser-Safe Type Definitions
|
|
3
|
-
*
|
|
4
|
-
* BROWSER-SAFE: This file imports ONLY from schemas/ and zod.
|
|
5
|
-
* Never import from procedures/ or @veloxts/* packages here.
|
|
6
|
-
*
|
|
7
|
-
* Uses inline contract definitions for automatic type inference from Zod schemas.
|
|
8
|
-
* This provides "Great DX" - one line per procedure instead of verbose type definitions.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { z } from 'zod';
|
|
12
|
-
|
|
13
|
-
import * as AuthSchemas from './schemas/auth.js';
|
|
14
|
-
import * as HealthSchemas from './schemas/health.js';
|
|
15
|
-
import * as UserSchemas from './schemas/user.js';
|
|
16
|
-
|
|
17
|
-
// ============================================================================
|
|
18
|
-
// Contract Helper (Browser-Safe)
|
|
19
|
-
// ============================================================================
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Type-safe contract definition helper.
|
|
23
|
-
* Provides autocomplete and type inference without importing @veloxts/router.
|
|
24
|
-
*/
|
|
25
|
-
type ContractEntry = {
|
|
26
|
-
input?: z.ZodType;
|
|
27
|
-
output?: z.ZodType;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const defineContract = <T extends Record<string, ContractEntry>>(contracts: T): T => contracts;
|
|
31
|
-
|
|
32
|
-
// ============================================================================
|
|
33
|
-
// Health Contracts
|
|
34
|
-
// ============================================================================
|
|
35
|
-
|
|
36
|
-
export const healthContracts = defineContract({
|
|
37
|
-
getHealth: { output: HealthSchemas.HealthResponse },
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
// ============================================================================
|
|
41
|
-
// User Contracts
|
|
42
|
-
// ============================================================================
|
|
43
|
-
|
|
44
|
-
export const userContracts = defineContract({
|
|
45
|
-
getUser: { input: UserSchemas.GetUserInput, output: UserSchemas.UserSchema },
|
|
46
|
-
listUsers: { input: UserSchemas.ListUsersInput, output: UserSchemas.ListUsersResponse },
|
|
47
|
-
createUser: { input: UserSchemas.CreateUserInput, output: UserSchemas.UserSchema },
|
|
48
|
-
updateUser: {
|
|
49
|
-
input: UserSchemas.UpdateUserInput.extend({ id: z.string().uuid() }),
|
|
50
|
-
output: UserSchemas.UserSchema,
|
|
51
|
-
},
|
|
52
|
-
patchUser: {
|
|
53
|
-
input: UserSchemas.UpdateUserInput.extend({ id: z.string().uuid() }),
|
|
54
|
-
output: UserSchemas.UserSchema,
|
|
55
|
-
},
|
|
56
|
-
deleteUser: {
|
|
57
|
-
input: z.object({ id: z.string().uuid() }),
|
|
58
|
-
output: z.object({ success: z.boolean() }),
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
// ============================================================================
|
|
63
|
-
// Auth Contracts
|
|
64
|
-
// ============================================================================
|
|
65
|
-
|
|
66
|
-
export const authContracts = defineContract({
|
|
67
|
-
createAccount: { input: AuthSchemas.RegisterInput, output: AuthSchemas.TokenResponse },
|
|
68
|
-
createSession: { input: AuthSchemas.LoginInput, output: AuthSchemas.TokenResponse },
|
|
69
|
-
createRefresh: { input: AuthSchemas.RefreshInput, output: AuthSchemas.TokenResponse },
|
|
70
|
-
deleteSession: { output: AuthSchemas.LogoutResponse },
|
|
71
|
-
getMe: { output: AuthSchemas.UserResponse },
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
// ============================================================================
|
|
75
|
-
// AppRouter Type - Automatic Inference
|
|
76
|
-
// ============================================================================
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* The complete router type, inferred from contracts.
|
|
80
|
-
*
|
|
81
|
-
* This replaces 50+ lines of manual type definitions with automatic inference.
|
|
82
|
-
* Each contract's input/output types are automatically extracted from Zod schemas.
|
|
83
|
-
*/
|
|
84
|
-
export type AppRouter = {
|
|
85
|
-
health: typeof healthContracts;
|
|
86
|
-
users: typeof userContracts;
|
|
87
|
-
auth: typeof authContracts;
|
|
88
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Router Types - Browser-Safe Type Definitions
|
|
3
|
-
*
|
|
4
|
-
* BROWSER-SAFE: This file imports ONLY from schemas/ and zod.
|
|
5
|
-
* Never import from procedures/ or @veloxts/* packages here.
|
|
6
|
-
*
|
|
7
|
-
* Uses inline contract definitions for automatic type inference from Zod schemas.
|
|
8
|
-
* This provides "Great DX" - one line per procedure instead of verbose type definitions.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { z } from 'zod';
|
|
12
|
-
|
|
13
|
-
import * as HealthSchemas from './schemas/health.js';
|
|
14
|
-
import * as UserSchemas from './schemas/user.js';
|
|
15
|
-
|
|
16
|
-
// ============================================================================
|
|
17
|
-
// Contract Helper (Browser-Safe)
|
|
18
|
-
// ============================================================================
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Type-safe contract definition helper.
|
|
22
|
-
* Provides autocomplete and type inference without importing @veloxts/router.
|
|
23
|
-
*/
|
|
24
|
-
type ContractEntry = {
|
|
25
|
-
input?: z.ZodType;
|
|
26
|
-
output?: z.ZodType;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const defineContract = <T extends Record<string, ContractEntry>>(contracts: T): T => contracts;
|
|
30
|
-
|
|
31
|
-
// ============================================================================
|
|
32
|
-
// Health Contracts
|
|
33
|
-
// ============================================================================
|
|
34
|
-
|
|
35
|
-
export const healthContracts = defineContract({
|
|
36
|
-
getHealth: { output: HealthSchemas.HealthResponse },
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
// ============================================================================
|
|
40
|
-
// User Contracts
|
|
41
|
-
// ============================================================================
|
|
42
|
-
|
|
43
|
-
export const userContracts = defineContract({
|
|
44
|
-
getUser: { input: UserSchemas.GetUserInput, output: UserSchemas.UserSchema },
|
|
45
|
-
listUsers: { input: UserSchemas.ListUsersInput, output: UserSchemas.ListUsersResponse },
|
|
46
|
-
createUser: { input: UserSchemas.CreateUserInput, output: UserSchemas.UserSchema },
|
|
47
|
-
updateUser: {
|
|
48
|
-
input: UserSchemas.UpdateUserInput.extend({ id: z.string().uuid() }),
|
|
49
|
-
output: UserSchemas.UserSchema,
|
|
50
|
-
},
|
|
51
|
-
patchUser: {
|
|
52
|
-
input: UserSchemas.UpdateUserInput.extend({ id: z.string().uuid() }),
|
|
53
|
-
output: UserSchemas.UserSchema,
|
|
54
|
-
},
|
|
55
|
-
deleteUser: {
|
|
56
|
-
input: z.object({ id: z.string().uuid() }),
|
|
57
|
-
output: z.object({ success: z.boolean() }),
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// ============================================================================
|
|
62
|
-
// AppRouter Type - Automatic Inference
|
|
63
|
-
// ============================================================================
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* The complete router type, inferred from contracts.
|
|
67
|
-
*
|
|
68
|
-
* This replaces manual type definitions with automatic inference from Zod schemas.
|
|
69
|
-
*/
|
|
70
|
-
export type AppRouter = {
|
|
71
|
-
health: typeof healthContracts;
|
|
72
|
-
users: typeof userContracts;
|
|
73
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Router Types - Browser-Safe Type Definitions
|
|
3
|
-
*
|
|
4
|
-
* BROWSER-SAFE: This file imports ONLY from schemas/ and zod.
|
|
5
|
-
* Never import from procedures/ or @veloxts/* packages here.
|
|
6
|
-
*
|
|
7
|
-
* Uses inline contract definitions for automatic type inference from Zod schemas.
|
|
8
|
-
* This provides "Great DX" - one line per procedure instead of verbose type definitions.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { z } from 'zod';
|
|
12
|
-
|
|
13
|
-
import * as HealthSchemas from './schemas/health.js';
|
|
14
|
-
import * as UserSchemas from './schemas/user.js';
|
|
15
|
-
|
|
16
|
-
// ============================================================================
|
|
17
|
-
// Contract Helper (Browser-Safe)
|
|
18
|
-
// ============================================================================
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Type-safe contract definition helper.
|
|
22
|
-
* Provides autocomplete and type inference without importing @veloxts/router.
|
|
23
|
-
*/
|
|
24
|
-
type ContractEntry = {
|
|
25
|
-
input?: z.ZodType;
|
|
26
|
-
output?: z.ZodType;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const defineContract = <T extends Record<string, ContractEntry>>(contracts: T): T => contracts;
|
|
30
|
-
|
|
31
|
-
// ============================================================================
|
|
32
|
-
// Health Contracts
|
|
33
|
-
// ============================================================================
|
|
34
|
-
|
|
35
|
-
export const healthContracts = defineContract({
|
|
36
|
-
getHealth: { output: HealthSchemas.HealthResponse },
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
// ============================================================================
|
|
40
|
-
// User Contracts
|
|
41
|
-
// ============================================================================
|
|
42
|
-
|
|
43
|
-
export const userContracts = defineContract({
|
|
44
|
-
getUser: { input: UserSchemas.GetUserInput, output: UserSchemas.UserSchema },
|
|
45
|
-
listUsers: { input: UserSchemas.ListUsersInput, output: UserSchemas.ListUsersResponse },
|
|
46
|
-
createUser: { input: UserSchemas.CreateUserInput, output: UserSchemas.UserSchema },
|
|
47
|
-
updateUser: {
|
|
48
|
-
input: UserSchemas.UpdateUserInput.extend({ id: z.string().uuid() }),
|
|
49
|
-
output: UserSchemas.UserSchema,
|
|
50
|
-
},
|
|
51
|
-
patchUser: {
|
|
52
|
-
input: UserSchemas.UpdateUserInput.extend({ id: z.string().uuid() }),
|
|
53
|
-
output: UserSchemas.UserSchema,
|
|
54
|
-
},
|
|
55
|
-
deleteUser: {
|
|
56
|
-
input: z.object({ id: z.string().uuid() }),
|
|
57
|
-
output: z.object({ success: z.boolean() }),
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// ============================================================================
|
|
62
|
-
// AppRouter Type - Automatic Inference
|
|
63
|
-
// ============================================================================
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* The complete router type, inferred from contracts.
|
|
67
|
-
*
|
|
68
|
-
* This replaces manual type definitions with automatic inference from Zod schemas.
|
|
69
|
-
*/
|
|
70
|
-
export type AppRouter = {
|
|
71
|
-
health: typeof healthContracts;
|
|
72
|
-
users: typeof userContracts;
|
|
73
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Routes - Browser-Safe Route Definitions
|
|
3
|
-
*
|
|
4
|
-
* BROWSER-SAFE: This file contains only static route metadata.
|
|
5
|
-
* Never import from procedures/ or @veloxts/* packages here.
|
|
6
|
-
*
|
|
7
|
-
* These route mappings tell the frontend client how to call each procedure.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
// ============================================================================
|
|
11
|
-
// Route Helper (Browser-Safe)
|
|
12
|
-
// ============================================================================
|
|
13
|
-
|
|
14
|
-
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
15
|
-
|
|
16
|
-
type RouteEntry = {
|
|
17
|
-
method: HttpMethod;
|
|
18
|
-
path: string;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const defineRoutes = <T extends Record<string, RouteEntry>>(routes: T): T => routes;
|
|
22
|
-
|
|
23
|
-
// ============================================================================
|
|
24
|
-
// Health Routes
|
|
25
|
-
// ============================================================================
|
|
26
|
-
|
|
27
|
-
export const healthRoutes = defineRoutes({
|
|
28
|
-
getHealth: { method: 'GET', path: '/health' },
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// ============================================================================
|
|
32
|
-
// Auth Routes
|
|
33
|
-
// ============================================================================
|
|
34
|
-
|
|
35
|
-
export const authRoutes = defineRoutes({
|
|
36
|
-
createAccount: { method: 'POST', path: '/auth/register' },
|
|
37
|
-
createSession: { method: 'POST', path: '/auth/login' },
|
|
38
|
-
createRefresh: { method: 'POST', path: '/auth/refresh' },
|
|
39
|
-
deleteSession: { method: 'POST', path: '/auth/logout' },
|
|
40
|
-
getMe: { method: 'GET', path: '/auth/me' },
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
// ============================================================================
|
|
44
|
-
// User Routes
|
|
45
|
-
// ============================================================================
|
|
46
|
-
|
|
47
|
-
export const userRoutes = defineRoutes({
|
|
48
|
-
getUser: { method: 'GET', path: '/users/:id' },
|
|
49
|
-
listUsers: { method: 'GET', path: '/users' },
|
|
50
|
-
createUser: { method: 'POST', path: '/users' },
|
|
51
|
-
updateUser: { method: 'PUT', path: '/users/:id' },
|
|
52
|
-
patchUser: { method: 'PATCH', path: '/users/:id' },
|
|
53
|
-
deleteUser: { method: 'DELETE', path: '/users/:id' },
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
// ============================================================================
|
|
57
|
-
// Combined Routes Export
|
|
58
|
-
// ============================================================================
|
|
59
|
-
|
|
60
|
-
export const routes = {
|
|
61
|
-
health: healthRoutes,
|
|
62
|
-
auth: authRoutes,
|
|
63
|
-
users: userRoutes,
|
|
64
|
-
} as const;
|
|
65
|
-
|
|
66
|
-
export type Routes = typeof routes;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Routes - Browser-Safe Route Definitions
|
|
3
|
-
*
|
|
4
|
-
* BROWSER-SAFE: This file contains only static route metadata.
|
|
5
|
-
* Never import from procedures/ or @veloxts/* packages here.
|
|
6
|
-
*
|
|
7
|
-
* These route mappings tell the frontend client how to call each procedure.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
// ============================================================================
|
|
11
|
-
// Route Helper (Browser-Safe)
|
|
12
|
-
// ============================================================================
|
|
13
|
-
|
|
14
|
-
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
15
|
-
|
|
16
|
-
type RouteEntry = {
|
|
17
|
-
method: HttpMethod;
|
|
18
|
-
path: string;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const defineRoutes = <T extends Record<string, RouteEntry>>(routes: T): T => routes;
|
|
22
|
-
|
|
23
|
-
// ============================================================================
|
|
24
|
-
// Health Routes
|
|
25
|
-
// ============================================================================
|
|
26
|
-
|
|
27
|
-
export const healthRoutes = defineRoutes({
|
|
28
|
-
getHealth: { method: 'GET', path: '/health' },
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// ============================================================================
|
|
32
|
-
// User Routes
|
|
33
|
-
// ============================================================================
|
|
34
|
-
|
|
35
|
-
export const userRoutes = defineRoutes({
|
|
36
|
-
getUser: { method: 'GET', path: '/users/:id' },
|
|
37
|
-
listUsers: { method: 'GET', path: '/users' },
|
|
38
|
-
createUser: { method: 'POST', path: '/users' },
|
|
39
|
-
updateUser: { method: 'PUT', path: '/users/:id' },
|
|
40
|
-
patchUser: { method: 'PATCH', path: '/users/:id' },
|
|
41
|
-
deleteUser: { method: 'DELETE', path: '/users/:id' },
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
// ============================================================================
|
|
45
|
-
// Combined Routes Export
|
|
46
|
-
// ============================================================================
|
|
47
|
-
|
|
48
|
-
export const routes = {
|
|
49
|
-
health: healthRoutes,
|
|
50
|
-
users: userRoutes,
|
|
51
|
-
} as const;
|
|
52
|
-
|
|
53
|
-
export type Routes = typeof routes;
|