@vc-shell/create-vc-app 1.1.99-alpha.1 → 1.2.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.
Files changed (83) hide show
  1. package/README.md +26 -552
  2. package/dist/index.js +530 -1900
  3. package/dist/templates/base/_package.json +5 -5
  4. package/dist/templates/base/src/main.ts +4 -0
  5. package/dist/templates/mocks/sample-data/constants.ts +89 -0
  6. package/dist/templates/mocks/sample-data/index.ts +2 -0
  7. package/dist/templates/mocks/sample-data/methods.ts +65 -0
  8. package/dist/templates/modules/classic-module/composables/index.ts +2 -0
  9. package/dist/templates/modules/classic-module/composables/use{{ModuleNamePascalCase}}Details/index.ts +24 -0
  10. package/dist/templates/modules/classic-module/composables/use{{ModuleNamePascalCase}}List/index.ts +47 -0
  11. package/dist/templates/modules/classic-module/index.ts +8 -0
  12. package/dist/templates/modules/classic-module/locales/en.json +37 -0
  13. package/dist/templates/modules/classic-module/locales/index.ts +2 -0
  14. package/dist/templates/modules/classic-module/pages/details.vue +87 -0
  15. package/dist/templates/modules/classic-module/pages/index.ts +2 -0
  16. package/dist/templates/modules/classic-module/pages/list.vue +257 -0
  17. package/dist/templates/sample/classic-module/composables/index.ts +2 -0
  18. package/dist/templates/sample/classic-module/composables/useDetails/index.ts +54 -0
  19. package/dist/templates/sample/classic-module/composables/useList/index.ts +62 -0
  20. package/dist/templates/sample/classic-module/index.ts +8 -0
  21. package/dist/templates/sample/classic-module/locales/en.json +67 -0
  22. package/dist/templates/sample/classic-module/locales/index.ts +2 -0
  23. package/dist/templates/sample/classic-module/pages/details.vue +238 -0
  24. package/dist/templates/sample/classic-module/pages/index.ts +2 -0
  25. package/dist/templates/sample/classic-module/pages/list.vue +300 -0
  26. package/dist/templates/sample/overrides/main.ts +52 -0
  27. package/package.json +7 -12
  28. package/dist/cli/argv.d.ts +0 -4
  29. package/dist/cli/argv.d.ts.map +0 -1
  30. package/dist/cli/constants.d.ts +0 -4
  31. package/dist/cli/constants.d.ts.map +0 -1
  32. package/dist/cli/errors.d.ts +0 -12
  33. package/dist/cli/errors.d.ts.map +0 -1
  34. package/dist/cli/help.d.ts +0 -3
  35. package/dist/cli/help.d.ts.map +0 -1
  36. package/dist/cli/run.d.ts +0 -2
  37. package/dist/cli/run.d.ts.map +0 -1
  38. package/dist/cli/runtime.d.ts +0 -7
  39. package/dist/cli/runtime.d.ts.map +0 -1
  40. package/dist/cli/types.d.ts +0 -30
  41. package/dist/cli/types.d.ts.map +0 -1
  42. package/dist/cli/utils.d.ts +0 -4
  43. package/dist/cli/utils.d.ts.map +0 -1
  44. package/dist/cli/validation.d.ts +0 -5
  45. package/dist/cli/validation.d.ts.map +0 -1
  46. package/dist/commands/generate-blade.d.ts +0 -16
  47. package/dist/commands/generate-blade.d.ts.map +0 -1
  48. package/dist/templates/base/ai-guides/.cursorrules-vc-shell +0 -529
  49. package/dist/templates/base/ai-guides/README.md +0 -360
  50. package/dist/templates/base/ai-guides/guides/AI_GUIDE.md +0 -195
  51. package/dist/templates/base/ai-guides/guides/blade-patterns.md +0 -384
  52. package/dist/templates/base/ai-guides/guides/complete-workflow.md +0 -781
  53. package/dist/templates/base/ai-guides/guides/composables-reference.md +0 -338
  54. package/dist/templates/base/ai-guides/guides/troubleshooting.md +0 -529
  55. package/dist/templates/base/ai-guides/guides/ui-components-reference.md +0 -903
  56. package/dist/templates/base/ai-guides/prompts/adapt-existing-module.md +0 -1026
  57. package/dist/templates/base/ai-guides/prompts/advanced-scenarios.md +0 -852
  58. package/dist/templates/base/ai-guides/prompts/api-client-generation.md +0 -877
  59. package/dist/templates/base/ai-guides/prompts/cli-usage.md +0 -640
  60. package/dist/templates/base/ai-guides/prompts/quick-start-scenarios.md +0 -773
  61. package/dist/templates/base/ai-guides/prompts/simple-modifications.md +0 -987
  62. package/dist/templates/blades/details/blade.vue +0 -175
  63. package/dist/templates/blades/grid/blade.vue +0 -340
  64. package/dist/templates/composables/details-composable.ts +0 -101
  65. package/dist/templates/composables/grid-composable.ts +0 -244
  66. package/dist/templates/module/components/index.ts +0 -2
  67. package/dist/templates/module/components/widgets/index.ts +0 -2
  68. package/dist/templates/module/composables/index.ts +0 -3
  69. package/dist/templates/module/index.ts +0 -13
  70. package/dist/templates/module/locales/en.json +0 -65
  71. package/dist/templates/module/locales/index.ts +0 -4
  72. package/dist/templates/module/pages/index.ts +0 -3
  73. package/dist/templates/widgets/widget.vue +0 -113
  74. package/dist/utils/form-builder.d.ts +0 -69
  75. package/dist/utils/form-builder.d.ts.map +0 -1
  76. package/dist/utils/format.d.ts +0 -24
  77. package/dist/utils/format.d.ts.map +0 -1
  78. package/dist/utils/naming.d.ts +0 -44
  79. package/dist/utils/naming.d.ts.map +0 -1
  80. package/dist/utils/register-module.d.ts +0 -21
  81. package/dist/utils/register-module.d.ts.map +0 -1
  82. package/dist/workflows/create-app.d.ts +0 -14
  83. package/dist/workflows/create-app.d.ts.map +0 -1
@@ -1,640 +0,0 @@
1
- # CLI Usage Guide
2
-
3
- Complete reference for using `create-vc-app` CLI tool to scaffold applications and generate modules.
4
-
5
- ## When to Use This
6
-
7
- Use these prompts when you need to:
8
- - Create a new VC Shell application
9
- - Generate modules, blades, or widgets
10
- - Add functionality to existing projects
11
- - Automate module creation with specific configurations
12
-
13
- ## Prerequisites
14
-
15
- - Node.js 18 or higher installed
16
- - Understanding of your project requirements
17
- - API structure (if integrating with backend)
18
-
19
- ## Quick Reference
20
-
21
- ### Create New Application
22
-
23
- **Interactive Mode (Recommended for first-time users):**
24
- ```bash
25
- npx create-vc-app my-app
26
- ```
27
-
28
- **Non-Interactive Mode:**
29
- ```bash
30
- npx create-vc-app my-app \
31
- --package-name "my-app" \
32
- --base-path "/apps/my-app/" \
33
- --skip-module-gen
34
- ```
35
-
36
- ### Generate Module
37
-
38
- **Interactive Mode:**
39
- ```bash
40
- cd my-app
41
- npx create-vc-app blade
42
- # Select: "Module (with blades)"
43
- ```
44
-
45
- **Non-Interactive Mode:**
46
- ```bash
47
- npx create-vc-app blade \
48
- --module products \
49
- --type grid \
50
- --name products-list \
51
- --composable \
52
- --locales \
53
- --is-workspace
54
- ```
55
-
56
- ---
57
-
58
- ## Detailed Examples
59
-
60
- ### 1. Create New Application with Module
61
-
62
- **Scenario:** Starting completely from scratch
63
-
64
- **Prompt for AI:**
65
- ```
66
- Create a new VC Shell application called "my-shop" with a products module.
67
-
68
- The products module should have:
69
- - Grid blade (list view) with table
70
- - Details blade (form view) with these fields:
71
- - name (text, required)
72
- - price (currency, required)
73
- - description (editor, optional)
74
- - category (select: Electronics, Clothing, Books)
75
- - inStock (switch toggle)
76
-
77
- Use the CLI to generate everything.
78
- ```
79
-
80
- **AI will run:**
81
- ```bash
82
- # Create app
83
- npx create-vc-app my-shop
84
-
85
- # Then follow interactive prompts:
86
- # - Module name: products
87
- # - Entity name: Product
88
- # - Create both blades: yes
89
- # - Workspace blade: Grid blade
90
- # - Customize form: yes
91
- # - Add fields as specified
92
- ```
93
-
94
- ---
95
-
96
- ### 2. Add Module to Existing Application
97
-
98
- **Scenario:** You have an app, need to add new module
99
-
100
- **Prompt for AI:**
101
- ```
102
- Add an orders module to my existing application.
103
-
104
- Requirements:
105
- - Grid blade with columns: orderNumber, customer, total, status, date
106
- - Details blade with form fields:
107
- - orderNumber (text, read-only)
108
- - customer (text, required)
109
- - total (currency, required)
110
- - status (select: pending, processing, shipped, delivered)
111
- - orderDate (date, required)
112
- - notes (textarea, optional)
113
-
114
- Generate using CLI.
115
- ```
116
-
117
- **AI will run:**
118
- ```bash
119
- cd /path/to/your-app
120
-
121
- npx create-vc-app blade \
122
- --module orders \
123
- --type grid \
124
- --name orders-list \
125
- --composable \
126
- --locales \
127
- --is-workspace
128
-
129
- # Then add details blade
130
- npx create-vc-app blade \
131
- --module orders \
132
- --type details \
133
- --name order-details \
134
- --composable \
135
- --locales \
136
- --form-fields '[
137
- {"name":"orderNumber","type":"VcInput","props":"{\"required\":true,\"readonly\":true}"},
138
- {"name":"customer","type":"VcInput","props":"{\"required\":true}"},
139
- {"name":"total","type":"VcInputCurrency","props":"{\"required\":true}"},
140
- {"name":"status","type":"VcSelect","props":"{\"required\":true,\"options\":\"pending,processing,shipped,delivered\"}"},
141
- {"name":"orderDate","type":"VcInput","props":"{\"type\":\"date\",\"required\":true}"},
142
- {"name":"notes","type":"VcTextarea","props":"{}"}
143
- ]'
144
- ```
145
-
146
- ---
147
-
148
- ### 3. Generate Module with Custom Form (Non-Interactive)
149
-
150
- **Scenario:** Automated generation with specific form structure
151
-
152
- **Prompt for AI:**
153
- ```
154
- Generate a complete products module using CLI in non-interactive mode.
155
-
156
- Form fields:
157
- - title (text input, required)
158
- - sku (text input, required)
159
- - description (rich text editor)
160
- - price (currency input, required)
161
- - compareAtPrice (currency input)
162
- - category (select dropdown with options: Electronics, Clothing, Books, Home)
163
- - tags (multivalue input)
164
- - featured (switch toggle)
165
- - images (gallery)
166
- - status (radio buttons: draft, active, archived)
167
-
168
- Create both list and details blades.
169
- ```
170
-
171
- **AI will run:**
172
- ```bash
173
- npx create-vc-app blade \
174
- --module products \
175
- --type grid \
176
- --name products \
177
- --composable \
178
- --locales \
179
- --is-workspace
180
-
181
- npx create-vc-app blade \
182
- --module products \
183
- --type details \
184
- --name product-details \
185
- --composable \
186
- --locales \
187
- --skip-form-editor \
188
- --form-fields '[
189
- {"name":"title","label":"Product Title","type":"VcInput","props":"{\"required\":true}"},
190
- {"name":"sku","label":"SKU","type":"VcInput","props":"{\"required\":true}"},
191
- {"name":"description","label":"Description","type":"VcEditor","props":"{}"},
192
- {"name":"price","label":"Price","type":"VcInputCurrency","props":"{\"required\":true}"},
193
- {"name":"compareAtPrice","label":"Compare at Price","type":"VcInputCurrency","props":"{}"},
194
- {"name":"category","label":"Category","type":"VcSelect","props":"{\"required\":true,\"options\":\"Electronics,Clothing,Books,Home\"}"},
195
- {"name":"tags","label":"Tags","type":"VcMultivalue","props":"{}"},
196
- {"name":"featured","label":"Featured","type":"VcSwitch","props":"{}"},
197
- {"name":"images","label":"Images","type":"VcGallery","props":"{}"},
198
- {"name":"status","label":"Status","type":"VcRadioButton","props":"{\"options\":\"draft,active,archived\"}"}
199
- ]'
200
- ```
201
-
202
- ---
203
-
204
- ### 4. Add Widget to Existing Blade
205
-
206
- **Scenario:** Enhance blade with widget component
207
-
208
- **Prompt for AI:**
209
- ```
210
- Add a statistics widget to the product-details blade.
211
-
212
- The widget should:
213
- - Show product views count
214
- - Show sales count
215
- - Show revenue
216
- - Be positioned on the right side
217
-
218
- Use CLI to generate and register the widget.
219
- ```
220
-
221
- **AI will run:**
222
- ```bash
223
- npx create-vc-app blade --widget
224
-
225
- # Interactive prompts:
226
- # - Select module: products
227
- # - Select blade: product-details
228
- # - Widget name: product-stats
229
- ```
230
-
231
- ---
232
-
233
- ### 5. Generate Only Grid Blade (List Only)
234
-
235
- **Scenario:** You only need a list view, no details
236
-
237
- **Prompt for AI:**
238
- ```
239
- Create a categories module with only a list view (no details blade).
240
-
241
- List should show:
242
- - Category name
243
- - Number of products
244
- - Status (active/inactive)
245
- - Last modified date
246
-
247
- Use CLI.
248
- ```
249
-
250
- **AI will run:**
251
- ```bash
252
- npx create-vc-app blade \
253
- --module categories \
254
- --type grid \
255
- --name categories \
256
- --composable \
257
- --locales \
258
- --is-workspace
259
- ```
260
-
261
- ---
262
-
263
- ### 6. Generate Only Details Blade (Form Only)
264
-
265
- **Scenario:** You need a settings page (form without list)
266
-
267
- **Prompt for AI:**
268
- ```
269
- Create a settings module with only a details form (no list).
270
-
271
- Form fields:
272
- - storeName (text, required)
273
- - storeEmail (text, required, email validation)
274
- - currency (select: USD, EUR, GBP)
275
- - timezone (select with multiple options)
276
- - enableNotifications (switch)
277
- - maintenanceMode (switch)
278
-
279
- Use CLI.
280
- ```
281
-
282
- **AI will run:**
283
- ```bash
284
- npx create-vc-app blade \
285
- --module settings \
286
- --type details \
287
- --name settings \
288
- --composable \
289
- --locales \
290
- --is-workspace \
291
- --form-fields '[
292
- {"name":"storeName","label":"Store Name","type":"VcInput","props":"{\"required\":true}"},
293
- {"name":"storeEmail","label":"Store Email","type":"VcInput","props":"{\"required\":true,\"type\":\"email\"}"},
294
- {"name":"currency","label":"Currency","type":"VcSelect","props":"{\"required\":true,\"options\":\"USD,EUR,GBP\"}"},
295
- {"name":"timezone","label":"Timezone","type":"VcSelect","props":"{\"required\":true}"},
296
- {"name":"enableNotifications","label":"Enable Notifications","type":"VcSwitch","props":"{}"},
297
- {"name":"maintenanceMode","label":"Maintenance Mode","type":"VcSwitch","props":"{}"}
298
- ]'
299
- ```
300
-
301
- ---
302
-
303
- ## CLI Command Reference
304
-
305
- ### Application Creation
306
-
307
- ```bash
308
- npx create-vc-app [project-name] [options]
309
- ```
310
-
311
- **Options:**
312
- - `--name, --app-name <name>` - Application name
313
- - `--package-name <name>` - Package name (defaults to app name)
314
- - `--base-path <path>` - Base path for the application (default: /apps/<app-name>/)
315
- - `--skip-module-gen` - Skip initial module generation
316
- - `--skip-form-editor` - Skip interactive form builder
317
- - `--form-fields <json>` - JSON string with form field definitions
318
- - `--overwrite` - Overwrite existing files without confirmation
319
- - `--help, -h` - Show help
320
- - `--version, -v` - Show version
321
-
322
- **Examples:**
323
- ```bash
324
- # Basic app
325
- npx create-vc-app my-app
326
-
327
- # App without module
328
- npx create-vc-app my-app --skip-module-gen
329
-
330
- # App with custom base path
331
- npx create-vc-app my-app --base-path "/custom/path/"
332
- ```
333
-
334
- ---
335
-
336
- ### Module/Blade Generation
337
-
338
- ```bash
339
- npx create-vc-app blade [options]
340
- ```
341
-
342
- **Options:**
343
- - `--module <name>` - Target module name
344
- - `--type <grid|details>` - Blade type
345
- - `--name <name>` - Blade name
346
- - `--composable` - Generate composable (default: true)
347
- - `--locales` - Generate locales (default: true)
348
- - `--is-workspace` - Mark blade as workspace blade (main module blade)
349
- - `--widget` - Generate widget instead of blade
350
- - `--path <path>` - Target path for generation
351
- - `--skip-form-editor` - Skip interactive form builder
352
- - `--form-fields <json>` - JSON array of form field definitions
353
-
354
- **Examples:**
355
- ```bash
356
- # Interactive mode
357
- npx create-vc-app blade
358
-
359
- # Generate grid blade
360
- npx create-vc-app blade --module products --type grid --name products
361
-
362
- # Generate details blade with form
363
- npx create-vc-app blade --module products --type details --name product-details
364
-
365
- # Generate widget
366
- npx create-vc-app blade --widget
367
- ```
368
-
369
- ---
370
-
371
- ## Form Field Types Reference
372
-
373
- When using `--form-fields` option, use this JSON structure:
374
-
375
- ```typescript
376
- interface FormField {
377
- name: string; // Field property name
378
- label?: string; // Display label (optional, uses name if not provided)
379
- type: FieldType; // Component type (see below)
380
- props?: string; // JSON string of component props
381
- }
382
- ```
383
-
384
- **Available Field Types:**
385
-
386
- | Type | Component | Use Case | Example Props |
387
- |------|-----------|----------|---------------|
388
- | `VcInput` | Text input | Basic text, numbers, dates | `{"required":true,"type":"text"}` |
389
- | `VcTextarea` | Multi-line text | Long text, comments | `{"rows":5}` |
390
- | `VcSelect` | Dropdown | Single selection | `{"required":true,"options":"Option1,Option2"}` |
391
- | `VcEditor` | Rich text editor | Formatted content | `{"placeholder":"Enter content"}` |
392
- | `VcSwitch` | Toggle | Boolean values | `{}` |
393
- | `VcGallery` | Image gallery | Multiple images | `{}` |
394
- | `VcInputCurrency` | Currency input | Money values | `{"required":true}` |
395
- | `VcRadioButton` | Radio buttons | Single choice from list | `{"options":"Option1,Option2,Option3"}` |
396
- | `VcCheckbox` | Checkbox | Single boolean | `{"label":"Agree to terms"}` |
397
- | `VcMultivalue` | Tag input | Multiple text values | `{"placeholder":"Add tag"}` |
398
- | `VcField` | Read-only field | Display-only data | `{}` |
399
-
400
- **Example JSON for --form-fields:**
401
- ```json
402
- [
403
- {
404
- "name": "title",
405
- "label": "Product Title",
406
- "type": "VcInput",
407
- "props": "{\"required\":true}"
408
- },
409
- {
410
- "name": "price",
411
- "label": "Price",
412
- "type": "VcInputCurrency",
413
- "props": "{\"required\":true}"
414
- },
415
- {
416
- "name": "description",
417
- "label": "Description",
418
- "type": "VcEditor",
419
- "props": "{}"
420
- }
421
- ]
422
- ```
423
-
424
- ---
425
-
426
- ## Expected Output
427
-
428
- ### After Creating Application
429
-
430
- ```
431
- ✨ Application created successfully!
432
-
433
- 📊 Summary:
434
- Location: /path/to/my-app
435
- Package: my-app
436
- Base path: /apps/my-app/
437
- Files created: 60+
438
-
439
- 🚀 Next steps:
440
- 1. cd my-app
441
- 2. yarn
442
- 3. yarn serve
443
- ```
444
-
445
- **What was created:**
446
- - Complete Vue 3 + TypeScript application
447
- - Router configuration
448
- - Localization setup
449
- - Prettier and ESLint configuration
450
- - Base components and styles
451
- - Development scripts
452
-
453
- ---
454
-
455
- ### After Generating Module
456
-
457
- ```
458
- ✅ Module generated successfully!
459
-
460
- Created files:
461
- - src/modules/products/pages/products.vue
462
- - src/modules/products/pages/product-details.vue
463
- - src/modules/products/composables/useProductList.ts
464
- - src/modules/products/composables/useProductDetails.ts
465
- - src/modules/products/locales/en.json
466
- - src/modules/products/index.ts
467
-
468
- Module registered in src/main.ts
469
- ```
470
-
471
- **What was created:**
472
- - Complete module structure
473
- - Grid blade with VcTable
474
- - Details blade with form fields
475
- - Composables with async logic
476
- - Localization files
477
- - Automatic module registration
478
-
479
- ---
480
-
481
- ## Next Steps After Generation
482
-
483
- ### 1. Install Dependencies
484
- ```bash
485
- cd your-app
486
- yarn
487
- ```
488
-
489
- ### 2. Connect to API
490
- See [API Client Generation Guide](./api-client-generation.md)
491
-
492
- ### 3. Start Development Server
493
- ```bash
494
- yarn serve
495
- ```
496
-
497
- ### 4. Access Application
498
- ```
499
- http://localhost:8080/apps/your-app/
500
- ```
501
-
502
- ### 5. Customize Generated Code
503
- - Update TODO comments in composables
504
- - Replace placeholder API calls
505
- - Add validation rules
506
- - Customize UI components
507
-
508
- ---
509
-
510
- ## Common Patterns
511
-
512
- ### Pattern 1: E-commerce Module Set
513
-
514
- **Prompt:**
515
- ```
516
- Create a complete e-commerce module set:
517
- 1. Products (list + details)
518
- 2. Categories (list + details)
519
- 3. Orders (list + details)
520
- 4. Customers (list + details)
521
-
522
- Use CLI to generate all modules.
523
- ```
524
-
525
- **AI will execute:**
526
- ```bash
527
- # Products
528
- npx create-vc-app blade --module products --type grid --name products --is-workspace
529
- npx create-vc-app blade --module products --type details --name product-details
530
-
531
- # Categories
532
- npx create-vc-app blade --module categories --type grid --name categories --is-workspace
533
- npx create-vc-app blade --module categories --type details --name category-details
534
-
535
- # Orders
536
- npx create-vc-app blade --module orders --type grid --name orders --is-workspace
537
- npx create-vc-app blade --module orders --type details --name order-details
538
-
539
- # Customers
540
- npx create-vc-app blade --module customers --type grid --name customers --is-workspace
541
- npx create-vc-app blade --module customers --type details --name customer-details
542
- ```
543
-
544
- ---
545
-
546
- ### Pattern 2: Settings Pages (Forms Only)
547
-
548
- **Prompt:**
549
- ```
550
- Create settings pages (no lists):
551
- 1. General Settings (store name, email, timezone)
552
- 2. Payment Settings (payment methods, currencies)
553
- 3. Shipping Settings (shipping zones, rates)
554
-
555
- Use CLI.
556
- ```
557
-
558
- **AI will execute:**
559
- ```bash
560
- # General
561
- npx create-vc-app blade --module settings-general --type details --name general --is-workspace
562
-
563
- # Payment
564
- npx create-vc-app blade --module settings-payment --type details --name payment --is-workspace
565
-
566
- # Shipping
567
- npx create-vc-app blade --module settings-shipping --type details --name shipping --is-workspace
568
- ```
569
-
570
- ---
571
-
572
- ## Troubleshooting
573
-
574
- ### Issue: Module Not Created
575
- **Error:** `Module "xyz" not found`
576
-
577
- **Solution:** When generating a blade for non-existent module in non-interactive mode, the CLI automatically creates the module. Make sure you're in the project directory.
578
-
579
- ---
580
-
581
- ### Issue: Form Fields Not Generated
582
- **Error:** Invalid JSON in `--form-fields`
583
-
584
- **Solution:** Ensure JSON is properly escaped:
585
- - Use single quotes around the entire JSON
586
- - Use double quotes inside for JSON properties
587
- - Escape inner JSON in props: `"{\"required\":true}"`
588
-
589
- **Correct:**
590
- ```bash
591
- --form-fields '[{"name":"title","type":"VcInput","props":"{\"required\":true}"}]'
592
- ```
593
-
594
- ---
595
-
596
- ### Issue: Command Not Found
597
- **Error:** `create-vc-app: command not found`
598
-
599
- **Solution:** Use `npx` to run without global installation:
600
- ```bash
601
- npx create-vc-app blade
602
- ```
603
-
604
- ---
605
-
606
- ## Tips for Better AI Prompts
607
-
608
- 1. **Be Specific:** Describe field types, validations, and requirements clearly
609
- 2. **Use Structure:** List fields in bullet points or tables
610
- 3. **Mention CLI:** Always say "use CLI" or "generate with create-vc-app"
611
- 4. **Provide Context:** Mention if adding to existing app or creating new
612
- 5. **Include Data Structure:** Describe your API data format if integrating
613
-
614
- **Good Prompt Example:**
615
- ```
616
- Use create-vc-app CLI to generate an invoices module.
617
-
618
- Structure:
619
- - List blade with columns: invoice number, customer, date, total, status
620
- - Details blade with form:
621
- - Invoice number (text, auto-generated, read-only)
622
- - Customer (select dropdown)
623
- - Date (date picker, required)
624
- - Items (table with add/remove)
625
- - Total (currency, auto-calculated, read-only)
626
- - Status (select: draft, sent, paid)
627
- - Notes (textarea)
628
-
629
- Create both grid and details blades.
630
- ```
631
-
632
- ---
633
-
634
- ## Related Documentation
635
-
636
- - [Quick Start Scenarios](./quick-start-scenarios.md) - Ready-to-use examples
637
- - [API Client Generation](./api-client-generation.md) - Connecting to backend
638
- - [Complete Workflow Guide](../guides/complete-workflow.md) - End-to-end process
639
- - [Official Documentation](https://docs.virtocommerce.org/platform/developer-guide/custom-apps-development/vc-shell/)
640
-