@donotdev/cli 0.0.5 → 0.0.7

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 (102) hide show
  1. package/dependencies-matrix.json +76 -34
  2. package/dist/bin/commands/build.js +165 -161
  3. package/dist/bin/commands/bump.js +172 -160
  4. package/dist/bin/commands/cacheout.js +163 -157
  5. package/dist/bin/commands/create-app.js +205 -163
  6. package/dist/bin/commands/create-project.js +176 -161
  7. package/dist/bin/commands/deploy.js +480 -472
  8. package/dist/bin/commands/dev.js +164 -158
  9. package/dist/bin/commands/emu.js +164 -158
  10. package/dist/bin/commands/format.js +163 -157
  11. package/dist/bin/commands/lint.js +166 -157
  12. package/dist/bin/commands/make-admin.d.ts +11 -0
  13. package/dist/bin/commands/make-admin.d.ts.map +1 -0
  14. package/dist/bin/commands/make-admin.js +12 -0
  15. package/dist/bin/commands/make-admin.js.map +1 -0
  16. package/dist/bin/commands/preview.js +164 -158
  17. package/dist/bin/commands/sync-secrets.js +164 -158
  18. package/dist/bin/commands/wai.d.ts +11 -0
  19. package/dist/bin/commands/wai.d.ts.map +1 -0
  20. package/dist/bin/commands/wai.js +12 -0
  21. package/dist/bin/commands/wai.js.map +1 -0
  22. package/dist/bin/dndev.js +24 -8
  23. package/dist/bin/donotdev.js +24 -8
  24. package/dist/index.js +557 -514
  25. package/package.json +1 -1
  26. package/templates/app-demo/index.html.example +4 -0
  27. package/templates/app-demo/src/App.tsx.example +28 -10
  28. package/templates/app-demo/src/config/app.ts.example +68 -0
  29. package/templates/app-next/src/app/ClientLayout.tsx.example +4 -3
  30. package/templates/app-next/src/app/layout.tsx.example +17 -25
  31. package/templates/app-next/src/config/app.ts.example +75 -48
  32. package/templates/app-next/src/globals.css.example +10 -7
  33. package/templates/app-next/src/locales/dndev_en.json.example +68 -0
  34. package/templates/app-next/src/pages/locales/example_en.json.example +5 -0
  35. package/templates/app-vite/index.html.example +71 -34
  36. package/templates/app-vite/src/config/app.ts.example +75 -47
  37. package/templates/app-vite/src/globals.css.example +14 -6
  38. package/templates/app-vite/src/locales/dndev_en.json.example +68 -0
  39. package/templates/app-vite/src/pages/FormPageExample.tsx.example +152 -0
  40. package/templates/app-vite/src/pages/HomePage.tsx.example +81 -134
  41. package/templates/app-vite/src/pages/ListPageExample.tsx.example +88 -0
  42. package/templates/functions-firebase/README.md.example +25 -0
  43. package/templates/functions-firebase/build.mjs.example +8 -1
  44. package/templates/functions-firebase/functions-firebase/build.mjs.example +8 -1
  45. package/templates/functions-firebase/functions-firebase/src/index.ts.example +19 -25
  46. package/templates/functions-firebase/functions.config.js.example +35 -0
  47. package/templates/functions-firebase/tsconfig.json.example +3 -13
  48. package/templates/functions-vercel/tsconfig.json.example +1 -13
  49. package/templates/root-consumer/entities/ExampleEntity.ts.example +223 -0
  50. package/templates/root-consumer/entities/demo.ts.example +562 -0
  51. package/templates/root-consumer/entities/index.ts.example +15 -0
  52. package/templates/root-consumer/firebase.json.example +1 -1
  53. package/templates/root-consumer/guides/{AGENT_START_HERE.md.example → dndev/AGENT_START_HERE.md.example} +22 -0
  54. package/templates/root-consumer/guides/{COMPONENTS_ADV.md.example → dndev/COMPONENTS_ADV.md.example} +456 -360
  55. package/templates/root-consumer/guides/{COMPONENTS_ATOMIC.md.example → dndev/COMPONENTS_ATOMIC.md.example} +42 -0
  56. package/templates/root-consumer/guides/dndev/COMPONENTS_CRUD.md.example +231 -0
  57. package/templates/root-consumer/guides/{INDEX.md.example → dndev/INDEX.md.example} +3 -0
  58. package/templates/root-consumer/guides/{SETUP_APP_CONFIG.md.example → dndev/SETUP_APP_CONFIG.md.example} +5 -2
  59. package/templates/root-consumer/guides/{SETUP_AUTH.md.example → dndev/SETUP_AUTH.md.example} +30 -0
  60. package/templates/root-consumer/guides/{SETUP_BILLING.md.example → dndev/SETUP_BILLING.md.example} +44 -4
  61. package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +473 -0
  62. package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +116 -0
  63. package/templates/root-consumer/guides/{SETUP_PAGES.md.example → dndev/SETUP_PAGES.md.example} +17 -0
  64. package/templates/root-consumer/guides/dndev/SETUP_PWA.md.example +213 -0
  65. package/templates/root-consumer/guides/dndev/USE_ROUTING.md.example +503 -0
  66. package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +404 -0
  67. package/templates/root-consumer/guides/wai-way/agents/architect.md.example +78 -0
  68. package/templates/root-consumer/guides/wai-way/agents/builder.md.example +87 -0
  69. package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +325 -0
  70. package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +100 -0
  71. package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +281 -0
  72. package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +77 -0
  73. package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +104 -0
  74. package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +124 -0
  75. package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +165 -0
  76. package/templates/root-consumer/guides/wai-way/context_map.json.example +95 -0
  77. package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +840 -0
  78. package/templates/root-consumer/guides/wai-way/page_patterns.md.example +686 -0
  79. package/templates/root-consumer/guides/wai-way/presets_guide.md.example +217 -0
  80. package/templates/root-consumer/guides/wai-way/spec_template.md.example +312 -0
  81. package/templates/root-consumer/vercel.json.example +315 -20
  82. package/templates/app-demo/src/Routes.tsx.example +0 -20
  83. package/templates/app-vite/src/Routes.tsx.example +0 -16
  84. package/templates/app-vite/src/pages/locales/README.md.example +0 -1
  85. package/templates/functions-firebase/functions-firebase/src/crud/createEntity.ts.example +0 -19
  86. package/templates/functions-firebase/functions-firebase/src/crud/deleteEntity.ts.example +0 -14
  87. package/templates/functions-firebase/functions-firebase/src/crud/getEntity.ts.example +0 -14
  88. package/templates/functions-firebase/functions-firebase/src/crud/index.ts.example +0 -12
  89. package/templates/functions-firebase/functions-firebase/src/crud/listEntities.ts.example +0 -14
  90. package/templates/functions-firebase/functions-firebase/src/crud/updateEntity.ts.example +0 -14
  91. package/templates/root-consumer/guides/COMPONENTS_CRUD.md.example +0 -70
  92. package/templates/root-consumer/guides/SETUP_FUNCTIONS.md.example +0 -62
  93. /package/templates/root-consumer/guides/{COMPONENTS_UI.md.example → dndev/COMPONENTS_UI.md.example} +0 -0
  94. /package/templates/root-consumer/guides/{ENV_SETUP.md.example → dndev/ENV_SETUP.md.example} +0 -0
  95. /package/templates/root-consumer/guides/{SETUP_I18N.md.example → dndev/SETUP_I18N.md.example} +0 -0
  96. /package/templates/root-consumer/guides/{SETUP_LAYOUTS.md.example → dndev/SETUP_LAYOUTS.md.example} +0 -0
  97. /package/templates/root-consumer/guides/{SETUP_OAUTH.md.example → dndev/SETUP_OAUTH.md.example} +0 -0
  98. /package/templates/root-consumer/guides/{SETUP_THEMES.md.example → dndev/SETUP_THEMES.md.example} +0 -0
  99. /package/templates/root-consumer/guides/{advanced → dndev/advanced}/APP_CHECK.md.example +0 -0
  100. /package/templates/root-consumer/guides/{advanced → dndev/advanced}/COOKIE_REFERENCE.md.example +0 -0
  101. /package/templates/root-consumer/guides/{advanced → dndev/advanced}/EMULATORS.md.example +0 -0
  102. /package/templates/root-consumer/guides/{advanced → dndev/advanced}/VERSION_CONTROL.md.example +0 -0
@@ -0,0 +1,562 @@
1
+ /**
2
+ * @fileoverview DEMO ENTITY - Complete Reference
3
+ *
4
+ * Shows ALL field types, visibility levels, and options.
5
+ * Copy what you need. NOT exported by default.
6
+ */
7
+
8
+ import { defineEntity } from '@donotdev/core';
9
+ import * as v from 'valibot';
10
+
11
+ const demoEntity = defineEntity({
12
+ // ===========================================================================
13
+ // ENTITY CONFIG
14
+ // ===========================================================================
15
+
16
+ name: 'Demo',
17
+ collection: 'demos',
18
+ // collection: 'users/{userId}/demos', // Subcollection syntax
19
+
20
+ listFields: ['title', 'status', 'category', 'price'],
21
+ listCardFields: ['images', 'title', 'price'],
22
+
23
+ // ===========================================================================
24
+ // ACCESS - Who can CRUD (entity-level)
25
+ // ===========================================================================
26
+ // 'guest' | 'user' | 'admin' | 'super'
27
+ access: {
28
+ create: 'admin', // Default: 'admin'
29
+ read: 'guest', // Default: 'guest'
30
+ update: 'admin', // Default: 'admin'
31
+ delete: 'admin', // Default: 'admin'
32
+ },
33
+ // allowGuestCreate: true, // Required if create: 'guest'
34
+
35
+ fields: {
36
+ // =========================================================================
37
+ // TEXT INPUTS
38
+ // =========================================================================
39
+
40
+ title: {
41
+ name: 'title',
42
+ label: 'title', // i18n: demos.fields.title
43
+ type: 'text',
44
+ visibility: 'guest', // guest|user|admin|super|hidden
45
+ editable: 'owner', // admin|owner|user|create-only|false
46
+ validation: { required: true },
47
+ },
48
+
49
+ description: {
50
+ name: 'description',
51
+ label: 'description',
52
+ type: 'textarea',
53
+ visibility: 'guest',
54
+ editable: 'owner',
55
+ validation: { required: false },
56
+ },
57
+
58
+ content: {
59
+ name: 'content',
60
+ label: 'content',
61
+ type: 'richtext', // Rich text editor
62
+ visibility: 'guest',
63
+ editable: 'admin',
64
+ validation: { required: false },
65
+ },
66
+
67
+ website: {
68
+ name: 'website',
69
+ label: 'website',
70
+ type: 'url',
71
+ visibility: 'guest',
72
+ editable: 'owner',
73
+ validation: { required: false },
74
+ },
75
+
76
+ brandColor: {
77
+ name: 'brandColor',
78
+ label: 'brandColor',
79
+ type: 'color', // Color picker
80
+ visibility: 'admin',
81
+ editable: 'admin',
82
+ validation: { required: false },
83
+ },
84
+
85
+ secretKey: {
86
+ name: 'secretKey',
87
+ label: 'secretKey',
88
+ type: 'password', // Masked input
89
+ visibility: 'admin',
90
+ editable: 'admin',
91
+ validation: { required: false },
92
+ },
93
+
94
+ // =========================================================================
95
+ // NUMBERS
96
+ // =========================================================================
97
+
98
+ price: {
99
+ name: 'price',
100
+ label: 'price',
101
+ type: 'number',
102
+ visibility: 'guest',
103
+ editable: 'admin',
104
+ validation: { required: true },
105
+ },
106
+
107
+ rating: {
108
+ name: 'rating',
109
+ label: 'rating',
110
+ type: 'range', // Slider
111
+ visibility: 'guest',
112
+ editable: 'owner',
113
+ validation: { required: false },
114
+ },
115
+
116
+ // =========================================================================
117
+ // CONTACT
118
+ // =========================================================================
119
+
120
+ email: {
121
+ name: 'email',
122
+ label: 'email',
123
+ type: 'email',
124
+ visibility: 'admin',
125
+ editable: 'owner',
126
+ validation: { required: true },
127
+ },
128
+
129
+ phone: {
130
+ name: 'phone',
131
+ label: 'phone',
132
+ type: 'tel',
133
+ visibility: 'admin',
134
+ editable: 'owner',
135
+ validation: { required: false },
136
+ options: {
137
+ fieldSpecific: {
138
+ defaultCountry: 'US',
139
+ preferredCountries: ['US', 'FR', 'GB'],
140
+ showFlags: true,
141
+ }
142
+ }
143
+ },
144
+
145
+ // =========================================================================
146
+ // BOOLEAN / TOGGLE
147
+ // =========================================================================
148
+
149
+ isActive: {
150
+ name: 'isActive',
151
+ label: 'isActive',
152
+ type: 'switch', // Toggle switch
153
+ visibility: 'admin',
154
+ editable: 'admin',
155
+ validation: { required: false },
156
+ },
157
+
158
+ acceptTerms: {
159
+ name: 'acceptTerms',
160
+ label: 'acceptTerms',
161
+ type: 'checkbox', // Single checkbox
162
+ visibility: 'user',
163
+ editable: 'user',
164
+ validation: { required: true },
165
+ },
166
+
167
+ // Switch with custom values
168
+ transmission: {
169
+ name: 'transmission',
170
+ label: 'transmission',
171
+ type: 'switch',
172
+ visibility: 'guest',
173
+ editable: 'admin',
174
+ options: {
175
+ fieldSpecific: {
176
+ uncheckedLabel: 'Manual',
177
+ checkedLabel: 'Automatic',
178
+ uncheckedValue: 'Manual',
179
+ checkedValue: 'Automatic',
180
+ }
181
+ },
182
+ validation: { required: true },
183
+ },
184
+
185
+ // =========================================================================
186
+ // DATES
187
+ // =========================================================================
188
+
189
+ birthDate: {
190
+ name: 'birthDate',
191
+ label: 'birthDate',
192
+ type: 'date', // Date only
193
+ visibility: 'user',
194
+ editable: 'owner',
195
+ validation: { required: false },
196
+ },
197
+
198
+ eventTime: {
199
+ name: 'eventTime',
200
+ label: 'eventTime',
201
+ type: 'datetime-local', // Date + time
202
+ visibility: 'guest',
203
+ editable: 'owner',
204
+ validation: { required: false },
205
+ },
206
+
207
+ reminderTime: {
208
+ name: 'reminderTime',
209
+ label: 'reminderTime',
210
+ type: 'time', // Time only
211
+ visibility: 'user',
212
+ editable: 'owner',
213
+ validation: { required: false },
214
+ },
215
+
216
+ reportWeek: {
217
+ name: 'reportWeek',
218
+ label: 'reportWeek',
219
+ type: 'week', // Week picker
220
+ visibility: 'admin',
221
+ editable: 'admin',
222
+ validation: { required: false },
223
+ },
224
+
225
+ reportMonth: {
226
+ name: 'reportMonth',
227
+ label: 'reportMonth',
228
+ type: 'month', // Month picker
229
+ visibility: 'admin',
230
+ editable: 'admin',
231
+ validation: { required: false },
232
+ },
233
+
234
+ lastSync: {
235
+ name: 'lastSync',
236
+ label: 'lastSync',
237
+ type: 'timestamp', // Firestore Timestamp
238
+ visibility: 'admin',
239
+ editable: 'admin',
240
+ validation: { required: false },
241
+ },
242
+
243
+ // =========================================================================
244
+ // SELECTION
245
+ // =========================================================================
246
+
247
+ category: {
248
+ name: 'category',
249
+ label: 'category',
250
+ type: 'select', // Dropdown
251
+ visibility: 'guest',
252
+ editable: 'owner',
253
+ validation: {
254
+ required: true,
255
+ options: [
256
+ { value: 'electronics', label: 'category.electronics' },
257
+ { value: 'clothing', label: 'category.clothing' },
258
+ ],
259
+ },
260
+ },
261
+
262
+ brand: {
263
+ name: 'brand',
264
+ label: 'brand',
265
+ type: 'combobox', // Searchable dropdown
266
+ visibility: 'guest',
267
+ editable: 'owner',
268
+ validation: {
269
+ required: false,
270
+ options: [
271
+ { value: 'apple', label: 'Apple' },
272
+ { value: 'samsung', label: 'Samsung' },
273
+ ],
274
+ },
275
+ },
276
+
277
+ tags: {
278
+ name: 'tags',
279
+ label: 'tags',
280
+ type: 'multiselect', // Multiple selection
281
+ visibility: 'guest',
282
+ editable: 'owner',
283
+ validation: {
284
+ required: false,
285
+ options: [
286
+ { value: 'featured', label: 'Featured' },
287
+ { value: 'sale', label: 'On Sale' },
288
+ { value: 'new', label: 'New Arrival' },
289
+ ],
290
+ },
291
+ },
292
+
293
+ priority: {
294
+ name: 'priority',
295
+ label: 'priority',
296
+ type: 'radio', // Radio buttons
297
+ visibility: 'user',
298
+ editable: 'owner',
299
+ validation: {
300
+ required: true,
301
+ options: [
302
+ { value: 'low', label: 'Low' },
303
+ { value: 'medium', label: 'Medium' },
304
+ { value: 'high', label: 'High' },
305
+ ],
306
+ },
307
+ },
308
+
309
+ // Dependent select (options based on another field)
310
+ model: {
311
+ name: 'model',
312
+ label: 'model',
313
+ type: 'combobox',
314
+ visibility: 'guest',
315
+ editable: 'owner',
316
+ dependsOn: { field: 'brand' },
317
+ validation: {
318
+ required: false,
319
+ options: ((formValues: { brand?: string }) => {
320
+ const models: Record<string, string[]> = {
321
+ apple: ['iPhone', 'MacBook'],
322
+ samsung: ['Galaxy', 'Tab'],
323
+ };
324
+ const list = formValues?.brand ? models[formValues.brand] || [] : [];
325
+ return list.map(m => ({ value: m, label: m }));
326
+ }) as any,
327
+ },
328
+ },
329
+
330
+ // =========================================================================
331
+ // FILES & MEDIA
332
+ // =========================================================================
333
+
334
+ avatar: {
335
+ name: 'avatar',
336
+ label: 'avatar',
337
+ type: 'avatar', // Avatar image
338
+ visibility: 'guest',
339
+ editable: 'owner',
340
+ validation: { required: false },
341
+ },
342
+
343
+ photo: {
344
+ name: 'photo',
345
+ label: 'photo',
346
+ type: 'image', // Single image
347
+ visibility: 'guest',
348
+ editable: 'owner',
349
+ validation: { required: false },
350
+ },
351
+
352
+ images: {
353
+ name: 'images',
354
+ label: 'images',
355
+ type: 'images', // Multiple images
356
+ visibility: 'guest',
357
+ editable: 'owner',
358
+ validation: { required: false },
359
+ },
360
+
361
+ resume: {
362
+ name: 'resume',
363
+ label: 'resume',
364
+ type: 'document', // Single document (PDF, etc.)
365
+ visibility: 'admin',
366
+ editable: 'owner',
367
+ validation: { required: false },
368
+ },
369
+
370
+ attachments: {
371
+ name: 'attachments',
372
+ label: 'attachments',
373
+ type: 'documents', // Multiple documents
374
+ visibility: 'admin',
375
+ editable: 'owner',
376
+ validation: { required: false },
377
+ },
378
+
379
+ dataFile: {
380
+ name: 'dataFile',
381
+ label: 'dataFile',
382
+ type: 'file', // Single file (any type)
383
+ visibility: 'admin',
384
+ editable: 'admin',
385
+ validation: { required: false },
386
+ },
387
+
388
+ backups: {
389
+ name: 'backups',
390
+ label: 'backups',
391
+ type: 'files', // Multiple files
392
+ visibility: 'admin',
393
+ editable: 'admin',
394
+ validation: { required: false },
395
+ },
396
+
397
+ // =========================================================================
398
+ // LOCATION
399
+ // =========================================================================
400
+
401
+ location: {
402
+ name: 'location',
403
+ label: 'location',
404
+ type: 'geopoint', // Lat/lng coordinates
405
+ visibility: 'guest',
406
+ editable: 'admin',
407
+ validation: { required: false },
408
+ },
409
+
410
+ address: {
411
+ name: 'address',
412
+ label: 'address',
413
+ type: 'address', // Address with autocomplete
414
+ visibility: 'guest',
415
+ editable: 'owner',
416
+ validation: { required: false },
417
+ },
418
+
419
+ // =========================================================================
420
+ // REFERENCE (link to other entity)
421
+ // =========================================================================
422
+
423
+ customerId: {
424
+ name: 'customerId',
425
+ label: 'customerId',
426
+ type: 'reference',
427
+ visibility: 'admin',
428
+ editable: 'create-only', // Set once, read-only after
429
+ validation: {
430
+ required: true,
431
+ reference: 'customers', // Target collection
432
+ },
433
+ },
434
+
435
+ // =========================================================================
436
+ // SPECIAL
437
+ // =========================================================================
438
+
439
+ keywords: {
440
+ name: 'keywords',
441
+ label: 'keywords',
442
+ type: 'array', // Array of strings
443
+ visibility: 'admin',
444
+ editable: 'admin',
445
+ validation: { required: false },
446
+ },
447
+
448
+ internalNotes: {
449
+ name: 'internalNotes',
450
+ label: 'internalNotes',
451
+ type: 'textarea',
452
+ visibility: 'hidden', // NEVER sent to client
453
+ editable: 'admin',
454
+ validation: { required: false },
455
+ },
456
+
457
+ // =========================================================================
458
+ // STATUS - Framework adds: draft, available, deleted
459
+ // =========================================================================
460
+
461
+ status: {
462
+ name: 'status',
463
+ label: 'status',
464
+ type: 'select',
465
+ visibility: 'admin',
466
+ validation: {
467
+ options: [
468
+ // Custom options (merge with framework defaults)
469
+ { value: 'featured', label: 'status.featured' },
470
+ { value: 'archived', label: 'status.archived' },
471
+ ],
472
+ },
473
+ },
474
+
475
+ // =========================================================================
476
+ // CUSTOM FIELD with Valibot schema
477
+ // =========================================================================
478
+
479
+ repairs: {
480
+ name: 'repairs',
481
+ label: 'repairs',
482
+ type: 'text', // Base type (schema overrides)
483
+ visibility: 'admin',
484
+ editable: 'admin',
485
+ validation: {
486
+ required: false,
487
+ // Custom schema takes precedence over type
488
+ schema: v.nullish(v.array(v.object({
489
+ operation: v.string(),
490
+ cost: v.number(),
491
+ date: v.optional(v.string()),
492
+ }))),
493
+ },
494
+ },
495
+
496
+ metadata: {
497
+ name: 'metadata',
498
+ label: 'metadata',
499
+ type: 'text',
500
+ visibility: 'admin',
501
+ editable: 'admin',
502
+ validation: {
503
+ required: false,
504
+ schema: v.optional(v.object({
505
+ source: v.string(),
506
+ importedAt: v.string(),
507
+ tags: v.array(v.string()),
508
+ })),
509
+ },
510
+ },
511
+
512
+ // =========================================================================
513
+ // TECHNICAL FIELDS - Auto-added, don't define:
514
+ // id, createdAt, updatedAt, createdById, updatedById
515
+ // =========================================================================
516
+ },
517
+ });
518
+
519
+ // =============================================================================
520
+ // VISIBILITY LEVELS
521
+ // =============================================================================
522
+ //
523
+ // 'guest' → Everyone (including not logged in)
524
+ // 'user' → Authenticated users
525
+ // 'admin' → Admin role only
526
+ // 'super' → Super admin only
527
+ // 'hidden' → NEVER sent to client (server-only)
528
+ //
529
+ // Hierarchy: guest < user < admin < super
530
+ // Admin sees guest + user + admin fields
531
+
532
+ // =============================================================================
533
+ // EDITABLE LEVELS
534
+ // =============================================================================
535
+ //
536
+ // 'admin' → Only admins can edit
537
+ // 'owner' → Only document creator
538
+ // 'user' → Any authenticated user
539
+ // 'create-only' → Set on creation, read-only after
540
+ // false → Never editable (read-only)
541
+
542
+ // =============================================================================
543
+ // CUSTOM FIELD TYPES (register in app startup)
544
+ // =============================================================================
545
+ //
546
+ // import { registerFieldType } from '@donotdev/crud';
547
+ // import { useController } from '@donotdev/crud';
548
+ //
549
+ // function MyCustomField({ fieldConfig, control, t }: ControlledFieldProps) {
550
+ // const { field, fieldState } = useController({ name: fieldConfig.name, control });
551
+ // return <input {...field} />;
552
+ // }
553
+ //
554
+ // registerFieldType({
555
+ // type: 'myCustomType',
556
+ // controlledComponent: MyCustomField,
557
+ // });
558
+
559
+ // =============================================================================
560
+ // EXPORT - Uncomment to use this entity
561
+ // =============================================================================
562
+ // export { demoEntity };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @fileoverview Entity Exports
3
+ *
4
+ * Export all your entities from here for easy importing.
5
+ *
6
+ * USAGE:
7
+ * ```tsx
8
+ * import { productEntity, customerEntity } from '../entities';
9
+ * ```
10
+ */
11
+
12
+ // Export your entities here:
13
+ // export { productEntity } from './Product';
14
+ // export { customerEntity } from './Customer';
15
+ // export { orderEntity } from './Order';
@@ -31,7 +31,7 @@
31
31
  },
32
32
  {
33
33
  "key": "Content-Security-Policy",
34
- "value": "default-src 'self'; script-src 'self' https://accounts.google.com https://apis.google.com https://www.google.com https://www.gstatic.com; connect-src 'self' http://localhost:* ws://localhost:* https://accounts.google.com https://apis.google.com https://www.googleapis.com https://identitytoolkit.googleapis.com https://securetoken.googleapis.com https://firestore.googleapis.com https://{{YOUR_FIREBASE_PROJECT_ID}}.firebaseio.com https://{{YOUR_REGION}}-{{YOUR_FIREBASE_PROJECT_ID}}.cloudfunctions.net https://*.a.run.app https://{{YOUR_FIREBASE_PROJECT_ID}}.firebasestorage.app https://recaptchaenterprise.googleapis.com https://content-firebaseappcheck.googleapis.com https://firebaseappcheck.googleapis.com https://www.google.com https://github.com https://api.github.com https://api.stripe.com https://checkout.stripe.com; img-src 'self' data: https: http://localhost:* https://avatars.githubusercontent.com https://lh3.googleusercontent.com https://{{YOUR_FIREBASE_PROJECT_ID}}.firebasestorage.app; frame-src 'self' http://localhost:* https://accounts.google.com https://checkout.stripe.com https://js.stripe.com https://www.google.com https://recaptcha.google.com; font-src 'self' data:; style-src 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self'; form-action 'self' http://localhost:* https://accounts.google.com https://github.com https://checkout.stripe.com"
34
+ "value": "default-src 'self'; script-src 'self' https://accounts.google.com https://apis.google.com https://www.google.com https://www.gstatic.com; connect-src 'self' http://localhost:* ws://localhost:* https://accounts.google.com https://apis.google.com https://www.googleapis.com https://identitytoolkit.googleapis.com https://securetoken.googleapis.com https://firestore.googleapis.com https://{{YOUR_FIREBASE_PROJECT_ID}}.firebaseio.com https://{{YOUR_REGION}}-{{YOUR_FIREBASE_PROJECT_ID}}.cloudfunctions.net https://*.a.run.app https://{{YOUR_FIREBASE_PROJECT_ID}}.firebasestorage.app https://recaptchaenterprise.googleapis.com https://content-firebaseappcheck.googleapis.com https://firebaseappcheck.googleapis.com https://www.google.com https://github.com https://api.github.com https://api.stripe.com https://checkout.stripe.com; img-src 'self' data: blob: https: http://localhost:* https://avatars.githubusercontent.com https://lh3.googleusercontent.com https://{{YOUR_FIREBASE_PROJECT_ID}}.firebasestorage.app; frame-src 'self' http://localhost:* https://accounts.google.com https://checkout.stripe.com https://js.stripe.com https://www.google.com https://recaptcha.google.com; font-src 'self' data:; style-src 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self'; form-action 'self' http://localhost:* https://accounts.google.com https://github.com https://checkout.stripe.com"
35
35
  },
36
36
  {
37
37
  "key": "X-Content-Type-Options",
@@ -229,6 +229,28 @@ bun run dev
229
229
 
230
230
  ---
231
231
 
232
+ ## 🤖 WAI-WAY: The "With AI Way" Protocol (Recommended)
233
+
234
+ **WAI-WAY** (based on the **BMAD Method**) is a rigorous, agent-driven protocol designed to build mistake-free apps by separating concerns into 4 distinct phases.
235
+
236
+ **How to Use:**
237
+ 1. Navigate to `guides/wai-way/`.
238
+ 2. Open `WAI_WAY_CLI.md` to see the activation instructions.
239
+ 3. Paste the **Activation Prompt** into your AI Agent (Cursor, Claude, etc.) to start a phase.
240
+
241
+ **The 4 Phases:**
242
+ 1. **Brainstorm (Extractor):** Define WHAT to build -> `step_1_prd.md`
243
+ 2. **Review (Architect):** Define HOW to build (Component mapping) -> `step_2_spec.md`
244
+ 3. **Build (Builder):** Implement code based on spec -> Working App
245
+ 4. **Polish (Polisher):** Refine UX and content -> Production App
246
+
247
+ **Why use it?**
248
+ WAI-WAY forces your AI to "Think before it Codes". By separating the Architecture phase from the Build phase, we ensure that **only valid DoNotDev primitives are used**, preventing custom CSS bloat and "hallucinated" patterns.
249
+
250
+ **See [WAI_WAY_CLI.md](../wai-way/WAI_WAY_CLI.md) for full instructions.**
251
+
252
+ ---
253
+
232
254
  ## Landing Page Example
233
255
 
234
256
  ```tsx