@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
@@ -1,3 +1,207 @@
1
+ {{#isNextjs}}
2
+ {
3
+ "framework": "nextjs",{{#includeFunctions}}
4
+ "functions": {
5
+ "functions/src/api/**/*.ts": {
6
+ "runtime": "@vercel/node@3"
7
+ }
8
+ },
9
+ "rewrites": [
10
+ {
11
+ "source": "/api/(.*)",
12
+ "destination": "/functions/src/api/$1"
13
+ }
14
+ ],{{/includeFunctions}}
15
+ "headers": [
16
+ {
17
+ "source": "/(.*)",
18
+ "headers": [
19
+ {
20
+ "key": "Content-Security-Policy",
21
+ "value": "default-src 'self'; script-src 'self'{{#needsAuth}} https://accounts.google.com https://apis.google.com{{/needsAuth}}{{#needsBilling}} https://js.stripe.com{{/needsBilling}}; style-src 'self' 'unsafe-inline'{{#needsBilling}} https://fonts.googleapis.com{{/needsBilling}}; img-src 'self' data: blob: https:; font-src 'self' data:{{#needsBilling}} https://fonts.gstatic.com{{/needsBilling}}; connect-src 'self'{{#needsAuth}} https://identitytoolkit.googleapis.com https://securetoken.googleapis.com https://www.googleapis.com https://*.googleapis.com https://{{firebaseProjectId}}.firebaseio.com{{/needsAuth}}{{#needsBilling}} https://api.stripe.com{{/needsBilling}}; frame-src 'none'{{#needsAuth}} https://accounts.google.com{{/needsAuth}}{{#needsBilling}} https://js.stripe.com https://hooks.stripe.com{{/needsBilling}}; object-src 'none'; base-uri 'self'; form-action 'self'; upgrade-insecure-requests"
22
+ },
23
+ {
24
+ "key": "X-Content-Type-Options",
25
+ "value": "nosniff"
26
+ },
27
+ {
28
+ "key": "X-Frame-Options",
29
+ "value": "DENY"
30
+ },
31
+ {
32
+ "key": "X-XSS-Protection",
33
+ "value": "1; mode=block"
34
+ },
35
+ {
36
+ "key": "Referrer-Policy",
37
+ "value": "strict-origin-when-cross-origin"
38
+ },
39
+ {
40
+ "key": "Permissions-Policy",
41
+ "value": "geolocation=(), microphone=(), camera=()"
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "source": "/assets/:path*.woff",
47
+ "headers": [
48
+ {
49
+ "key": "Cache-Control",
50
+ "value": "public, max-age=31536000, immutable"
51
+ }
52
+ ]
53
+ },
54
+ {
55
+ "source": "/assets/:path*.woff2",
56
+ "headers": [
57
+ {
58
+ "key": "Cache-Control",
59
+ "value": "public, max-age=31536000, immutable"
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "source": "/assets/:path*.ttf",
65
+ "headers": [
66
+ {
67
+ "key": "Cache-Control",
68
+ "value": "public, max-age=31536000, immutable"
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "source": "/assets/:path*.eot",
74
+ "headers": [
75
+ {
76
+ "key": "Cache-Control",
77
+ "value": "public, max-age=31536000, immutable"
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "source": "/assets/:path*.js",
83
+ "headers": [
84
+ {
85
+ "key": "Cache-Control",
86
+ "value": "public, max-age=31536000, immutable"
87
+ }
88
+ ]
89
+ },
90
+ {
91
+ "source": "/assets/:path*.css",
92
+ "headers": [
93
+ {
94
+ "key": "Cache-Control",
95
+ "value": "public, max-age=31536000, immutable"
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "source": "/:path*.jpg",
101
+ "headers": [
102
+ {
103
+ "key": "Cache-Control",
104
+ "value": "public, max-age=86400"
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ "source": "/:path*.jpeg",
110
+ "headers": [
111
+ {
112
+ "key": "Cache-Control",
113
+ "value": "public, max-age=86400"
114
+ }
115
+ ]
116
+ },
117
+ {
118
+ "source": "/:path*.png",
119
+ "headers": [
120
+ {
121
+ "key": "Cache-Control",
122
+ "value": "public, max-age=86400"
123
+ }
124
+ ]
125
+ },
126
+ {
127
+ "source": "/:path*.svg",
128
+ "headers": [
129
+ {
130
+ "key": "Cache-Control",
131
+ "value": "public, max-age=86400"
132
+ }
133
+ ]
134
+ },
135
+ {
136
+ "source": "/:path*.webp",
137
+ "headers": [
138
+ {
139
+ "key": "Cache-Control",
140
+ "value": "public, max-age=86400"
141
+ }
142
+ ]
143
+ },
144
+ {
145
+ "source": "/:path*.ico",
146
+ "headers": [
147
+ {
148
+ "key": "Cache-Control",
149
+ "value": "public, max-age=86400"
150
+ }
151
+ ]
152
+ },
153
+ {
154
+ "source": "/:path*.json",
155
+ "headers": [
156
+ {
157
+ "key": "Cache-Control",
158
+ "value": "public, max-age=3600"
159
+ },
160
+ {
161
+ "key": "Content-Type",
162
+ "value": "application/json; charset=utf-8"
163
+ }
164
+ ]
165
+ }{{#includeFunctions}},
166
+ {
167
+ "source": "/api/(.*)",
168
+ "headers": [
169
+ {
170
+ "key": "Access-Control-Allow-Origin",
171
+ "value": "*"
172
+ },
173
+ {
174
+ "key": "Access-Control-Allow-Methods",
175
+ "value": "GET, POST, PUT, DELETE, OPTIONS, PATCH"
176
+ },
177
+ {
178
+ "key": "Access-Control-Allow-Headers",
179
+ "value": "Content-Type, Authorization, X-Requested-With, X-Stripe-Signature"
180
+ },
181
+ {
182
+ "key": "Access-Control-Allow-Credentials",
183
+ "value": "true"
184
+ },
185
+ {
186
+ "key": "Access-Control-Max-Age",
187
+ "value": "86400"
188
+ }
189
+ ]
190
+ }{{/includeFunctions}}
191
+ ]{{#includeFunctions}},
192
+ "env": {
193
+ "STRIPE_SECRET_KEY": "@stripe-secret-key",
194
+ "STRIPE_WEBHOOK_SECRET": "@stripe-webhook-secret",
195
+ "STRIPE_PUBLISHABLE_KEY": "@stripe-publishable-key",
196
+ "FIREBASE_ADMIN_PRIVATE_KEY": "@firebase-admin-private-key",
197
+ "FIREBASE_PROJECT_ID": "@firebase-project-id",
198
+ "FIREBASE_CLIENT_EMAIL": "@firebase-client-email"{{#needsOAuth}},
199
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "@github-token",
200
+ "GITHUB_REPO_OWNER": "@github-repo-owner",
201
+ "GITHUB_REPO_NAME": "@github-repo-name"{{/needsOAuth}}
202
+ }{{/includeFunctions}}
203
+ }
204
+ {{/isNextjs}}{{^isNextjs}}
1
205
  {
2
206
  "buildCommand": "bun run build",
3
207
  "outputDirectory": "dist",
@@ -27,13 +231,9 @@
27
231
  {
28
232
  "source": "/(.*)",
29
233
  "headers": [
30
- {
31
- "key": "Access-Control-Allow-Origin",
32
- "value": "*"
33
- },
34
234
  {
35
235
  "key": "Content-Security-Policy",
36
- "value": "default-src 'self'; script-src 'self' https://accounts.google.com https://apis.google.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:; connect-src 'self' https://identitytoolkit.googleapis.com https://securetoken.googleapis.com https://www.googleapis.com https://*.googleapis.com https://{{firebaseProjectId}}.firebaseio.com; frame-src 'self' https://accounts.google.com"
236
+ "value": "default-src 'self'; script-src 'self'{{#needsAuth}} https://accounts.google.com https://apis.google.com{{/needsAuth}}{{#needsBilling}} https://js.stripe.com{{/needsBilling}}; style-src 'self' 'unsafe-inline'{{#needsBilling}} https://fonts.googleapis.com{{/needsBilling}}; img-src 'self' data: blob: https:; font-src 'self' data:{{#needsBilling}} https://fonts.gstatic.com{{/needsBilling}}; connect-src 'self'{{#needsAuth}} https://identitytoolkit.googleapis.com https://securetoken.googleapis.com https://www.googleapis.com https://*.googleapis.com https://{{firebaseProjectId}}.firebaseio.com{{/needsAuth}}{{#needsBilling}} https://api.stripe.com{{/needsBilling}}; frame-src 'none'{{#needsAuth}} https://accounts.google.com{{/needsAuth}}{{#needsBilling}} https://js.stripe.com https://hooks.stripe.com{{/needsBilling}}; object-src 'none'; base-uri 'self'; form-action 'self'; upgrade-insecure-requests"
37
237
  },
38
238
  {
39
239
  "key": "X-Content-Type-Options",
@@ -46,45 +246,135 @@
46
246
  {
47
247
  "key": "X-XSS-Protection",
48
248
  "value": "1; mode=block"
249
+ },
250
+ {
251
+ "key": "Referrer-Policy",
252
+ "value": "strict-origin-when-cross-origin"
253
+ },
254
+ {
255
+ "key": "Permissions-Policy",
256
+ "value": "geolocation=(), microphone=(), camera=()"
49
257
  }
50
258
  ]
51
259
  },
52
260
  {
53
- "source": "/assets/**/*.@(woff|woff2|ttf|eot)",
261
+ "source": "/assets/:path*.woff",
54
262
  "headers": [
55
263
  {
56
264
  "key": "Cache-Control",
57
265
  "value": "public, max-age=31536000, immutable"
58
- },
266
+ }
267
+ ]
268
+ },
269
+ {
270
+ "source": "/assets/:path*.woff2",
271
+ "headers": [
59
272
  {
60
- "key": "Access-Control-Allow-Origin",
61
- "value": "*"
273
+ "key": "Cache-Control",
274
+ "value": "public, max-age=31536000, immutable"
62
275
  }
63
276
  ]
64
277
  },
65
278
  {
66
- "source": "/assets/**/*.@(js|css)",
279
+ "source": "/assets/:path*.ttf",
67
280
  "headers": [
68
281
  {
69
282
  "key": "Cache-Control",
70
283
  "value": "public, max-age=31536000, immutable"
71
- },
284
+ }
285
+ ]
286
+ },
287
+ {
288
+ "source": "/assets/:path*.eot",
289
+ "headers": [
72
290
  {
73
- "key": "Access-Control-Allow-Origin",
74
- "value": "*"
291
+ "key": "Cache-Control",
292
+ "value": "public, max-age=31536000, immutable"
293
+ }
294
+ ]
295
+ },
296
+ {
297
+ "source": "/assets/:path*.js",
298
+ "headers": [
299
+ {
300
+ "key": "Cache-Control",
301
+ "value": "public, max-age=31536000, immutable"
302
+ }
303
+ ]
304
+ },
305
+ {
306
+ "source": "/assets/:path*.css",
307
+ "headers": [
308
+ {
309
+ "key": "Cache-Control",
310
+ "value": "public, max-age=31536000, immutable"
311
+ }
312
+ ]
313
+ },
314
+ {
315
+ "source": "/:path*.jpg",
316
+ "headers": [
317
+ {
318
+ "key": "Cache-Control",
319
+ "value": "public, max-age=86400"
75
320
  }
76
321
  ]
77
322
  },
78
323
  {
79
- "source": "**/*.@(jpg|jpeg|gif|png|svg|webp|ico)",
324
+ "source": "/:path*.jpeg",
80
325
  "headers": [
81
326
  {
82
327
  "key": "Cache-Control",
83
- "value": "no-cache, no-store, must-revalidate"
328
+ "value": "public, max-age=86400"
329
+ }
330
+ ]
331
+ },
332
+ {
333
+ "source": "/:path*.png",
334
+ "headers": [
335
+ {
336
+ "key": "Cache-Control",
337
+ "value": "public, max-age=86400"
338
+ }
339
+ ]
340
+ },
341
+ {
342
+ "source": "/:path*.svg",
343
+ "headers": [
344
+ {
345
+ "key": "Cache-Control",
346
+ "value": "public, max-age=86400"
347
+ }
348
+ ]
349
+ },
350
+ {
351
+ "source": "/:path*.webp",
352
+ "headers": [
353
+ {
354
+ "key": "Cache-Control",
355
+ "value": "public, max-age=86400"
356
+ }
357
+ ]
358
+ },
359
+ {
360
+ "source": "/:path*.ico",
361
+ "headers": [
362
+ {
363
+ "key": "Cache-Control",
364
+ "value": "public, max-age=86400"
365
+ }
366
+ ]
367
+ },
368
+ {
369
+ "source": "/:path*.json",
370
+ "headers": [
371
+ {
372
+ "key": "Cache-Control",
373
+ "value": "public, max-age=3600"
84
374
  },
85
375
  {
86
- "key": "Access-Control-Allow-Origin",
87
- "value": "*"
376
+ "key": "Content-Type",
377
+ "value": "application/json; charset=utf-8"
88
378
  }
89
379
  ]
90
380
  }{{#includeFunctions}},
@@ -97,11 +387,11 @@
97
387
  },
98
388
  {
99
389
  "key": "Access-Control-Allow-Methods",
100
- "value": "GET, POST, PUT, DELETE, OPTIONS"
390
+ "value": "GET, POST, PUT, DELETE, OPTIONS, PATCH"
101
391
  },
102
392
  {
103
393
  "key": "Access-Control-Allow-Headers",
104
- "value": "Content-Type, Authorization, X-Requested-With"
394
+ "value": "Content-Type, Authorization, X-Requested-With, X-Stripe-Signature"
105
395
  },
106
396
  {
107
397
  "key": "Access-Control-Allow-Credentials",
@@ -117,8 +407,13 @@
117
407
  "env": {
118
408
  "STRIPE_SECRET_KEY": "@stripe-secret-key",
119
409
  "STRIPE_WEBHOOK_SECRET": "@stripe-webhook-secret",
410
+ "STRIPE_PUBLISHABLE_KEY": "@stripe-publishable-key",
120
411
  "FIREBASE_ADMIN_PRIVATE_KEY": "@firebase-admin-private-key",
121
412
  "FIREBASE_PROJECT_ID": "@firebase-project-id",
122
- "FIREBASE_CLIENT_EMAIL": "@firebase-client-email"
413
+ "FIREBASE_CLIENT_EMAIL": "@firebase-client-email"{{#needsOAuth}},
414
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "@github-token",
415
+ "GITHUB_REPO_OWNER": "@github-repo-owner",
416
+ "GITHUB_REPO_NAME": "@github-repo-name"{{/needsOAuth}}
123
417
  }{{/includeFunctions}}
124
418
  }
419
+ {{/isNextjs}}
@@ -1,20 +0,0 @@
1
- // apps/demo/src/Routes.tsx
2
-
3
- import { Routes as RouterRoutes, Route } from 'react-router-dom';
4
-
5
- import { LayoutRoute } from './pages/components/LayoutRoute';
6
- import HomePage from './pages/HomePage';
7
- import FullPage from './pages/FullPage';
8
- import DetailPage from './pages/DetailPage';
9
-
10
- export function Routes() {
11
- return (
12
- <RouterRoutes>
13
- <Route element={<LayoutRoute />}>
14
- <Route path="/" element={<HomePage />} />
15
- <Route path="/component/:id" element={<DetailPage />} />
16
- <Route path="/full" element={<FullPage />} />
17
- </Route>
18
- </RouterRoutes>
19
- );
20
- }
@@ -1,16 +0,0 @@
1
-
2
- import { Routes as RouterRoutes, Route } from 'react-router-dom';
3
-
4
- // Import your pages
5
- import HomePage from './pages/HomePage';
6
-
7
-
8
- export function Routes() {
9
- return (
10
- <RouterRoutes>
11
- {/* Public routes */}
12
- <Route path="/" element={<HomePage />} />
13
- {/* Protected routes */}
14
- </RouterRoutes>
15
- );
16
- }
@@ -1,19 +0,0 @@
1
- /**
2
- * @fileoverview {{APP_NAME}} Create Entity Wrapper
3
- * @description Wrapper for framework's createEntity with {{APP_NAME}}-specific configuration
4
- * @version 0.0.1
5
- * @since 0.0.1
6
- * @author AMBROISE PARK Consulting
7
- */
8
-
9
- import { createEntity as frameworkCreateEntity } from '@donotdev/functions/firebase';
10
-
11
- /**
12
- * {{APP_NAME}} entity creation
13
- * Wraps the framework function with {{APP_NAME}}-specific configuration
14
- *
15
- * @version 0.0.1
16
- * @since 0.0.1
17
- * @author AMBROISE PARK Consulting
18
- */
19
- export const createEntity = frameworkCreateEntity;
@@ -1,14 +0,0 @@
1
- // functions/src/crud/deleteEntity.ts
2
-
3
- /**
4
- * @fileoverview {{APP_NAME}} Delete Entity Wrapper
5
- * @description Wrapper for framework's deleteEntity with {{APP_NAME}}-specific configuration
6
- */
7
-
8
- import { deleteEntity as frameworkDeleteEntity } from '@donotdev/functions/firebase';
9
-
10
- /**
11
- * {{APP_NAME}} entity deletion
12
- * Wraps the framework function with {{APP_NAME}}-specific configuration
13
- */
14
- export const deleteEntity = frameworkDeleteEntity;
@@ -1,14 +0,0 @@
1
- // functions/src/crud/getEntity.ts
2
-
3
- /**
4
- * @fileoverview {{APP_NAME}} Get Entity Wrapper
5
- * @description Wrapper for framework's getEntity with {{APP_NAME}}-specific configuration
6
- */
7
-
8
- import { getEntity as frameworkGetEntity } from '@donotdev/functions/firebase';
9
-
10
- /**
11
- * {{APP_NAME}} entity retrieval
12
- * Wraps the framework function with {{APP_NAME}}-specific configuration
13
- */
14
- export const getEntity = frameworkGetEntity;
@@ -1,12 +0,0 @@
1
- // functions/src/crud/index.ts
2
-
3
- /**
4
- * @fileoverview {{APP_NAME}} CRUD Functions
5
- * @description Exports all CRUD-related functions for the {{APP_NAME}} app
6
- */
7
-
8
- export { createEntity } from './createEntity';
9
- export { updateEntity } from './updateEntity';
10
- export { deleteEntity } from './deleteEntity';
11
- export { getEntity } from './getEntity';
12
- export { listEntities } from './listEntities';
@@ -1,14 +0,0 @@
1
- // functions/src/crud/listEntities.ts
2
-
3
- /**
4
- * @fileoverview {{APP_NAME}} List Entities Wrapper
5
- * @description Wrapper for framework's listEntities with {{APP_NAME}}-specific configuration
6
- */
7
-
8
- import { listEntities as frameworkListEntities } from '@donotdev/functions/firebase';
9
-
10
- /**
11
- * {{APP_NAME}} entities listing
12
- * Wraps the framework function with {{APP_NAME}}-specific configuration
13
- */
14
- export const listEntities = frameworkListEntities;
@@ -1,14 +0,0 @@
1
- // functions/src/crud/updateEntity.ts
2
-
3
- /**
4
- * @fileoverview {{APP_NAME}} Update Entity Wrapper
5
- * @description Wrapper for framework's updateEntity with {{APP_NAME}}-specific configuration
6
- */
7
-
8
- import { updateEntity as frameworkUpdateEntity } from '@donotdev/functions/firebase';
9
-
10
- /**
11
- * {{APP_NAME}} entity update
12
- * Wraps the framework function with {{APP_NAME}}-specific configuration
13
- */
14
- export const updateEntity = frameworkUpdateEntity;
@@ -1,70 +0,0 @@
1
- # CRUD Package Reference
2
-
3
- **Check JSDoc in your IDE** - Hover over any component import to see props, types, and examples.
4
-
5
- **Import from:** `@donotdev/crud` (CRUD operations and forms)
6
-
7
- ---
8
-
9
- ## Core Hook
10
-
11
- - **useCrud** - React hook for CRUD operations (create, read, update, delete, query) with automatic validation and backend abstraction.
12
-
13
- ---
14
-
15
- ## Service
16
-
17
- - **getCrudService** - Get CrudService singleton instance for direct service access.
18
-
19
- ---
20
-
21
- ## Form Components
22
-
23
- - **EntityFormRenderer** - Renders complete entity forms with automatic field mapping.
24
- - **FormFieldRenderer** - Renders individual form fields based on schema.
25
- - **FormLayout** - Form layout component with spacing and structure.
26
- - **CrudButton** - Button component integrated with CRUD operations.
27
-
28
- ---
29
-
30
- ## Form Field Components
31
-
32
- - **TextFieldComponent** - Text input field component.
33
- - **NumberFieldComponent** - Number input field component.
34
- - **TextAreaComponent** - Textarea input field component.
35
- - **PasswordFieldComponent** - Password input field component.
36
- - **DateFieldComponent** - Date picker field component.
37
- - **CheckboxFieldComponent** - Checkbox field component.
38
- - **RadioFieldComponent** - Radio button field component.
39
- - **DropdownComponent** - Single-select dropdown field component.
40
- - **MultiDropdownComponent** - Multi-select dropdown field component.
41
- - **FileFieldComponent** - File upload field component.
42
- - **ImageFieldComponent** - Image upload field component.
43
- - **AvatarFieldComponent** - Avatar upload field component.
44
- - **BadgeFieldComponent** - Badge display/input field component.
45
- - **PhoneNumberComponent** - Phone number input field component.
46
- - **GeoPointFieldComponent** - Geographic point input field component.
47
- - **MapFieldComponent** - Map picker field component.
48
- - **TimestampFieldComponent** - Timestamp input field component.
49
- - **ReferenceFieldComponent** - Reference/link field component.
50
- - **MultiInputTextFieldComponent** - Multiple text inputs field component.
51
- - **ButtonFieldComponent** - Button field component.
52
- - **HiddenFieldComponent** - Hidden field component.
53
-
54
- ---
55
-
56
- ## Controlled Fields
57
-
58
- - **ControlledFields** - Controlled form field components with validation.
59
-
60
- ---
61
-
62
- ## Utilities
63
-
64
- - **loadDeterministicRange** - Load deterministic range from collections.
65
- - **upsertDeterministic** - Upsert with deterministic ID.
66
- - **appendToCollection** - Append item to collection.
67
-
68
- ---
69
-
70
- **All props documented in JSDoc** - Hover in IDE for complete reference.
@@ -1,62 +0,0 @@
1
- # Setup: Firebase Functions
2
-
3
- **Most is pre-configured.** Functions scaffolded. Just add config and deploy.
4
-
5
- ---
6
-
7
- ## Standard Use
8
-
9
- **Structure:**
10
- ```
11
- functions/
12
- ├── src/
13
- │ ├── billing/
14
- │ └── index.ts
15
- ├── functions.yaml # Manually maintained
16
- └── .env.local # Local secrets
17
- ```
18
-
19
- **Environment:**
20
- ```bash
21
- # .env.local (local)
22
- STRIPE_SECRET_KEY=sk_test_...
23
-
24
- # .env (production, synced via dndev sync-secrets)
25
- STRIPE_SECRET_KEY=sk_live_...
26
- ```
27
-
28
- ---
29
-
30
- ## Advanced: Adding Functions
31
-
32
- 1. **Create:** `src/billing/myFunction.ts`
33
- 2. **Export:** `export * from './billing/myFunction.js';` in `src/index.ts`
34
- 3. **Add to functions.yaml:**
35
- ```yaml
36
- endpoints:
37
- myFunction:
38
- region: [europe-west1]
39
- platform: gcfv2
40
- httpsTrigger: {}
41
- entryPoint: myFunction
42
- labels: {}
43
- ```
44
- 4. **Deploy:** `dndev deploy`
45
-
46
- **Critical:** Every exported function must be in `functions.yaml` or it won't deploy.
47
-
48
- ---
49
-
50
- ## Advanced: Framework Integration
51
-
52
- ```typescript
53
- // Your function = framework + your config
54
- import { createCheckoutSession as generic } from '@donotdev/functions/firebase';
55
- import { stripeBackConfig } from '../config/stripeBackConfig';
56
-
57
- export const createCheckoutSession = generic(stripeBackConfig);
58
- ```
59
-
60
- ---
61
-
62
- **Add functions, get backend. Framework handles the rest.**