@donotdev/cli 0.0.14 → 0.0.16

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 (184) hide show
  1. package/dependencies-matrix.json +372 -88
  2. package/dist/bin/commands/agent-setup.js +7 -1
  3. package/dist/bin/commands/build.js +141 -44
  4. package/dist/bin/commands/bump.js +81 -41
  5. package/dist/bin/commands/cacheout.js +37 -9
  6. package/dist/bin/commands/create-app.js +276 -121
  7. package/dist/bin/commands/create-project.js +506 -217
  8. package/dist/bin/commands/deploy.js +1785 -694
  9. package/dist/bin/commands/dev.js +177 -43
  10. package/dist/bin/commands/doctor.d.ts +6 -0
  11. package/dist/bin/commands/doctor.d.ts.map +1 -0
  12. package/dist/bin/commands/{lint.js → doctor.js} +1215 -156
  13. package/dist/bin/commands/doctor.js.map +1 -0
  14. package/dist/bin/commands/emu.js +451 -104
  15. package/dist/bin/commands/format.js +37 -9
  16. package/dist/bin/commands/make-admin.js +77499 -11
  17. package/dist/bin/commands/preview.js +181 -43
  18. package/dist/bin/commands/setup.d.ts +6 -0
  19. package/dist/bin/commands/setup.d.ts.map +1 -0
  20. package/dist/bin/commands/setup.js +11733 -0
  21. package/dist/bin/commands/setup.js.map +1 -0
  22. package/dist/bin/commands/supabase-setup.d.ts +6 -0
  23. package/dist/bin/commands/supabase-setup.d.ts.map +1 -0
  24. package/dist/bin/commands/supabase-setup.js +7 -0
  25. package/dist/bin/commands/supabase-setup.js.map +1 -0
  26. package/dist/bin/commands/sync-secrets.js +211 -34
  27. package/dist/bin/commands/type-check.d.ts +14 -0
  28. package/dist/bin/commands/type-check.d.ts.map +1 -0
  29. package/dist/bin/commands/type-check.js +2049 -0
  30. package/dist/bin/commands/type-check.js.map +1 -0
  31. package/dist/bin/commands/wai.js +3 -1
  32. package/dist/bin/dndev.js +73 -52
  33. package/dist/bin/donotdev.js +54 -45
  34. package/dist/index.js +4212 -3050
  35. package/package.json +3 -3
  36. package/templates/app-demo/src/App.tsx.example +1 -0
  37. package/templates/app-demo/src/pages/FullPage.tsx.example +2 -2
  38. package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +2 -2
  39. package/templates/app-demo/src/themes.css.example +5 -12
  40. package/templates/app-expo/.env.example +44 -0
  41. package/templates/app-expo/.expo/README.md.example +5 -0
  42. package/templates/app-expo/.gitignore.example +36 -0
  43. package/templates/app-expo/README.md.example +58 -0
  44. package/templates/app-expo/app/.gitkeep +2 -0
  45. package/templates/app-expo/app/_layout.tsx.example +41 -0
  46. package/templates/app-expo/app/form.tsx.example +52 -0
  47. package/templates/app-expo/app/index.tsx.example +89 -0
  48. package/templates/app-expo/app/list.tsx.example +32 -0
  49. package/templates/app-expo/app/profile.tsx.example +76 -0
  50. package/templates/app-expo/app/signin.tsx.example +53 -0
  51. package/templates/app-expo/app.json.example +39 -0
  52. package/templates/app-expo/assets/adaptive-icon.png +0 -0
  53. package/templates/app-expo/assets/favicon.png +0 -0
  54. package/templates/app-expo/assets/icon.png +0 -0
  55. package/templates/app-expo/assets/splash.png +0 -0
  56. package/templates/app-expo/babel.config.js.example +10 -0
  57. package/templates/app-expo/eas.json.example +20 -0
  58. package/templates/app-expo/expo-env.d.ts.example +4 -0
  59. package/templates/app-expo/metro.config.js.example +20 -0
  60. package/templates/app-expo/service-account-key.json.example +12 -0
  61. package/templates/app-expo/src/config/app.ts.example +46 -0
  62. package/templates/app-expo/src/config/providers.ts.example +7 -0
  63. package/templates/app-expo/tsconfig.json.example +19 -0
  64. package/templates/app-next/.env.example +4 -33
  65. package/templates/app-next/src/app/ClientLayout.tsx.example +2 -0
  66. package/templates/app-next/src/app/layout.tsx.example +7 -6
  67. package/templates/app-next/src/config/providers.ts.example +7 -0
  68. package/templates/app-next/src/globals.css.example +2 -11
  69. package/templates/app-next/src/pages/HomePage.tsx.example +1 -1
  70. package/templates/app-next/src/themes.css.example +10 -13
  71. package/templates/app-vite/.env.example +3 -32
  72. package/templates/app-vite/index.html.example +2 -24
  73. package/templates/app-vite/src/App.tsx.example +2 -0
  74. package/templates/app-vite/src/config/providers.ts.example +7 -0
  75. package/templates/app-vite/src/globals.css.example +2 -12
  76. package/templates/app-vite/src/pages/FormPageExample.tsx.example +1 -2
  77. package/templates/app-vite/src/pages/HomePage.tsx.example +2 -2
  78. package/templates/app-vite/src/themes.css.example +109 -79
  79. package/templates/app-vite/vercel.json.example +11 -0
  80. package/templates/functions-firebase/README.md.example +1 -1
  81. package/templates/functions-firebase/build.mjs.example +2 -72
  82. package/templates/functions-firebase/functions-firebase/.env.example.example +24 -26
  83. package/templates/functions-firebase/functions-firebase/README.md.example +1 -1
  84. package/templates/functions-firebase/functions-firebase/build.mjs.example +2 -72
  85. package/templates/functions-firebase/functions-firebase/tsconfig.json.example +1 -1
  86. package/templates/functions-firebase/functions.config.js.example +1 -1
  87. package/templates/functions-supabase/supabase/config.toml.example +59 -0
  88. package/templates/functions-supabase/supabase/functions/.env.example +13 -0
  89. package/templates/functions-supabase/supabase/functions/cancel-subscription/index.ts.example +7 -0
  90. package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +11 -0
  91. package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +11 -0
  92. package/templates/functions-supabase/supabase/functions/create-customer-portal/index.ts.example +7 -0
  93. package/templates/functions-supabase/supabase/functions/crud/index.ts.example +16 -0
  94. package/templates/functions-supabase/supabase/functions/delete-account/index.ts.example +7 -0
  95. package/templates/functions-supabase/supabase/functions/deno.json.example +8 -0
  96. package/templates/functions-supabase/supabase/functions/get-custom-claims/index.ts.example +7 -0
  97. package/templates/functions-supabase/supabase/functions/get-user-auth-status/index.ts.example +7 -0
  98. package/templates/functions-supabase/supabase/functions/refresh-subscription-status/index.ts.example +7 -0
  99. package/templates/functions-supabase/supabase/functions/remove-custom-claims/index.ts.example +7 -0
  100. package/templates/functions-supabase/supabase/functions/set-custom-claims/index.ts.example +7 -0
  101. package/templates/functions-supabase/supabase/migrations/20250101000000_idempotency.sql +24 -0
  102. package/templates/functions-supabase/supabase/migrations/20250101000001_rate_limits.sql +22 -0
  103. package/templates/functions-supabase/supabase/migrations/20250101000002_cleanup_jobs.sql +28 -0
  104. package/templates/functions-supabase/supabase/migrations/20250101000003_operation_metrics.sql +28 -0
  105. package/templates/functions-vercel/functions-vercel/tsconfig.json.example +1 -1
  106. package/templates/functions-vercel/functions-vercel/vercel.json.example +1 -1
  107. package/templates/functions-vercel/vercel.json.example +1 -1
  108. package/templates/github/github/workflows/firebase-deploy.yml.example +1 -1
  109. package/templates/github/workflows/firebase-deploy.yml.example +1 -1
  110. package/templates/overlay-firebase/env.fragment.example +34 -0
  111. package/templates/overlay-firebase/env.fragment.expo.example +34 -0
  112. package/templates/overlay-firebase/env.fragment.nextjs.example +34 -0
  113. package/templates/overlay-firebase/src/config/providers.expo.ts.example +49 -0
  114. package/templates/overlay-firebase/src/config/providers.ts.example +23 -0
  115. package/templates/overlay-supabase/env.fragment.example +12 -0
  116. package/templates/overlay-supabase/env.fragment.expo.example +12 -0
  117. package/templates/overlay-supabase/env.fragment.nextjs.example +12 -0
  118. package/templates/overlay-supabase/src/config/providers.expo.ts.example +35 -0
  119. package/templates/overlay-supabase/src/config/providers.ts.example +33 -0
  120. package/templates/overlay-supabase/vercel.headers.example +23 -0
  121. package/templates/overlay-supabase/vercel.json.example +22 -0
  122. package/templates/overlay-vercel/env.fragment.example +34 -0
  123. package/templates/overlay-vercel/env.fragment.nextjs.example +34 -0
  124. package/templates/overlay-vercel/src/config/providers.ts.example +24 -0
  125. package/templates/root-consumer/.claude/agents/architect.md.example +2 -310
  126. package/templates/root-consumer/.claude/agents/builder.md.example +2 -326
  127. package/templates/root-consumer/.claude/agents/coder.md.example +2 -83
  128. package/templates/root-consumer/.claude/agents/extractor.md.example +2 -231
  129. package/templates/root-consumer/.claude/agents/polisher.md.example +2 -132
  130. package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +2 -81
  131. package/templates/root-consumer/.claude/commands/grill.md.example +30 -0
  132. package/templates/root-consumer/.claude/commands/techdebt.md.example +28 -0
  133. package/templates/root-consumer/.clinerules.example +1 -0
  134. package/templates/root-consumer/.cursor/rules/no-docs.mdc.example +15 -0
  135. package/templates/root-consumer/.cursorrules.example +1 -0
  136. package/templates/root-consumer/.github/copilot-instructions.md.example +1 -0
  137. package/templates/root-consumer/.windsurfrules.example +1 -0
  138. package/templates/root-consumer/AI.md.example +44 -123
  139. package/templates/root-consumer/CLAUDE.md.example +1 -134
  140. package/templates/root-consumer/CONVENTIONS.md.example +1 -0
  141. package/templates/root-consumer/GEMINI.md.example +1 -0
  142. package/templates/root-consumer/firebase.json.example +1 -1
  143. package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +22 -2
  144. package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +0 -18
  145. package/templates/root-consumer/guides/dndev/COMPONENTS_UI.md.example +1 -1
  146. package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +101 -32
  147. package/templates/root-consumer/guides/dndev/INDEX.md.example +4 -2
  148. package/templates/root-consumer/guides/dndev/SETUP_APP_CONFIG.md.example +3 -3
  149. package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +241 -12
  150. package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +13 -7
  151. package/templates/root-consumer/guides/dndev/SETUP_OAUTH_PROVIDERS.md.example +60 -0
  152. package/templates/root-consumer/guides/dndev/SETUP_SOC2.md.example +234 -0
  153. package/templates/root-consumer/guides/dndev/SETUP_STRIPE.md.example +62 -0
  154. package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +124 -0
  155. package/templates/root-consumer/guides/dndev/SETUP_THEMES.md.example +6 -2
  156. package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +176 -0
  157. package/templates/root-consumer/guides/dndev/USE_ROUTING.md.example +5 -9
  158. package/templates/root-consumer/guides/dndev/essences_reference.css.example +174 -0
  159. package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +7 -8
  160. package/templates/root-consumer/guides/wai-way/agents/builder.md.example +10 -0
  161. package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +25 -5
  162. package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +13 -2
  163. package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +2 -2
  164. package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +55 -15
  165. package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +15 -4
  166. package/templates/root-consumer/guides/wai-way/spec_template.md.example +7 -6
  167. package/dist/bin/commands/lint.d.ts +0 -11
  168. package/dist/bin/commands/lint.d.ts.map +0 -1
  169. package/dist/bin/commands/lint.js.map +0 -1
  170. package/dist/bin/commands/staging.d.ts +0 -11
  171. package/dist/bin/commands/staging.d.ts.map +0 -1
  172. package/dist/bin/commands/staging.js +0 -12
  173. package/dist/bin/commands/staging.js.map +0 -1
  174. package/templates/app-payload/.env.example +0 -28
  175. package/templates/app-payload/README.md.example +0 -233
  176. package/templates/app-payload/collections/Company.ts.example +0 -125
  177. package/templates/app-payload/collections/Hero.ts.example +0 -62
  178. package/templates/app-payload/collections/Media.ts.example +0 -41
  179. package/templates/app-payload/collections/Products.ts.example +0 -115
  180. package/templates/app-payload/collections/Services.ts.example +0 -104
  181. package/templates/app-payload/collections/Testimonials.ts.example +0 -92
  182. package/templates/app-payload/collections/Users.ts.example +0 -35
  183. package/templates/app-payload/src/server.ts.example +0 -79
  184. package/templates/app-payload/tsconfig.json.example +0 -24
@@ -1,125 +0,0 @@
1
- import { CollectionConfig } from 'payload/types';
2
-
3
- export const Company: CollectionConfig = {
4
- slug: 'company',
5
- admin: {
6
- useAsTitle: 'name',
7
- defaultColumns: ['name', 'email', 'phone', 'updatedAt'],
8
- },
9
- access: {
10
- read: () => true,
11
- },
12
- fields: [
13
- {
14
- name: 'name',
15
- type: 'text',
16
- required: true,
17
- admin: {
18
- description: 'Company name',
19
- },
20
- },
21
- {
22
- name: 'tagline',
23
- type: 'text',
24
- admin: {
25
- description: 'Company tagline or slogan',
26
- },
27
- },
28
- {
29
- name: 'description',
30
- type: 'textarea',
31
- admin: {
32
- description: 'Company description for about page',
33
- },
34
- },
35
- {
36
- name: 'email',
37
- type: 'email',
38
- required: true,
39
- admin: {
40
- description: 'Primary contact email',
41
- },
42
- },
43
- {
44
- name: 'phone',
45
- type: 'text',
46
- admin: {
47
- description: 'Contact phone number',
48
- },
49
- },
50
- {
51
- name: 'address',
52
- type: 'group',
53
- fields: [
54
- {
55
- name: 'street',
56
- type: 'text',
57
- },
58
- {
59
- name: 'city',
60
- type: 'text',
61
- },
62
- {
63
- name: 'state',
64
- type: 'text',
65
- },
66
- {
67
- name: 'zip',
68
- type: 'text',
69
- },
70
- {
71
- name: 'country',
72
- type: 'text',
73
- },
74
- ],
75
- admin: {
76
- description: 'Company address',
77
- },
78
- },
79
- {
80
- name: 'social',
81
- type: 'group',
82
- fields: [
83
- {
84
- name: 'website',
85
- type: 'text',
86
- },
87
- {
88
- name: 'linkedin',
89
- type: 'text',
90
- },
91
- {
92
- name: 'twitter',
93
- type: 'text',
94
- },
95
- {
96
- name: 'github',
97
- type: 'text',
98
- },
99
- {
100
- name: 'youtube',
101
- type: 'text',
102
- },
103
- ],
104
- admin: {
105
- description: 'Social media links',
106
- },
107
- },
108
- {
109
- name: 'logo',
110
- type: 'upload',
111
- relationTo: 'media',
112
- admin: {
113
- description: 'Company logo',
114
- },
115
- },
116
- {
117
- name: 'favicon',
118
- type: 'upload',
119
- relationTo: 'media',
120
- admin: {
121
- description: 'Website favicon',
122
- },
123
- },
124
- ],
125
- };
@@ -1,62 +0,0 @@
1
- import { CollectionConfig } from 'payload/types';
2
-
3
- export const Hero: CollectionConfig = {
4
- slug: 'hero',
5
- admin: {
6
- useAsTitle: 'title',
7
- defaultColumns: ['title', 'subtitle', 'updatedAt'],
8
- },
9
- access: {
10
- read: () => true,
11
- },
12
- fields: [
13
- {
14
- name: 'title',
15
- type: 'text',
16
- required: true,
17
- admin: {
18
- description: 'Main headline for the hero section',
19
- },
20
- },
21
- {
22
- name: 'subtitle',
23
- type: 'textarea',
24
- required: true,
25
- admin: {
26
- description: 'Supporting text below the main headline',
27
- },
28
- },
29
- {
30
- name: 'ctaText',
31
- type: 'text',
32
- required: true,
33
- admin: {
34
- description: 'Call-to-action button text',
35
- },
36
- },
37
- {
38
- name: 'ctaLink',
39
- type: 'text',
40
- required: true,
41
- admin: {
42
- description: 'Where the CTA button should link to',
43
- },
44
- },
45
- {
46
- name: 'backgroundImage',
47
- type: 'upload',
48
- relationTo: 'media',
49
- admin: {
50
- description: 'Background image for the hero section',
51
- },
52
- },
53
- {
54
- name: 'isActive',
55
- type: 'checkbox',
56
- defaultValue: true,
57
- admin: {
58
- description: 'Whether this hero content should be displayed',
59
- },
60
- },
61
- ],
62
- };
@@ -1,41 +0,0 @@
1
- import { CollectionConfig } from 'payload/types';
2
-
3
- export const Media: CollectionConfig = {
4
- slug: 'media',
5
- upload: {
6
- staticDir: '../public/media',
7
- imageSizes: [
8
- {
9
- name: 'thumbnail',
10
- width: 400,
11
- height: 300,
12
- position: 'centre',
13
- },
14
- {
15
- name: 'card',
16
- width: 768,
17
- height: 1024,
18
- position: 'centre',
19
- },
20
- {
21
- name: 'hero',
22
- width: 1920,
23
- height: 1080,
24
- position: 'centre',
25
- },
26
- ],
27
- adminThumbnail: 'thumbnail',
28
- mimeTypes: ['image/*'],
29
- },
30
- fields: [
31
- {
32
- name: 'alt',
33
- type: 'text',
34
- required: true,
35
- },
36
- {
37
- name: 'caption',
38
- type: 'text',
39
- },
40
- ],
41
- };
@@ -1,115 +0,0 @@
1
- import { CollectionConfig } from 'payload/types';
2
-
3
- export const Products: CollectionConfig = {
4
- slug: 'products',
5
- admin: {
6
- useAsTitle: 'name',
7
- defaultColumns: ['name', 'category', 'isActive', 'updatedAt'],
8
- },
9
- access: {
10
- read: () => true,
11
- },
12
- fields: [
13
- {
14
- name: 'name',
15
- type: 'text',
16
- required: true,
17
- admin: {
18
- description: 'Name of the product',
19
- },
20
- },
21
- {
22
- name: 'description',
23
- type: 'textarea',
24
- required: true,
25
- admin: {
26
- description: 'Detailed description of the product',
27
- },
28
- },
29
- {
30
- name: 'shortDescription',
31
- type: 'text',
32
- required: true,
33
- admin: {
34
- description: 'Brief description for cards and previews',
35
- },
36
- },
37
- {
38
- name: 'category',
39
- type: 'select',
40
- required: true,
41
- options: [
42
- { label: 'Framework', value: 'framework' },
43
- { label: 'Tool', value: 'tool' },
44
- { label: 'Platform', value: 'platform' },
45
- { label: 'Service', value: 'service' },
46
- ],
47
- admin: {
48
- description: 'Category of the product',
49
- },
50
- },
51
- {
52
- name: 'features',
53
- type: 'array',
54
- fields: [
55
- {
56
- name: 'feature',
57
- type: 'text',
58
- required: true,
59
- },
60
- {
61
- name: 'description',
62
- type: 'text',
63
- },
64
- ],
65
- admin: {
66
- description: 'List of key features',
67
- },
68
- },
69
- {
70
- name: 'demoLink',
71
- type: 'text',
72
- admin: {
73
- description: 'Link path live demo',
74
- },
75
- },
76
- {
77
- name: 'documentationLink',
78
- type: 'text',
79
- admin: {
80
- description: 'Link path documentation',
81
- },
82
- },
83
- {
84
- name: 'githubLink',
85
- type: 'text',
86
- admin: {
87
- description: 'Link path GitHub repository',
88
- },
89
- },
90
- {
91
- name: 'image',
92
- type: 'upload',
93
- relationTo: 'media',
94
- admin: {
95
- description: 'Product image or logo',
96
- },
97
- },
98
- {
99
- name: 'isActive',
100
- type: 'checkbox',
101
- defaultValue: true,
102
- admin: {
103
- description: 'Whether this product should be displayed',
104
- },
105
- },
106
- {
107
- name: 'order',
108
- type: 'number',
109
- defaultValue: 0,
110
- admin: {
111
- description: 'Display order (lower numbers appear first)',
112
- },
113
- },
114
- ],
115
- };
@@ -1,104 +0,0 @@
1
- import { CollectionConfig } from 'payload/types';
2
-
3
- export const Services: CollectionConfig = {
4
- slug: 'services',
5
- admin: {
6
- useAsTitle: 'name',
7
- defaultColumns: ['name', 'category', 'isActive', 'updatedAt'],
8
- },
9
- access: {
10
- read: () => true,
11
- },
12
- fields: [
13
- {
14
- name: 'name',
15
- type: 'text',
16
- required: true,
17
- admin: {
18
- description: 'Name of the service',
19
- },
20
- },
21
- {
22
- name: 'description',
23
- type: 'textarea',
24
- required: true,
25
- admin: {
26
- description: 'Detailed description of the service',
27
- },
28
- },
29
- {
30
- name: 'shortDescription',
31
- type: 'text',
32
- required: true,
33
- admin: {
34
- description: 'Brief description for cards and previews',
35
- },
36
- },
37
- {
38
- name: 'category',
39
- type: 'select',
40
- required: true,
41
- options: [
42
- { label: 'Consulting', value: 'consulting' },
43
- { label: 'Training', value: 'training' },
44
- { label: 'Development', value: 'development' },
45
- { label: 'Support', value: 'support' },
46
- ],
47
- admin: {
48
- description: 'Category of the service',
49
- },
50
- },
51
- {
52
- name: 'icon',
53
- type: 'text',
54
- admin: {
55
- description: 'Icon name (e.g., "Code", "Users", "Settings")',
56
- },
57
- },
58
- {
59
- name: 'features',
60
- type: 'array',
61
- fields: [
62
- {
63
- name: 'feature',
64
- type: 'text',
65
- required: true,
66
- },
67
- ],
68
- admin: {
69
- description: 'List of features included in this service',
70
- },
71
- },
72
- {
73
- name: 'pricing',
74
- type: 'text',
75
- admin: {
76
- description: 'Pricing information (e.g., "Starting at $500/month")',
77
- },
78
- },
79
- {
80
- name: 'image',
81
- type: 'upload',
82
- relationTo: 'media',
83
- admin: {
84
- description: 'Service image or icon',
85
- },
86
- },
87
- {
88
- name: 'isActive',
89
- type: 'checkbox',
90
- defaultValue: true,
91
- admin: {
92
- description: 'Whether this service should be displayed',
93
- },
94
- },
95
- {
96
- name: 'order',
97
- type: 'number',
98
- defaultValue: 0,
99
- admin: {
100
- description: 'Display order (lower numbers appear first)',
101
- },
102
- },
103
- ],
104
- };
@@ -1,92 +0,0 @@
1
- import { CollectionConfig } from 'payload/types';
2
-
3
- export const Testimonials: CollectionConfig = {
4
- slug: 'testimonials',
5
- admin: {
6
- useAsTitle: 'clientName',
7
- defaultColumns: ['clientName', 'company', 'rating', 'isActive', 'updatedAt'],
8
- },
9
- access: {
10
- read: () => true,
11
- },
12
- fields: [
13
- {
14
- name: 'clientName',
15
- type: 'text',
16
- required: true,
17
- admin: {
18
- description: 'Name of the client',
19
- },
20
- },
21
- {
22
- name: 'company',
23
- type: 'text',
24
- required: true,
25
- admin: {
26
- description: 'Company name',
27
- },
28
- },
29
- {
30
- name: 'position',
31
- type: 'text',
32
- admin: {
33
- description: 'Client\'s position at the company',
34
- },
35
- },
36
- {
37
- name: 'quote',
38
- type: 'textarea',
39
- required: true,
40
- admin: {
41
- description: 'The testimonial quote',
42
- },
43
- },
44
- {
45
- name: 'rating',
46
- type: 'select',
47
- required: true,
48
- defaultValue: '5',
49
- options: [
50
- { label: '5 Stars', value: '5' },
51
- { label: '4 Stars', value: '4' },
52
- { label: '3 Stars', value: '3' },
53
- { label: '2 Stars', value: '2' },
54
- { label: '1 Star', value: '1' },
55
- ],
56
- admin: {
57
- description: 'Rating out of 5 stars',
58
- },
59
- },
60
- {
61
- name: 'avatar',
62
- type: 'upload',
63
- relationTo: 'media',
64
- admin: {
65
- description: 'Client avatar or photo',
66
- },
67
- },
68
- {
69
- name: 'project',
70
- type: 'text',
71
- admin: {
72
- description: 'Project or service this testimonial is about',
73
- },
74
- },
75
- {
76
- name: 'isActive',
77
- type: 'checkbox',
78
- defaultValue: true,
79
- admin: {
80
- description: 'Whether this testimonial should be displayed',
81
- },
82
- },
83
- {
84
- name: 'order',
85
- type: 'number',
86
- defaultValue: 0,
87
- admin: {
88
- description: 'Display order (lower numbers appear first)',
89
- },
90
- },
91
- ],
92
- };
@@ -1,35 +0,0 @@
1
- import { CollectionConfig } from 'payload/types';
2
-
3
- export const Users: CollectionConfig = {
4
- slug: 'users',
5
- auth: { required: true },
6
- admin: {
7
- useAsTitle: 'email',
8
- },
9
- access: {
10
- read: () => true,
11
- },
12
- fields: [
13
- {
14
- name: 'name',
15
- type: 'text',
16
- required: true,
17
- },
18
- {
19
- name: 'role',
20
- type: 'select',
21
- required: true,
22
- defaultValue: 'editor',
23
- options: [
24
- {
25
- label: 'Admin',
26
- value: 'admin',
27
- },
28
- {
29
- label: 'Editor',
30
- value: 'editor',
31
- },
32
- ],
33
- },
34
- ],
35
- };
@@ -1,79 +0,0 @@
1
- import express from 'express';
2
- import payload from 'payload';
3
- import { resolve } from 'path';
4
- import cors from 'cors';
5
- import helmet from 'helmet';
6
- import compression from 'compression';
7
- import dotenv from 'dotenv';
8
-
9
- // Load environment variables
10
- dotenv.config();
11
-
12
- const app = express();
13
-
14
- // Security middleware
15
- app.use(helmet({
16
- contentSecurityPolicy: {
17
- directives: {
18
- defaultSrc: ["'self'"],
19
- styleSrc: ["'self'", "'unsafe-inline'"],
20
- scriptSrc: ["'self'"],
21
- imgSrc: ["'self'", "data:", "https:"],
22
- },
23
- },
24
- }));
25
-
26
- // CORS configuration
27
- app.use(cors({
28
- origin: [
29
- 'http://localhost:3000',
30
- 'https://{{projectName}}.com',
31
- 'https://admin.{{projectName}}.com',
32
- ],
33
- credentials: true,
34
- }));
35
-
36
- // Compression
37
- app.use(compression());
38
-
39
- // Body parsing
40
- app.use(express.json({ limit: '10mb' }));
41
- app.use(express.urlencoded({ extended: true, limit: '10mb' }));
42
-
43
- // Initialize Payload
44
- const start = async () => {
45
- await payload.init({
46
- secret: process.env.PAYLOAD_SECRET || 'your-secret-key',
47
- express: app,
48
- onInit: async () => {
49
- payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`);
50
- },
51
- });
52
-
53
- // Health check endpoint
54
- app.get('/health', (req, res) => {
55
- res.json({ status: 'ok', timestamp: new Date().toISOString() });
56
- });
57
-
58
- // API documentation
59
- app.get('/api', (req, res) => {
60
- res.json({
61
- message: '{{projectName}} CMS API',
62
- version: '1.0.0',
63
- endpoints: {
64
- admin: payload.getAdminURL(),
65
- api: '/api',
66
- health: '/health',
67
- },
68
- });
69
- });
70
-
71
- const PORT = process.env.PORT || 3001;
72
- app.listen(PORT, () => {
73
- console.log(`🚀 {{projectName}} CMS running on port ${PORT}`);
74
- console.log(`📊 Admin panel: ${payload.getAdminURL()}`);
75
- console.log(`🔗 API endpoint: http://localhost:${PORT}/api`);
76
- });
77
- };
78
-
79
- start();
@@ -1,24 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "target": "ES2020",
5
- "lib": ["ES2020"],
6
- "baseUrl": ".",
7
- "types": ["node"],
8
- "paths": {
9
- "@/*": ["./src/*"],
10
- "@donotdev/*": ["../dndev/packages/*/src"]
11
- }
12
- },
13
- "include": [
14
- "src/**/*",
15
- "collections/**/*",
16
- "payload.config.ts",
17
- "src/server.ts"
18
- ],
19
- "exclude": [
20
- "node_modules",
21
- "dist",
22
- ".payload"
23
- ]
24
- }