create-velox-app 0.3.4 → 0.3.5
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/dist/cli.js +126 -13
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +135 -53
- package/dist/index.js.map +1 -1
- package/dist/templates/auth.d.ts +9 -0
- package/dist/templates/auth.d.ts.map +1 -0
- package/dist/templates/auth.js +1143 -0
- package/dist/templates/auth.js.map +1 -0
- package/dist/templates/default.d.ts +9 -0
- package/dist/templates/default.d.ts.map +1 -0
- package/dist/{templates.js → templates/default.js} +52 -300
- package/dist/templates/default.js.map +1 -0
- package/dist/templates/index.d.ts +20 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +45 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/shared.d.ts +22 -0
- package/dist/templates/shared.d.ts.map +1 -0
- package/dist/templates/shared.js +301 -0
- package/dist/templates/shared.js.map +1 -0
- package/dist/templates/types.d.ts +61 -0
- package/dist/templates/types.d.ts.map +1 -0
- package/dist/templates/types.js +38 -0
- package/dist/templates/types.js.map +1 -0
- package/package.json +1 -1
- package/dist/templates.d.ts +0 -35
- package/dist/templates.d.ts.map +0 -1
- package/dist/templates.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/templates/auth.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnE,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,SAAS,mBAAmB,CAAC,MAAsB;IACjD,OAAO,IAAI,CAAC,SAAS,CACnB;QACE,IAAI,EAAE,MAAM,CAAC,WAAW;QACxB,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,gDAAgD;QAC7D,IAAI,EAAE,QAAQ;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EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,kBAAkB,EAAE,EAAE;QAC7D,EAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,qBAAqB,EAAE,EAAE;QACnE,EAAE,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAE,uBAAuB,EAAE,EAAE;QACvE,EAAE,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAE,sBAAsB,EAAE,EAAE;QACrE,EAAE,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAE,8BAA8B,EAAE,EAAE;QAC9E,EAAE,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,oBAAoB,EAAE,EAAE;QACjE,EAAE,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,kBAAkB,EAAE,EAAE;KAC/D,CAAC;IAEF,mFAAmF;IACnF,MAAM,WAAW,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC,MAAM,CACpD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,qBAAqB,CAC9C,CAAC;IAEF,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,WAAW,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default Template (API Only)
|
|
3
|
+
*
|
|
4
|
+
* Basic REST API template with user CRUD operations.
|
|
5
|
+
* No authentication - suitable for internal APIs or as a starting point.
|
|
6
|
+
*/
|
|
7
|
+
import type { TemplateConfig, TemplateFile } from './types.js';
|
|
8
|
+
export declare function generateDefaultTemplate(config: TemplateConfig): TemplateFile[];
|
|
9
|
+
//# sourceMappingURL=default.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/templates/default.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAqhB/D,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,cAAc,GAAG,YAAY,EAAE,CAsB9E"}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Template
|
|
2
|
+
* Default Template (API Only)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Basic REST API template with user CRUD operations.
|
|
5
|
+
* No authentication - suitable for internal APIs or as a starting point.
|
|
6
6
|
*/
|
|
7
|
+
import { generateSharedFiles, VELOXTS_VERSION } from './shared.js';
|
|
7
8
|
// ============================================================================
|
|
8
|
-
//
|
|
9
|
+
// Package.json
|
|
9
10
|
// ============================================================================
|
|
10
|
-
|
|
11
|
-
* VeloxTS framework version for generated projects.
|
|
12
|
-
* This is automatically updated during releases via changesets.
|
|
13
|
-
*/
|
|
14
|
-
export const VELOXTS_VERSION = '0.3.1';
|
|
15
|
-
// ============================================================================
|
|
16
|
-
// Package.json Template
|
|
17
|
-
// ============================================================================
|
|
18
|
-
export function generatePackageJson(template) {
|
|
11
|
+
function generatePackageJson(config) {
|
|
19
12
|
return JSON.stringify({
|
|
20
|
-
name:
|
|
13
|
+
name: config.projectName,
|
|
21
14
|
version: '0.0.1',
|
|
22
15
|
description: 'A VeloxTS application',
|
|
23
16
|
type: 'module',
|
|
@@ -27,7 +20,7 @@ export function generatePackageJson(template) {
|
|
|
27
20
|
start: 'node dist/index.js',
|
|
28
21
|
dev: 'tsx watch src/index.ts',
|
|
29
22
|
'type-check': 'tsc --noEmit',
|
|
30
|
-
clean:
|
|
23
|
+
clean: "node -e \"require('fs').rmSync('dist',{recursive:true,force:true});require('fs').rmSync('tsconfig.tsbuildinfo',{force:true})\"",
|
|
31
24
|
'db:generate': 'prisma generate',
|
|
32
25
|
'db:push': 'prisma db push',
|
|
33
26
|
'db:studio': 'prisma studio',
|
|
@@ -51,55 +44,9 @@ export function generatePackageJson(template) {
|
|
|
51
44
|
}, null, 2);
|
|
52
45
|
}
|
|
53
46
|
// ============================================================================
|
|
54
|
-
// TypeScript Config
|
|
55
|
-
// ============================================================================
|
|
56
|
-
export function generateTsConfig() {
|
|
57
|
-
return JSON.stringify({
|
|
58
|
-
$schema: 'https://json.schemastore.org/tsconfig',
|
|
59
|
-
compilerOptions: {
|
|
60
|
-
target: 'ES2022',
|
|
61
|
-
module: 'ES2022',
|
|
62
|
-
moduleResolution: 'bundler',
|
|
63
|
-
lib: ['ES2022'],
|
|
64
|
-
strict: true,
|
|
65
|
-
esModuleInterop: true,
|
|
66
|
-
skipLibCheck: true,
|
|
67
|
-
resolveJsonModule: true,
|
|
68
|
-
allowSyntheticDefaultImports: true,
|
|
69
|
-
forceConsistentCasingInFileNames: true,
|
|
70
|
-
isolatedModules: true,
|
|
71
|
-
noUnusedLocals: true,
|
|
72
|
-
noUnusedParameters: true,
|
|
73
|
-
noFallthroughCasesInSwitch: true,
|
|
74
|
-
declaration: false,
|
|
75
|
-
declarationMap: false,
|
|
76
|
-
rootDir: './src',
|
|
77
|
-
outDir: './dist',
|
|
78
|
-
},
|
|
79
|
-
include: ['src/**/*'],
|
|
80
|
-
exclude: ['node_modules', 'dist', '**/*.test.ts', '**/*.spec.ts'],
|
|
81
|
-
}, null, 2);
|
|
82
|
-
}
|
|
83
|
-
// ============================================================================
|
|
84
|
-
// tsup Config
|
|
85
|
-
// ============================================================================
|
|
86
|
-
export function generateTsupConfig() {
|
|
87
|
-
return `import { defineConfig } from 'tsup';
|
|
88
|
-
|
|
89
|
-
export default defineConfig({
|
|
90
|
-
entry: ['src/index.ts'],
|
|
91
|
-
format: ['esm'],
|
|
92
|
-
target: 'node18',
|
|
93
|
-
clean: true,
|
|
94
|
-
dts: false,
|
|
95
|
-
sourcemap: true,
|
|
96
|
-
});
|
|
97
|
-
`;
|
|
98
|
-
}
|
|
99
|
-
// ============================================================================
|
|
100
47
|
// Environment Files
|
|
101
48
|
// ============================================================================
|
|
102
|
-
|
|
49
|
+
function generateEnvExample() {
|
|
103
50
|
return `# Database URL
|
|
104
51
|
# SQLite (local development):
|
|
105
52
|
DATABASE_URL="file:./dev.db"
|
|
@@ -115,47 +62,10 @@ NODE_ENV=development
|
|
|
115
62
|
API_PREFIX=/api
|
|
116
63
|
`;
|
|
117
64
|
}
|
|
118
|
-
export function generateGitignore() {
|
|
119
|
-
return `# Dependencies
|
|
120
|
-
node_modules/
|
|
121
|
-
|
|
122
|
-
# Build output
|
|
123
|
-
dist/
|
|
124
|
-
*.tsbuildinfo
|
|
125
|
-
|
|
126
|
-
# Environment variables
|
|
127
|
-
.env
|
|
128
|
-
.env.local
|
|
129
|
-
|
|
130
|
-
# Database
|
|
131
|
-
*.db
|
|
132
|
-
*.db-journal
|
|
133
|
-
|
|
134
|
-
# Generated Prisma client
|
|
135
|
-
src/generated/
|
|
136
|
-
|
|
137
|
-
# Logs
|
|
138
|
-
logs/
|
|
139
|
-
*.log
|
|
140
|
-
|
|
141
|
-
# OS
|
|
142
|
-
.DS_Store
|
|
143
|
-
Thumbs.db
|
|
144
|
-
|
|
145
|
-
# IDE
|
|
146
|
-
.vscode/
|
|
147
|
-
.idea/
|
|
148
|
-
*.swp
|
|
149
|
-
*.swo
|
|
150
|
-
|
|
151
|
-
# Turbo
|
|
152
|
-
.turbo/
|
|
153
|
-
`;
|
|
154
|
-
}
|
|
155
65
|
// ============================================================================
|
|
156
66
|
// Prisma Schema
|
|
157
67
|
// ============================================================================
|
|
158
|
-
|
|
68
|
+
function generatePrismaSchema() {
|
|
159
69
|
return `// Prisma Schema
|
|
160
70
|
//
|
|
161
71
|
// This schema defines the database structure.
|
|
@@ -187,32 +97,9 @@ model User {
|
|
|
187
97
|
`;
|
|
188
98
|
}
|
|
189
99
|
// ============================================================================
|
|
190
|
-
// Prisma Config (Prisma 7.x)
|
|
191
|
-
// ============================================================================
|
|
192
|
-
export function generatePrismaConfig() {
|
|
193
|
-
return `/**
|
|
194
|
-
* Prisma Configuration (Prisma 7.x)
|
|
195
|
-
*
|
|
196
|
-
* Database URL is now configured here instead of schema.prisma.
|
|
197
|
-
* See: https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-7
|
|
198
|
-
*/
|
|
199
|
-
|
|
200
|
-
import 'dotenv/config';
|
|
201
|
-
import { defineConfig } from 'prisma/config';
|
|
202
|
-
|
|
203
|
-
export default defineConfig({
|
|
204
|
-
earlyAccess: true,
|
|
205
|
-
schema: './prisma/schema.prisma',
|
|
206
|
-
datasource: {
|
|
207
|
-
url: process.env.DATABASE_URL!,
|
|
208
|
-
},
|
|
209
|
-
});
|
|
210
|
-
`;
|
|
211
|
-
}
|
|
212
|
-
// ============================================================================
|
|
213
100
|
// Source Files
|
|
214
101
|
// ============================================================================
|
|
215
|
-
|
|
102
|
+
function generateIndexTs() {
|
|
216
103
|
return `/**
|
|
217
104
|
* Application Entry Point
|
|
218
105
|
*/
|
|
@@ -298,41 +185,7 @@ async function main() {
|
|
|
298
185
|
main();
|
|
299
186
|
`;
|
|
300
187
|
}
|
|
301
|
-
|
|
302
|
-
return `/**
|
|
303
|
-
* Configuration Exports
|
|
304
|
-
*/
|
|
305
|
-
|
|
306
|
-
export * from './app.js';
|
|
307
|
-
`;
|
|
308
|
-
}
|
|
309
|
-
export function generateConfigApp() {
|
|
310
|
-
return `/**
|
|
311
|
-
* Application Configuration
|
|
312
|
-
*/
|
|
313
|
-
|
|
314
|
-
export interface AppConfig {
|
|
315
|
-
port: number;
|
|
316
|
-
host: string;
|
|
317
|
-
logger: boolean;
|
|
318
|
-
apiPrefix: string;
|
|
319
|
-
env: 'development' | 'production' | 'test';
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
export function createConfig(): AppConfig {
|
|
323
|
-
return {
|
|
324
|
-
port: Number(process.env.PORT) || 3210,
|
|
325
|
-
host: process.env.HOST || '0.0.0.0',
|
|
326
|
-
logger: process.env.LOG_LEVEL !== 'silent',
|
|
327
|
-
apiPrefix: process.env.API_PREFIX || '/api',
|
|
328
|
-
env: (process.env.NODE_ENV as AppConfig['env']) || 'development',
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
export const config = createConfig();
|
|
333
|
-
`;
|
|
334
|
-
}
|
|
335
|
-
export function generateDatabaseIndex() {
|
|
188
|
+
function generateDatabaseIndex() {
|
|
336
189
|
return `/**
|
|
337
190
|
* Database Client (Prisma 7.x)
|
|
338
191
|
*
|
|
@@ -357,7 +210,7 @@ const adapter = new PrismaBetterSqlite3({ url: process.env.DATABASE_URL });
|
|
|
357
210
|
export const prisma = new PrismaClient({ adapter });
|
|
358
211
|
`;
|
|
359
212
|
}
|
|
360
|
-
|
|
213
|
+
function generateProceduresIndex() {
|
|
361
214
|
return `/**
|
|
362
215
|
* Procedure Exports
|
|
363
216
|
*/
|
|
@@ -366,34 +219,7 @@ export * from './health.js';
|
|
|
366
219
|
export * from './users.js';
|
|
367
220
|
`;
|
|
368
221
|
}
|
|
369
|
-
|
|
370
|
-
return `/**
|
|
371
|
-
* Health Check Procedures
|
|
372
|
-
*/
|
|
373
|
-
|
|
374
|
-
import { VELOX_VERSION, defineProcedures, procedure, z } from '@veloxts/velox';
|
|
375
|
-
|
|
376
|
-
export const healthProcedures = defineProcedures('health', {
|
|
377
|
-
getHealth: procedure()
|
|
378
|
-
.rest({ method: 'GET', path: '/health' })
|
|
379
|
-
.output(
|
|
380
|
-
z.object({
|
|
381
|
-
status: z.literal('ok'),
|
|
382
|
-
version: z.string(),
|
|
383
|
-
timestamp: z.string().datetime(),
|
|
384
|
-
uptime: z.number(),
|
|
385
|
-
})
|
|
386
|
-
)
|
|
387
|
-
.query(async () => ({
|
|
388
|
-
status: 'ok' as const,
|
|
389
|
-
version: VELOX_VERSION,
|
|
390
|
-
timestamp: new Date().toISOString(),
|
|
391
|
-
uptime: process.uptime(),
|
|
392
|
-
})),
|
|
393
|
-
});
|
|
394
|
-
`;
|
|
395
|
-
}
|
|
396
|
-
export function generateUserProcedures() {
|
|
222
|
+
function generateUserProcedures() {
|
|
397
223
|
return `/**
|
|
398
224
|
* User Procedures
|
|
399
225
|
*/
|
|
@@ -515,7 +341,7 @@ export const userProcedures = defineProcedures('users', {
|
|
|
515
341
|
});
|
|
516
342
|
`;
|
|
517
343
|
}
|
|
518
|
-
|
|
344
|
+
function generateSchemasIndex() {
|
|
519
345
|
return `/**
|
|
520
346
|
* Schema Exports
|
|
521
347
|
*/
|
|
@@ -523,7 +349,7 @@ export function generateSchemasIndex() {
|
|
|
523
349
|
export * from './user.js';
|
|
524
350
|
`;
|
|
525
351
|
}
|
|
526
|
-
|
|
352
|
+
function generateUserSchema() {
|
|
527
353
|
return `/**
|
|
528
354
|
* User Schemas
|
|
529
355
|
*/
|
|
@@ -555,48 +381,17 @@ export const UpdateUserInput = z.object({
|
|
|
555
381
|
export type UpdateUserData = z.infer<typeof UpdateUserInput>;
|
|
556
382
|
`;
|
|
557
383
|
}
|
|
558
|
-
export function generateIndexHtml() {
|
|
559
|
-
return `<!DOCTYPE html>
|
|
560
|
-
<html lang="en">
|
|
561
|
-
<head>
|
|
562
|
-
<meta charset="UTF-8">
|
|
563
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
564
|
-
<title>VeloxTS App</title>
|
|
565
|
-
<style>
|
|
566
|
-
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
567
|
-
body { font-family: system-ui, sans-serif; background: #f5f5f5; padding: 20px; }
|
|
568
|
-
.container { max-width: 800px; margin: 0 auto; }
|
|
569
|
-
h1 { margin-bottom: 20px; color: #333; }
|
|
570
|
-
.card { background: white; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
|
|
571
|
-
.card h2 { margin-bottom: 15px; color: #555; font-size: 1.1rem; }
|
|
572
|
-
button { background: #007bff; color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; }
|
|
573
|
-
button:hover { background: #0056b3; }
|
|
574
|
-
</style>
|
|
575
|
-
</head>
|
|
576
|
-
<body>
|
|
577
|
-
<div class="container">
|
|
578
|
-
<h1>Welcome to VeloxTS</h1>
|
|
579
|
-
<div class="card">
|
|
580
|
-
<h2>Your app is running!</h2>
|
|
581
|
-
<p>Visit <code>/api/health</code> to check the API status.</p>
|
|
582
|
-
<p>Visit <code>/api/users</code> to see the users endpoint.</p>
|
|
583
|
-
</div>
|
|
584
|
-
</div>
|
|
585
|
-
</body>
|
|
586
|
-
</html>
|
|
587
|
-
`;
|
|
588
|
-
}
|
|
589
384
|
// ============================================================================
|
|
590
|
-
//
|
|
385
|
+
// CLAUDE.md
|
|
591
386
|
// ============================================================================
|
|
592
|
-
|
|
387
|
+
function generateClaudeMd(config) {
|
|
593
388
|
return `# CLAUDE.md
|
|
594
389
|
|
|
595
390
|
This file provides guidance to Claude Code and other AI assistants when working with this VeloxTS project.
|
|
596
391
|
|
|
597
392
|
## Project Overview
|
|
598
393
|
|
|
599
|
-
**${projectName}** is a VeloxTS application - a TypeScript full-stack framework built on Fastify, tRPC, Prisma, and Zod.
|
|
394
|
+
**${config.projectName}** is a VeloxTS application - a TypeScript full-stack framework built on Fastify, tRPC, Prisma, and Zod.
|
|
600
395
|
|
|
601
396
|
**Key Characteristics:**
|
|
602
397
|
- Type safety without code generation (direct type imports)
|
|
@@ -607,13 +402,13 @@ This file provides guidance to Claude Code and other AI assistants when working
|
|
|
607
402
|
## Commands
|
|
608
403
|
|
|
609
404
|
\`\`\`bash
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
405
|
+
${config.packageManager} dev # Start development server with hot reload
|
|
406
|
+
${config.packageManager} build # Build for production
|
|
407
|
+
${config.packageManager} start # Run production server
|
|
408
|
+
${config.packageManager} db:push # Push database schema changes
|
|
409
|
+
${config.packageManager} db:generate # Regenerate Prisma client
|
|
410
|
+
${config.packageManager} db:studio # Open Prisma Studio GUI
|
|
411
|
+
${config.packageManager} type-check # Run TypeScript type checking
|
|
617
412
|
\`\`\`
|
|
618
413
|
|
|
619
414
|
## Project Structure
|
|
@@ -650,14 +445,6 @@ Procedure names automatically map to HTTP methods and routes:
|
|
|
650
445
|
| \`deleteUser\` | DELETE | \`/users/:id\` | 200/204 |
|
|
651
446
|
| \`removeUser\` | DELETE | \`/users/:id\` | 200/204 |
|
|
652
447
|
|
|
653
|
-
**Pattern rules:**
|
|
654
|
-
- \`get*\` → GET with ID parameter (single resource)
|
|
655
|
-
- \`list*\` / \`find*\` → GET collection (no ID)
|
|
656
|
-
- \`create*\` / \`add*\` → POST (201 Created)
|
|
657
|
-
- \`update*\` / \`edit*\` → PUT with ID parameter (full update)
|
|
658
|
-
- \`patch*\` → PATCH with ID parameter (partial update)
|
|
659
|
-
- \`delete*\` / \`remove*\` → DELETE with ID parameter (200 OK or 204 No Content)
|
|
660
|
-
|
|
661
448
|
## Creating a New Procedure
|
|
662
449
|
|
|
663
450
|
\`\`\`typescript
|
|
@@ -703,8 +490,8 @@ VeloxTS provides end-to-end type safety without code generation:
|
|
|
703
490
|
|
|
704
491
|
After schema changes:
|
|
705
492
|
\`\`\`bash
|
|
706
|
-
|
|
707
|
-
|
|
493
|
+
${config.packageManager} db:push # Apply changes to database
|
|
494
|
+
${config.packageManager} db:generate # Regenerate client types
|
|
708
495
|
\`\`\`
|
|
709
496
|
|
|
710
497
|
## Environment Variables
|
|
@@ -725,62 +512,27 @@ Configured in \`.env\`:
|
|
|
725
512
|
- Extract to \`src/schemas/\` when shared across procedures
|
|
726
513
|
`;
|
|
727
514
|
}
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
The app will start at http://localhost:3210
|
|
754
|
-
|
|
755
|
-
## Project Structure
|
|
756
|
-
|
|
757
|
-
\`\`\`
|
|
758
|
-
src/
|
|
759
|
-
├── config/ # Application configuration
|
|
760
|
-
├── database/ # Database client
|
|
761
|
-
├── procedures/ # API procedures (business logic)
|
|
762
|
-
├── schemas/ # Zod validation schemas
|
|
763
|
-
└── index.ts # Application entry point
|
|
764
|
-
\`\`\`
|
|
765
|
-
|
|
766
|
-
## Available Scripts
|
|
767
|
-
|
|
768
|
-
- \`pnpm dev\` - Start development server with hot reload
|
|
769
|
-
- \`pnpm build\` - Build for production
|
|
770
|
-
- \`pnpm start\` - Start production server
|
|
771
|
-
- \`pnpm db:push\` - Sync database schema
|
|
772
|
-
- \`pnpm db:studio\` - Open Prisma Studio
|
|
773
|
-
|
|
774
|
-
## Learn More
|
|
775
|
-
|
|
776
|
-
- [VeloxTS Documentation](https://veloxts.dev)
|
|
777
|
-
- [TypeScript](https://www.typescriptlang.org/)
|
|
778
|
-
- [Fastify](https://fastify.dev/)
|
|
779
|
-
- [Prisma](https://www.prisma.io/)
|
|
780
|
-
|
|
781
|
-
## License
|
|
782
|
-
|
|
783
|
-
MIT
|
|
784
|
-
`;
|
|
785
|
-
}
|
|
786
|
-
//# sourceMappingURL=templates.js.map
|
|
515
|
+
// ============================================================================
|
|
516
|
+
// Default Template Generator
|
|
517
|
+
// ============================================================================
|
|
518
|
+
export function generateDefaultTemplate(config) {
|
|
519
|
+
const files = [
|
|
520
|
+
// Root files
|
|
521
|
+
{ path: 'package.json', content: generatePackageJson(config) },
|
|
522
|
+
{ path: '.env.example', content: generateEnvExample() },
|
|
523
|
+
{ path: '.env', content: generateEnvExample() },
|
|
524
|
+
{ path: 'CLAUDE.md', content: generateClaudeMd(config) },
|
|
525
|
+
// Prisma
|
|
526
|
+
{ path: 'prisma/schema.prisma', content: generatePrismaSchema() },
|
|
527
|
+
// Source files
|
|
528
|
+
{ path: 'src/index.ts', content: generateIndexTs() },
|
|
529
|
+
{ path: 'src/database/index.ts', content: generateDatabaseIndex() },
|
|
530
|
+
{ path: 'src/procedures/index.ts', content: generateProceduresIndex() },
|
|
531
|
+
{ path: 'src/procedures/users.ts', content: generateUserProcedures() },
|
|
532
|
+
{ path: 'src/schemas/index.ts', content: generateSchemasIndex() },
|
|
533
|
+
{ path: 'src/schemas/user.ts', content: generateUserSchema() },
|
|
534
|
+
];
|
|
535
|
+
// Add shared files
|
|
536
|
+
return [...files, ...generateSharedFiles(config)];
|
|
537
|
+
}
|
|
538
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../src/templates/default.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnE,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,SAAS,mBAAmB,CAAC,MAAsB;IACjD,OAAO,IAAI,CAAC,SAAS,CACnB;QACE,IAAI,EAAE,MAAM,CAAC,WAAW;QACxB,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE;YACP,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,oBAAoB;YAC3B,GAAG,EAAE,wBAAwB;YAC7B,YAAY,EAAE,cAAc;YAC5B,KAAK,EACH,gIAAgI;YAClI,aAAa,EAAE,iBAAiB;YAChC,SAAS,EAAE,gBAAgB;YAC3B,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,iBAAiB;SAC/B;QACD,YAAY,EAAE;YACZ,iBAAiB,EAAE,QAAQ;YAC3B,gCAAgC,EAAE,QAAQ;YAC1C,gBAAgB,EAAE,QAAQ;YAC1B,gBAAgB,EAAE,IAAI,eAAe,EAAE;YACvC,gBAAgB,EAAE,SAAS;YAC3B,MAAM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AAsB,EAAE,OAAO,EAAE,oBAAoB,EAAE,EAAE;QACjE,EAAE,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,kBAAkB,EAAE,EAAE;KAC/D,CAAC;IAEF,mBAAmB;IACnB,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template Registry
|
|
3
|
+
*
|
|
4
|
+
* Central hub for all project templates.
|
|
5
|
+
*/
|
|
6
|
+
import { VELOXTS_VERSION } from './shared.js';
|
|
7
|
+
import type { TemplateConfig, TemplateFile, TemplateType } from './types.js';
|
|
8
|
+
import { getAvailableTemplates, isValidTemplate, TEMPLATE_METADATA } from './types.js';
|
|
9
|
+
export { VELOXTS_VERSION };
|
|
10
|
+
export type { TemplateConfig, TemplateFile, TemplateMetadata, TemplateType } from './types.js';
|
|
11
|
+
export { getAvailableTemplates, isValidTemplate, TEMPLATE_METADATA };
|
|
12
|
+
/**
|
|
13
|
+
* Generate all files for a given template
|
|
14
|
+
*/
|
|
15
|
+
export declare function generateTemplateFiles(config: TemplateConfig): TemplateFile[];
|
|
16
|
+
/**
|
|
17
|
+
* Get directories that need to be created for the template
|
|
18
|
+
*/
|
|
19
|
+
export declare function getTemplateDirectories(_template: TemplateType): string[];
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAMvF,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,iBAAiB,EAAE,CAAC;AAMrE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,YAAY,EAAE,CAO5E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,YAAY,GAAG,MAAM,EAAE,CAaxE"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template Registry
|
|
3
|
+
*
|
|
4
|
+
* Central hub for all project templates.
|
|
5
|
+
*/
|
|
6
|
+
import { generateAuthTemplate } from './auth.js';
|
|
7
|
+
import { generateDefaultTemplate } from './default.js';
|
|
8
|
+
import { VELOXTS_VERSION } from './shared.js';
|
|
9
|
+
import { getAvailableTemplates, isValidTemplate, TEMPLATE_METADATA } from './types.js';
|
|
10
|
+
// ============================================================================
|
|
11
|
+
// Re-exports
|
|
12
|
+
// ============================================================================
|
|
13
|
+
export { VELOXTS_VERSION };
|
|
14
|
+
export { getAvailableTemplates, isValidTemplate, TEMPLATE_METADATA };
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// Template Generator
|
|
17
|
+
// ============================================================================
|
|
18
|
+
/**
|
|
19
|
+
* Generate all files for a given template
|
|
20
|
+
*/
|
|
21
|
+
export function generateTemplateFiles(config) {
|
|
22
|
+
switch (config.template) {
|
|
23
|
+
case 'auth':
|
|
24
|
+
return generateAuthTemplate(config);
|
|
25
|
+
default:
|
|
26
|
+
return generateDefaultTemplate(config);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get directories that need to be created for the template
|
|
31
|
+
*/
|
|
32
|
+
export function getTemplateDirectories(_template) {
|
|
33
|
+
const baseDirectories = [
|
|
34
|
+
'src',
|
|
35
|
+
'src/config',
|
|
36
|
+
'src/database',
|
|
37
|
+
'src/procedures',
|
|
38
|
+
'src/schemas',
|
|
39
|
+
'prisma',
|
|
40
|
+
'public',
|
|
41
|
+
];
|
|
42
|
+
// All templates use the same directory structure currently
|
|
43
|
+
return baseDirectories;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEvF,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAE/E,OAAO,EAAE,eAAe,EAAE,CAAC;AAG3B,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,iBAAiB,EAAE,CAAC;AAErE,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAsB;IAC1D,QAAQ,MAAM,CAAC,QAAQ,EAAE,CAAC;QACxB,KAAK,MAAM;YACT,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;QACtC;YACE,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,SAAuB;IAC5D,MAAM,eAAe,GAAG;QACtB,KAAK;QACL,YAAY;QACZ,cAAc;QACd,gBAAgB;QAChB,aAAa;QACb,QAAQ;QACR,QAAQ;KACT,CAAC;IAEF,2DAA2D;IAC3D,OAAO,eAAe,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Template Files
|
|
3
|
+
*
|
|
4
|
+
* Common files used by all templates (config, gitignore, etc.)
|
|
5
|
+
*/
|
|
6
|
+
import type { TemplateConfig, TemplateFile } from './types.js';
|
|
7
|
+
/**
|
|
8
|
+
* VeloxTS framework version for generated projects.
|
|
9
|
+
* This is automatically updated during releases via changesets.
|
|
10
|
+
*/
|
|
11
|
+
export declare const VELOXTS_VERSION = "0.3.1";
|
|
12
|
+
export declare function generateTsConfig(): string;
|
|
13
|
+
export declare function generateTsupConfig(): string;
|
|
14
|
+
export declare function generateGitignore(): string;
|
|
15
|
+
export declare function generatePrismaConfig(): string;
|
|
16
|
+
export declare function generateConfigIndex(): string;
|
|
17
|
+
export declare function generateConfigApp(): string;
|
|
18
|
+
export declare function generateHealthProcedures(): string;
|
|
19
|
+
export declare function generateIndexHtml(): string;
|
|
20
|
+
export declare function generateReadme(config: TemplateConfig): string;
|
|
21
|
+
export declare function generateSharedFiles(config: TemplateConfig): TemplateFile[];
|
|
22
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/templates/shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/D;;;GAGG;AACH,eAAO,MAAM,eAAe,UAAU,CAAC;AAMvC,wBAAgB,gBAAgB,IAAI,MAAM,CA8BzC;AAMD,wBAAgB,kBAAkB,IAAI,MAAM,CAY3C;AAMD,wBAAgB,iBAAiB,IAAI,MAAM,CAoC1C;AAMD,wBAAgB,oBAAoB,IAAI,MAAM,CAmB7C;AAMD,wBAAgB,mBAAmB,IAAI,MAAM,CAO5C;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAyB1C;AAMD,wBAAgB,wBAAwB,IAAI,MAAM,CA0BjD;AAMD,wBAAgB,iBAAiB,IAAI,MAAM,CA8B1C;AAMD,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAyD7D;AAMD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,YAAY,EAAE,CAY1E"}
|