@donotdev/cli 0.0.17 → 0.0.19

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 (183) hide show
  1. package/dependencies-matrix.json +67 -60
  2. package/dist/bin/commands/coach.js +8177 -0
  3. package/dist/bin/commands/create-app.js +94 -145
  4. package/dist/bin/commands/create-project.js +98 -149
  5. package/dist/bin/commands/deploy.js +81 -59
  6. package/dist/bin/commands/doctor.js +243 -698
  7. package/dist/bin/commands/emu.js +2 -2
  8. package/dist/bin/commands/format.js +4 -1
  9. package/dist/bin/commands/get-demo.js +8351 -0
  10. package/dist/bin/commands/make-admin.js +773 -152
  11. package/dist/bin/commands/setup.js +519 -1711
  12. package/dist/bin/commands/staging.js +17852 -0
  13. package/dist/bin/commands/sync-secrets.js +2 -11
  14. package/dist/bin/commands/type-check.js +7733 -1713
  15. package/dist/bin/dndev.js +913 -182
  16. package/dist/bin/donotdev.js +913 -182
  17. package/dist/index.js +191 -211
  18. package/package.json +1 -1
  19. package/templates/app-demo/index.html.example +147 -10
  20. package/templates/app-demo/src/App.tsx.example +7 -13
  21. package/templates/app-demo/src/config/app.ts.example +12 -48
  22. package/templates/app-demo/src/entities/product.ts.example +38 -0
  23. package/templates/app-demo/src/globals.css.example +5 -1
  24. package/templates/app-demo/src/main.tsx.example +13 -7
  25. package/templates/app-demo/src/pages/ChangelogPage.tsx.example +14 -0
  26. package/templates/app-demo/src/pages/DashboardPage.tsx.example +15 -0
  27. package/templates/app-demo/src/pages/HomePage.tsx.example +3 -77
  28. package/templates/app-demo/src/pages/PricingPage.tsx.example +14 -0
  29. package/templates/app-demo/src/pages/ProductsPage.tsx.example +17 -0
  30. package/templates/app-demo/src/pages/ProfilePage.tsx.example +16 -0
  31. package/templates/app-demo/src/pages/SettingsPage.tsx.example +15 -0
  32. package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +112 -0
  33. package/templates/app-demo/src/pages/ShowcasePage.tsx.example +91 -0
  34. package/templates/app-demo/src/pages/legal/LegalPage.tsx.example +14 -0
  35. package/templates/app-demo/src/pages/legal/PrivacyPage.tsx.example +14 -0
  36. package/templates/app-demo/src/pages/legal/TermsPage.tsx.example +14 -0
  37. package/templates/app-demo/tsconfig.json.example +1 -1
  38. package/templates/app-demo/vite.config.ts.example +23 -48
  39. package/templates/app-expo/README.md.example +1 -1
  40. package/templates/app-expo/app/index.tsx.example +1 -1
  41. package/templates/app-vite/src/pages/HomePage.tsx.example +8 -10
  42. package/templates/overlay-firebase/env.fragment.example +1 -1
  43. package/templates/overlay-firebase/env.fragment.expo.example +1 -1
  44. package/templates/overlay-firebase/env.fragment.nextjs.example +1 -1
  45. package/templates/overlay-supabase/env.fragment.example +1 -1
  46. package/templates/overlay-supabase/env.fragment.expo.example +1 -1
  47. package/templates/overlay-supabase/env.fragment.nextjs.example +1 -1
  48. package/templates/overlay-vercel/env.fragment.example +1 -1
  49. package/templates/overlay-vercel/env.fragment.nextjs.example +1 -1
  50. package/templates/root-consumer/.claude/commands/brainstorm.md.example +15 -1
  51. package/templates/root-consumer/.claude/commands/build.md.example +24 -2
  52. package/templates/root-consumer/.claude/commands/design.md.example +17 -0
  53. package/templates/root-consumer/.claude/commands/polish.md.example +17 -0
  54. package/templates/root-consumer/AI.md.example +54 -21
  55. package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +21 -6
  56. package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +16 -179
  57. package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +19 -21
  58. package/templates/root-consumer/guides/dndev/GOTCHAS.md.example +14 -3
  59. package/templates/root-consumer/guides/dndev/INDEX.md.example +2 -2
  60. package/templates/root-consumer/guides/dndev/SETUP_APP_CONFIG.md.example +3 -3
  61. package/templates/root-consumer/guides/dndev/SETUP_BLOG.md.example +19 -2
  62. package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +35 -1
  63. package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +17 -12
  64. package/templates/root-consumer/guides/dndev/SETUP_LAYOUTS.md.example +32 -0
  65. package/templates/root-consumer/guides/dndev/SETUP_OAUTH_PROVIDERS.md.example +1 -1
  66. package/templates/root-consumer/guides/dndev/SETUP_PAGES.md.example +74 -6
  67. package/templates/root-consumer/guides/dndev/SETUP_STRIPE.md.example +2 -2
  68. package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +17 -12
  69. package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +37 -16
  70. package/templates/root-consumer/guides/dndev/USE_ROUTING.md.example +18 -18
  71. package/templates/root-consumer/guides/dndev/essences_reference.css.example +119 -2
  72. package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +1 -1
  73. package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +14 -0
  74. package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +6 -0
  75. package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +14 -0
  76. package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +4 -5
  77. package/templates/root-consumer/guides/wai-way/page_patterns.md.example +2 -2
  78. package/dist/bin/commands/agent-setup.d.ts +0 -6
  79. package/dist/bin/commands/agent-setup.d.ts.map +0 -1
  80. package/dist/bin/commands/agent-setup.js.map +0 -1
  81. package/dist/bin/commands/build.d.ts +0 -11
  82. package/dist/bin/commands/build.d.ts.map +0 -1
  83. package/dist/bin/commands/build.js.map +0 -1
  84. package/dist/bin/commands/bump.d.ts +0 -11
  85. package/dist/bin/commands/bump.d.ts.map +0 -1
  86. package/dist/bin/commands/bump.js.map +0 -1
  87. package/dist/bin/commands/cacheout.d.ts +0 -11
  88. package/dist/bin/commands/cacheout.d.ts.map +0 -1
  89. package/dist/bin/commands/cacheout.js.map +0 -1
  90. package/dist/bin/commands/create-app.d.ts +0 -11
  91. package/dist/bin/commands/create-app.d.ts.map +0 -1
  92. package/dist/bin/commands/create-app.js.map +0 -1
  93. package/dist/bin/commands/create-project.d.ts +0 -11
  94. package/dist/bin/commands/create-project.d.ts.map +0 -1
  95. package/dist/bin/commands/create-project.js.map +0 -1
  96. package/dist/bin/commands/deploy.d.ts +0 -11
  97. package/dist/bin/commands/deploy.d.ts.map +0 -1
  98. package/dist/bin/commands/deploy.js.map +0 -1
  99. package/dist/bin/commands/dev.d.ts +0 -11
  100. package/dist/bin/commands/dev.d.ts.map +0 -1
  101. package/dist/bin/commands/dev.js.map +0 -1
  102. package/dist/bin/commands/doctor.d.ts +0 -6
  103. package/dist/bin/commands/doctor.d.ts.map +0 -1
  104. package/dist/bin/commands/doctor.js.map +0 -1
  105. package/dist/bin/commands/emu.d.ts +0 -11
  106. package/dist/bin/commands/emu.d.ts.map +0 -1
  107. package/dist/bin/commands/emu.js.map +0 -1
  108. package/dist/bin/commands/format.d.ts +0 -11
  109. package/dist/bin/commands/format.d.ts.map +0 -1
  110. package/dist/bin/commands/format.js.map +0 -1
  111. package/dist/bin/commands/make-admin.d.ts +0 -11
  112. package/dist/bin/commands/make-admin.d.ts.map +0 -1
  113. package/dist/bin/commands/make-admin.js.map +0 -1
  114. package/dist/bin/commands/preview.d.ts +0 -11
  115. package/dist/bin/commands/preview.d.ts.map +0 -1
  116. package/dist/bin/commands/preview.js.map +0 -1
  117. package/dist/bin/commands/setup.d.ts +0 -6
  118. package/dist/bin/commands/setup.d.ts.map +0 -1
  119. package/dist/bin/commands/setup.js.map +0 -1
  120. package/dist/bin/commands/sync-secrets.d.ts +0 -11
  121. package/dist/bin/commands/sync-secrets.d.ts.map +0 -1
  122. package/dist/bin/commands/sync-secrets.js.map +0 -1
  123. package/dist/bin/commands/type-check.d.ts +0 -14
  124. package/dist/bin/commands/type-check.d.ts.map +0 -1
  125. package/dist/bin/commands/type-check.js.map +0 -1
  126. package/dist/bin/commands/wai.d.ts +0 -11
  127. package/dist/bin/commands/wai.d.ts.map +0 -1
  128. package/dist/bin/commands/wai.js.map +0 -1
  129. package/dist/index.d.ts +0 -8
  130. package/dist/index.d.ts.map +0 -1
  131. package/dist/index.js.map +0 -1
  132. package/templates/app-demo/src/components/ThemeToggle.tsx.example +0 -48
  133. package/templates/app-demo/src/pages/DetailPage.tsx.example +0 -103
  134. package/templates/app-demo/src/pages/FullPage.tsx.example +0 -142
  135. package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +0 -266
  136. package/templates/app-demo/src/pages/components/LayoutRoute.tsx.example +0 -20
  137. package/templates/functions-firebase/functions-firebase/README.md.example +0 -123
  138. package/templates/functions-firebase/functions-firebase/build.mjs.example +0 -5
  139. package/templates/functions-firebase/functions-firebase/src/auth/getCustomClaims.ts.example +0 -19
  140. package/templates/functions-firebase/functions-firebase/src/auth/getUserAuthStatus.ts.example +0 -21
  141. package/templates/functions-firebase/functions-firebase/src/auth/index.ts.example +0 -11
  142. package/templates/functions-firebase/functions-firebase/src/auth/removeCustomClaims.ts.example +0 -21
  143. package/templates/functions-firebase/functions-firebase/src/auth/setCustomClaims.ts.example +0 -21
  144. package/templates/functions-firebase/functions-firebase/src/billing/handleStripeWebhook.ts.example +0 -24
  145. package/templates/functions-firebase/functions-firebase/src/billing/index.ts.example +0 -10
  146. package/templates/functions-firebase/functions-firebase/src/billing/processPaymentSuccess.ts.example +0 -14
  147. package/templates/functions-firebase/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +0 -14
  148. package/templates/functions-firebase/functions-firebase/src/index.ts.example +0 -39
  149. package/templates/functions-firebase/functions-firebase/src/oauth/checkGitHubAccess.ts.example +0 -14
  150. package/templates/functions-firebase/functions-firebase/src/oauth/disconnect.ts.example +0 -14
  151. package/templates/functions-firebase/functions-firebase/src/oauth/exchangeToken.ts.example +0 -14
  152. package/templates/functions-firebase/functions-firebase/src/oauth/getConnections.ts.example +0 -14
  153. package/templates/functions-firebase/functions-firebase/src/oauth/grantGitHubAccess.ts.example +0 -14
  154. package/templates/functions-firebase/functions-firebase/src/oauth/index.ts.example +0 -17
  155. package/templates/functions-firebase/functions-firebase/src/oauth/refreshToken.ts.example +0 -14
  156. package/templates/functions-firebase/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +0 -14
  157. package/templates/functions-firebase/functions-firebase/tsconfig.json.example +0 -21
  158. package/templates/functions-vercel/functions-vercel/README.md.example +0 -116
  159. package/templates/functions-vercel/functions-vercel/build.mjs.example +0 -52
  160. package/templates/functions-vercel/functions-vercel/src/api/auth/getCustomClaims.ts.example +0 -20
  161. package/templates/functions-vercel/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +0 -20
  162. package/templates/functions-vercel/functions-vercel/src/api/auth/removeCustomClaims.ts.example +0 -20
  163. package/templates/functions-vercel/functions-vercel/src/api/auth/setCustomClaims.ts.example +0 -20
  164. package/templates/functions-vercel/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +0 -20
  165. package/templates/functions-vercel/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +0 -20
  166. package/templates/functions-vercel/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +0 -20
  167. package/templates/functions-vercel/functions-vercel/src/api/crud/createEntity.ts.example +0 -20
  168. package/templates/functions-vercel/functions-vercel/src/api/crud/deleteEntity.ts.example +0 -20
  169. package/templates/functions-vercel/functions-vercel/src/api/crud/getEntity.ts.example +0 -20
  170. package/templates/functions-vercel/functions-vercel/src/api/crud/listEntities.ts.example +0 -20
  171. package/templates/functions-vercel/functions-vercel/src/api/crud/updateEntity.ts.example +0 -20
  172. package/templates/functions-vercel/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +0 -20
  173. package/templates/functions-vercel/functions-vercel/src/api/oauth/disconnect.ts.example +0 -20
  174. package/templates/functions-vercel/functions-vercel/src/api/oauth/exchangeToken.ts.example +0 -20
  175. package/templates/functions-vercel/functions-vercel/src/api/oauth/getConnections.ts.example +0 -20
  176. package/templates/functions-vercel/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +0 -20
  177. package/templates/functions-vercel/functions-vercel/src/api/oauth/refreshToken.ts.example +0 -20
  178. package/templates/functions-vercel/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +0 -20
  179. package/templates/functions-vercel/functions-vercel/tsconfig.json.example +0 -21
  180. package/templates/functions-vercel/functions-vercel/vercel.json.example +0 -14
  181. package/templates/github/github/workflows/firebase-deploy.yml.example +0 -79
  182. /package/templates/functions-firebase/{functions-firebase/.env.example.example → .env.example} +0 -0
  183. /package/templates/functions-vercel/{functions-vercel/.env.example.example → .env.example} +0 -0
@@ -16,11 +16,10 @@
16
16
  1. **P0 — Prerequisites**
17
17
  - **Runtime:** **Node.js 24** (nodejs.org) and **Bun 1.3+** (bun.sh). Both required.
18
18
  - **IDE:** Any IDE (Cursor, VS Code, Windsurf, etc.). Need help? Use the collapsible “Need help setting up?” on the Get Started page.
19
- 2. **Install our CLI and create your project’s monorepo**
20
- - `npm install -g @donotdev/cli`
21
- - `dndev init my-app`
22
- 3. **Open the repo in your IDE, terminal, bun install**
23
- - Start your IDE in that repo, open the terminal: `cd my-app` → `bun install`
19
+ 2. **Create your project’s monorepo**
20
+ - `bunx create-donotdev my-app`
21
+ 3. **Open the repo in your IDE**
22
+ - Start your IDE in that repo. Dependencies are already installed.
24
23
  4. **Enable MCP, then read AI.md and follow the flow**
25
24
  - Talk with your agent; ask it to load the MCP (Cursor: Ctrl+Shift+P → “MCP Server” → enable “donotdev”; other IDEs: see “How to enable MCP” collapsible on the Get Started page).
26
25
  - Then have the agent read the root **`AI.md`** and this file (**`guides/dndev/AGENT_START_HERE.md`**). Follow the phases.
@@ -29,6 +28,22 @@
29
28
 
30
29
  ---
31
30
 
31
+ ## Demo App — Canonical Reference
32
+
33
+ **Before building anything, look at the demo app:** `packages/cli/templates/app-demo/`
34
+
35
+ It demonstrates the correct way to use the framework:
36
+ - Per-route layout switching via `PageMeta.preset` (landing → admin → docs)
37
+ - SaaS pages as thin template wrappers (~5 lines each)
38
+ - Component showcase with filterable grid and detail pages
39
+ - Entity definition with `defineEntity()`
40
+ - Zero custom CSS in page files
41
+ - Auth-guarded routes alongside public routes
42
+
43
+ **Copy from the demo app, then customize.** Don't invent patterns — the demo app IS the pattern.
44
+
45
+ ---
46
+
32
47
  ## First Thing to Call: list_features()
33
48
 
34
49
  Call **`list_features()`** before designing or coding. It lists all framework packages with a one-line summary from each README (templates, core, ui, auth, billing, etc.). Use it so you don't reinvent what the framework already provides (blog, CRUD, billing, legal pages, etc.).
@@ -81,7 +96,7 @@ Check that the user has completed environment setup:
81
96
  2. Service account key exists? (`service-account-key.json` in app root)
82
97
  3. Emulators work? (`dndev emu start` runs without errors)
83
98
 
84
- If not, coach them: "Run `dndev setup firebase` first, then follow the prompts." See [SETUP_FIREBASE.md](./SETUP_FIREBASE.md).
99
+ If not, coach them: "Run `dndev coach` to see what to configure, fill in the .env values, then run `dndev setup`." See [SETUP_FIREBASE.md](./SETUP_FIREBASE.md) or [SETUP_SUPABASE.md](./SETUP_SUPABASE.md).
85
100
 
86
101
  ---
87
102
 
@@ -1,16 +1,9 @@
1
- # Advanced Components (@donotdev/adv-comps)
1
+ # Advanced Components (@donotdev/components)
2
2
 
3
- High-level, opinionated, and marketing-focused UI components for DoNotDev framework.
3
+ High-level, opinionated, and marketing-focused UI components from `@donotdev/components`.
4
4
 
5
- ## Setup
6
-
7
- **IMPORTANT:** You must import the styles in your `globals.css` file:
8
-
9
- ```css
10
- @import '@donotdev/adv-comps/styles';
11
- ```
12
-
13
- Without this import, components will not have their required CSS styles.
5
+ All advanced components are included in `@donotdev/components` — no additional package needed.
6
+ Styles are automatically included via `@donotdev/components/styles`.
14
7
 
15
8
  ## Components
16
9
 
@@ -19,7 +12,7 @@ Without this import, components will not have their required CSS styles.
19
12
  Cinematic 3D text crawl component with lazy loading.
20
13
 
21
14
  ```tsx
22
- import { Crawl } from '@donotdev/adv-comps';
15
+ import { Crawl } from '@donotdev/components';
23
16
 
24
17
  <Crawl
25
18
  intro?: ReactNode | string
@@ -39,7 +32,7 @@ import { Crawl } from '@donotdev/adv-comps';
39
32
  Production-grade marquee with accessibility, reduced motion support, and smart behavior detection.
40
33
 
41
34
  ```tsx
42
- import { Marquee } from '@donotdev/adv-comps';
35
+ import { Marquee } from '@donotdev/components';
43
36
 
44
37
  <Marquee<T>
45
38
  items: T[]
@@ -63,8 +56,8 @@ import { Marquee } from '@donotdev/adv-comps';
63
56
  Timeline component with horizontal (desktop) / vertical (mobile) layout. Features animated progress line, glowing nodes, and lift-on-hover cards.
64
57
 
65
58
  ```tsx
66
- import { Roadmap } from '@donotdev/adv-comps';
67
- import type { RoadmapStep } from '@donotdev/adv-comps';
59
+ import { Roadmap } from '@donotdev/components';
60
+ import type { RoadmapStep } from '@donotdev/components';
68
61
 
69
62
  <Roadmap
70
63
  steps: RoadmapStep[]
@@ -88,8 +81,8 @@ interface RoadmapStep {
88
81
  Simple scroll-reveal stacked cards. Active card shows full content, stacked cards show only bottom edge with number.
89
82
 
90
83
  ```tsx
91
- import { StackedCards } from '@donotdev/adv-comps';
92
- import type { StackedCardData } from '@donotdev/adv-comps';
84
+ import { StackedCards } from '@donotdev/components';
85
+ import type { StackedCardData } from '@donotdev/components';
93
86
 
94
87
  <StackedCards
95
88
  items: StackedCardData[]
@@ -111,7 +104,7 @@ interface StackedCardData extends ComponentData {
111
104
  Reveal component for staggered animations. Features viewport-based visibility detection, directional animations, and customizable stagger delays.
112
105
 
113
106
  ```tsx
114
- import { Reveal } from '@donotdev/adv-comps';
107
+ import { Reveal } from '@donotdev/components';
115
108
 
116
109
  <Reveal
117
110
  items: string[] | ReactNode[]
@@ -131,54 +124,13 @@ import { Reveal } from '@donotdev/adv-comps';
131
124
  />
132
125
  ```
133
126
 
134
- ### InspectorGadget
135
-
136
- Floating code inspector component. Displays a floating button with Code icon and label that opens a dialog showing the page's source code.
137
-
138
- ```tsx
139
- import { InspectorGadget } from '@donotdev/adv-comps';
140
-
141
- <InspectorGadget
142
- data?: string // Source code string
143
- sourcePath?: string // Path to source file (import with ?raw) - overrides data if provided
144
- sourceCode?: string // Source code loaded from file
145
- language?: string // Code language for syntax highlighting @default 'tsx'
146
- title?: string // Dialog title @default 'Page Source'
147
- className?: string
148
- />
149
- ```
150
-
151
- ### Breathing Components
152
-
153
- Breathing exercise components for meditation and wellness apps.
154
-
155
- ```tsx
156
- import { LungsAnimation, BreathingExerciseLayout } from '@donotdev/adv-comps';
157
- import type { BreathingExerciseDnDevLayoutProps } from '@donotdev/adv-comps';
158
-
159
- <BreathingExerciseLayout
160
- status?: ReactNode
161
- animation: ReactNode
162
- instructions: ReactNode
163
- debug?: boolean
164
- onSkip?: () => void
165
- statusValue?: string
166
- onRestart?: () => void
167
- onResume?: () => void
168
- isPaused?: boolean
169
- isComplete?: boolean
170
- />
171
-
172
- <LungsAnimation ... />
173
- ```
174
-
175
127
  ### Carousel
176
128
 
177
129
  Premium carousel component with lazy loading built-in. Features true infinite circular loop, hardware-accelerated animations, swipe/touch gestures, and autoplay with pause-on-hover.
178
130
 
179
131
  ```tsx
180
- import { Carousel } from '@donotdev/adv-comps';
181
- import type { CarouselProps, CarouselRef } from '@donotdev/adv-comps';
132
+ import { Carousel } from '@donotdev/components';
133
+ import type { CarouselProps, CarouselRef } from '@donotdev/components';
182
134
 
183
135
  <Carousel<T>
184
136
  items: T[]
@@ -196,100 +148,13 @@ import type { CarouselProps, CarouselRef } from '@donotdev/adv-comps';
196
148
  />
197
149
  ```
198
150
 
199
- ### ComparisonGrid
200
-
201
- Comparison grid component for displaying feature comparisons. Provides lazy-loaded content with skeleton loading states.
202
-
203
- ```tsx
204
- import { ComparisonGrid } from '@donotdev/adv-comps';
205
- import type { ComparisonItem } from '@donotdev/adv-comps';
206
-
207
- <ComparisonGrid
208
- title?: string
209
- items: ComparisonItem[]
210
- gridCols?: 1 | 2 | 3 | 4 // @default 2
211
- className?: string
212
- ariaLabel?: string
213
- />
214
-
215
- // ComparisonItem interface:
216
- interface ComparisonItem {
217
- useCase: string
218
- bestFit: string
219
- dndev: string
220
- reason: string
221
- }
222
- ```
223
-
224
- ### CongratulationsCard
225
-
226
- Card component for displaying congratulatory messages. Features customizable icon and text with centered layout.
227
-
228
- ```tsx
229
- import { CongratulationsCard } from '@donotdev/adv-comps';
230
-
231
- <CongratulationsCard
232
- text: string
233
- icon?: ReactNode // @default '🎉'
234
- className?: string
235
- />
236
- ```
237
-
238
- ### GuideModal
239
-
240
- Modal component for displaying guides and tutorials. Provides step-by-step guide display with navigation, progress tracking, and completion handling.
241
-
242
- ```tsx
243
- import { GuideModal } from '@donotdev/adv-comps';
244
- import type { GuideModalProps, GuideTemplate } from '@donotdev/adv-comps';
245
-
246
- <GuideModal
247
- open: boolean
248
- onOpenChange: (open: boolean) => void
249
- guide: GuideTemplate
250
- icon?: LucideIcon
251
- />
252
-
253
- // GuideTemplate interface:
254
- interface GuideTemplate {
255
- title: string
256
- subtitle: string
257
- quickStart?: {
258
- title: string
259
- code: string
260
- description: string
261
- }
262
- steps?: GuideStep[]
263
- features?: string[]
264
- templates?: Array<{
265
- name: string
266
- description: string
267
- }>
268
- actions?: Array<{
269
- label: string
270
- href: string
271
- variant?: 'default' | 'outline'
272
- icon?: LucideIcon
273
- }>
274
- }
275
-
276
- // GuideStep interface:
277
- interface GuideStep {
278
- icon: LucideIcon
279
- title: string
280
- description: string
281
- code?: string
282
- details?: string
283
- }
284
- ```
285
-
286
151
  ### SplitReveal
287
152
 
288
153
  Split reveal component for displaying content in two columns. Features left column content and right column stat cards or custom content with reveal animations.
289
154
 
290
155
  ```tsx
291
- import { SplitReveal } from '@donotdev/adv-comps';
292
- import type { StatCardData } from '@donotdev/adv-comps';
156
+ import { SplitReveal } from '@donotdev/components';
157
+ import type { StatCardData } from '@donotdev/components';
293
158
 
294
159
  <SplitReveal
295
160
  left: ReactNode
@@ -307,34 +172,6 @@ interface StatCardData {
307
172
  }
308
173
  ```
309
174
 
310
- ### StartChallengeForm
311
-
312
- Generic form layout component for input + CTA button patterns.
313
-
314
- ```tsx
315
- import { StartChallengeForm } from '@donotdev/adv-comps';
316
-
317
- <StartChallengeForm
318
- input={{
319
- value: string
320
- onChange: (value: string) => void
321
- placeholder?: string
322
- label?: string
323
- maxLength?: number
324
- className?: string
325
- }}
326
- button={{
327
- label: string
328
- onClick: () => void
329
- icon?: ComponentType<{ className?: string }>
330
- variant?: ButtonVariant
331
- className?: string
332
- }}
333
- size?: 'sm' | 'md' | 'lg'
334
- className?: string
335
- />
336
- ```
337
-
338
175
  ## Notes
339
176
 
340
177
  - All components are lazy-loaded by default for optimal performance
@@ -346,7 +183,7 @@ import { StartChallengeForm } from '@donotdev/adv-comps';
346
183
 
347
184
  FAQ section component for displaying frequently asked questions using accordion. Reads FAQ items from i18n JSON files.
348
185
 
349
- **Note:** This component is from `@donotdev/core`, not `@donotdev/adv-comps`. It requires i18n setup with translation files.
186
+ **Note:** This component is from `@donotdev/core`, not `@donotdev/components`. It requires i18n setup with translation files.
350
187
 
351
188
  ```tsx
352
189
  import { FAQSection, useTranslation } from '@donotdev/core';
@@ -10,12 +10,13 @@ If you haven’t run `dndev init` yet, see [AGENT_START_HERE.md](./AGENT_START_H
10
10
 
11
11
  ```
12
12
  bun install → install dependencies
13
- dndev dev -> start app, read the homepage setup guide
14
- dndev setup firebase -> configure Firebase project + .env
15
- -- or --
16
- dndev setup supabase -> configure Supabase project + .env
17
- dndev emu start -> test locally with emulators (Firebase)
18
- dndev deploy -> deploy to production
13
+ dndev dev start app, read the homepage setup guide
14
+ dndev coach → see what to configure (numbered checklist)
15
+ (fill in .env values from dashboard)
16
+ dndev setup validate .env, automate provider config
17
+ dndev doctor → health check
18
+ dndev emu start → test locally with emulators (Firebase)
19
+ dndev deploy → deploy to production
19
20
  ```
20
21
 
21
22
  ---
@@ -49,31 +50,27 @@ git push -u origin main
49
50
 
50
51
  ## Step 3: Backend Setup
51
52
 
52
- ### Firebase
53
+ ### 1. See what to configure
53
54
 
54
55
  ```bash
55
- dndev setup firebase
56
+ dndev coach
56
57
  ```
57
58
 
58
- Automates: project selection/creation, web app, SDK config -> `.env`, `.firebaserc`.
59
+ Prints a numbered checklist: which dashboard to visit, what to copy, where to paste it. No automation, no prompts.
59
60
 
60
- Then 2 manual steps (CLI gives you direct links):
61
- 1. Download service account key -> save as `service-account-key.json`
62
- 2. Enable Auth + Firestore in Firebase Console
61
+ ### 2. Fill in .env values
63
62
 
64
- See [SETUP_FIREBASE.md](./SETUP_FIREBASE.md) for full details.
63
+ Follow the coach checklist. Paste credentials from your provider dashboards into the appropriate `.env` files.
65
64
 
66
- ### Supabase
65
+ ### 3. Run setup
67
66
 
68
67
  ```bash
69
- dndev setup supabase
68
+ dndev setup
70
69
  ```
71
70
 
72
- Asks for your **public** project URL and anon key (both safe to share -- shipped in client bundle).
71
+ Validates all required env vars are present, runs provider automation (CLI linking, migrations, etc.), and runs an inline health check. If values are missing, it tells you which ones and points you back to `dndev coach`.
73
72
 
74
- Get them from: https://supabase.com/dashboard -> your project -> Settings -> API
75
-
76
- See [SETUP_SUPABASE.md](./SETUP_SUPABASE.md) for full details (tables, RLS, `dndev generate sql`). See [Secrets Philosophy](#secrets-philosophy) for how we handle secret keys.
73
+ See [SETUP_FIREBASE.md](./SETUP_FIREBASE.md) or [SETUP_SUPABASE.md](./SETUP_SUPABASE.md) for full details. See [Secrets Philosophy](#secrets-philosophy) for how we handle secret keys.
77
74
 
78
75
  ---
79
76
 
@@ -188,8 +185,9 @@ my-project/
188
185
  |---------|-------------|
189
186
  | `dndev dev` | Start dev server |
190
187
  | `dndev emu start` | Start Firebase emulators |
191
- | `dndev setup firebase` | Configure Firebase project + .env |
192
- | `dndev setup supabase` | Configure Supabase project + .env |
188
+ | `dndev coach` | Show what to configure (numbered checklist) |
189
+ | `dndev setup` | Validate .env, automate provider config, health check |
190
+ | `dndev doctor` | Check project health (providers, .env) |
193
191
  | `dndev deploy` | **Firebase:** hosting + functions + rules. **Supabase:** deploys frontend to [Vercel](https://vercel.com) (via scaffolded vercel.json) and Edge Functions to Supabase. Set `VITE_SUPABASE_*` in Vercel project env. |
194
192
  | `dndev staging` | Deploy to staging environment |
195
193
  | `dndev sync-secrets` | Push functions/.env to runtime (Firebase/Vercel) |
@@ -18,7 +18,7 @@ import { getFirestore } from '@donotdev/firebase';
18
18
  import { handleError } from '@donotdev/core';
19
19
  ```
20
20
 
21
- **Rule:** Always use `/server` suffix for `@donotdev/firebase/server`, `@donotdev/core/server`, `@donotdev/utils/server`.
21
+ **Rule:** Always use `/server` suffix for `@donotdev/core/server`, `@donotdev/firebase/server`, `@donotdev/security/server`.
22
22
 
23
23
  **ESM only — never use `require()`.**
24
24
 
@@ -49,7 +49,7 @@ One line for values, one line for types. Blank line between categories.
49
49
  import { Link, useNavigate, useParams } from 'react-router-dom';
50
50
 
51
51
  // ✅ CORRECT
52
- import { Link, useNavigate, useParams } from '@donotdev/ui/routing';
52
+ import { Link, useNavigate, useParams } from '@donotdev/ui';
53
53
  ```
54
54
 
55
55
  **Routes are auto-discovered** from `src/pages/*Page.tsx` with `pageMeta`. Don't use `<Routes>`, `<Route>`, or manual `<Outlet />`.
@@ -106,7 +106,18 @@ Common wrong props:
106
106
  ## CRUD [Phase 2, 3]
107
107
 
108
108
  **Hidden fields are auto-added by `defineEntity()` — don't define them manually:**
109
- - `id`, `createdAt`, `updatedAt`, `createdById`, `updatedById`, `status`
109
+ - `id`, `createdAt`, `updatedAt`, `createdById`, `updatedById`
110
+
111
+ **Status field — extend, don't redefine.**
112
+ The `status` field is auto-added with locked `visibility: 'admin'`, `editable: 'admin'`, `type: 'select'`. Only `validation.options` can be extended.
113
+
114
+ ```typescript
115
+ // ❌ WRONG - these properties are silently ignored
116
+ status: { type: 'select', visibility: 'owner', editable: 'admin', validation: { options: [...] } }
117
+
118
+ // ✅ CORRECT - only extend options (merged after defaults: draft, available, deleted)
119
+ status: { validation: { options: [{ value: 'shipped', label: 'Shipped' }] } }
120
+ ```
110
121
 
111
122
  **Scope field is auto-added** when `scope` is configured. Don't manually define the scope field (e.g., `companyId`).
112
123
 
@@ -11,8 +11,8 @@
11
11
  - **Human flow:** P0 (Bun/Node + AI IDE) → Install CLI & `dndev init` → Run **AI.md** → Enjoy. See [AGENT_START_HERE.md](./AGENT_START_HERE.md) § Getting started (for humans).
12
12
  - [ENV_SETUP.md](./ENV_SETUP.md) — After `dndev init`: env, Firebase/Supabase, deploy
13
13
  - [GOTCHAS.md](./GOTCHAS.md) - **Common mistakes & pitfalls** (phase-tagged, read before coding)
14
- - [SETUP_FIREBASE.md](./SETUP_FIREBASE.md) - Firebase project setup (`dndev setup firebase`)
15
- - [SETUP_SUPABASE.md](./SETUP_SUPABASE.md) - Supabase project setup (`dndev setup supabase`, `dndev generate sql`)
14
+ - [SETUP_FIREBASE.md](./SETUP_FIREBASE.md) - Firebase project setup (`dndev coach` `dndev setup`)
15
+ - [SETUP_SUPABASE.md](./SETUP_SUPABASE.md) - Supabase project setup (`dndev coach` `dndev setup`)
16
16
  - [SETUP_TESTING.md](./SETUP_TESTING.md) - Test generation (Phase 4)
17
17
 
18
18
  ---
@@ -109,14 +109,14 @@ export default defineViteConfig({
109
109
 
110
110
  **Vite loads `.env` from the app directory only.** Not the repo root.
111
111
 
112
- Run `dndev setup firebase` to auto-populate Firebase config. See [SETUP_FIREBASE.md](./SETUP_FIREBASE.md).
112
+ Run `dndev coach` to see what to configure, then `dndev setup` to validate and automate. See [SETUP_FIREBASE.md](./SETUP_FIREBASE.md).
113
113
 
114
114
  ```bash
115
115
  # apps/<your-app>/.env — client-side variables (exposed to browser)
116
116
  VITE_APP_URL=http://localhost:5173
117
117
  VITE_DONOTDEV_LICENSE_KEY=dndev_your_key_here
118
- VITE_FIREBASE_API_KEY=... # Written by dndev setup firebase
119
- VITE_FIREBASE_PROJECT_ID=... # Written by dndev setup firebase
118
+ VITE_FIREBASE_API_KEY=... # Written by dndev setup
119
+ VITE_FIREBASE_PROJECT_ID=... # Written by dndev setup
120
120
  VITE_AUTH_PARTNERS=github,google
121
121
  VITE_STRIPE_PUBLISHABLE_KEY=pk_test_...
122
122
 
@@ -212,14 +212,31 @@ const filtered = blog.getPostsByTag('react'); // Posts tagged 'react'
212
212
 
213
213
  ## RSS & Sitemap
214
214
 
215
- **Auto-generated at build time.** The SEO pipeline (Vite `SEOPlugin` / Next.js `SEOHandler`) automatically:
215
+ **Fully automatic zero configuration.** The framework handles everything:
216
+
217
+ ### Build-time generation
218
+
219
+ The SEO pipeline (Vite `SEOPlugin` / Next.js `SEOHandler`) automatically:
216
220
 
217
221
  1. Discovers `src/content/blog/*_en.md` files
218
222
  2. Appends blog post URLs to `sitemap.xml`
219
- 3. Generates `rss.xml` with all posts
223
+ 3. Generates `rss.xml` (RSS 2.0 with Atom self-link) with all posts
220
224
 
221
225
  No manual scripts needed. Just drop `.md` files and build.
222
226
 
227
+ ### RSS auto-discovery
228
+
229
+ A `<link rel="alternate" type="application/rss+xml">` tag is automatically injected in the `<head>` by `AutoMetaTags`. This lets browsers and feed readers detect the feed without users needing to know the URL.
230
+
231
+ **Requires:** `VITE_APP_URL` (or `NEXT_PUBLIC_APP_URL`) set in `.env` — the RSS link uses the base URL to construct `https://yourdomain.com/rss.xml`.
232
+
233
+ ### RSS feed contents
234
+
235
+ Each blog post entry includes:
236
+ - `<title>`, `<description>`, `<link>`, `<guid>`, `<pubDate>`
237
+ - `<category>` (from frontmatter `tags`)
238
+ - `<enclosure>` (from frontmatter `image`, if set)
239
+
223
240
  ---
224
241
 
225
242
  ## Scaling (50+ Posts)
@@ -28,6 +28,40 @@ export const productEntity = defineEntity({
28
28
 
29
29
  See `lookup_symbol("defineEntity")` for all options (scope, access, ownership, uniqueKeys, validation).
30
30
 
31
+ ### Status Field (auto-added)
32
+
33
+ The `status` field is auto-added by `defineEntity()` with **locked** properties:
34
+
35
+ | Property | Locked Value | Can Override? |
36
+ |----------|-------------|---------------|
37
+ | `type` | `'select'` | No |
38
+ | `visibility` | `'admin'` | No |
39
+ | `editable` | `'admin'` | No |
40
+ | `required` | `true` | No |
41
+
42
+ **Default options:** `draft`, `available`, `deleted` — always present, cannot be removed.
43
+ **Default value:** `available`.
44
+
45
+ To add custom options, define **only** `validation.options` — they merge after defaults:
46
+
47
+ ```typescript
48
+ fields: {
49
+ status: {
50
+ validation: {
51
+ options: [
52
+ { value: 'shipped', label: 'Shipped' },
53
+ { value: 'returned', label: 'Returned' },
54
+ ],
55
+ },
56
+ },
57
+ // Result: [draft, available, deleted, shipped, returned]
58
+ }
59
+ ```
60
+
61
+ **Do NOT** set `type`, `visibility`, or `editable` on `status` — they are silently ignored.
62
+
63
+ > `draft` and `deleted` items are hidden from non-admin users (server-side filtering).
64
+
31
65
  ---
32
66
 
33
67
  ## 2. Provider Setup (once)
@@ -111,7 +145,7 @@ access: { create: 'admin', read: 'guest', update: 'admin', delete: 'admin' }
111
145
  For marketplace patterns. See `lookup_symbol("defineEntity")` → `ownership`.
112
146
 
113
147
  **Firebase:** Enforced by generated secure Firebase Functions (server-side).
114
- **Supabase:** Enforced via RLS policies — generated by `dndev setup supabase`.
148
+ **Supabase:** Enforced via RLS policies — generated by `dndev setup`.
115
149
 
116
150
  ---
117
151
 
@@ -4,19 +4,24 @@
4
4
 
5
5
  ---
6
6
 
7
- ## Step 1: Run Firebase Setup
7
+ ## Step 1: Run Coach + Fill .env
8
8
 
9
9
  ```bash
10
- dndev setup firebase
10
+ dndev coach
11
11
  ```
12
12
 
13
- This command:
14
- - Checks Firebase CLI is installed and you're logged in
15
- - Lists your Firebase projects (or creates a new one)
16
- - Creates a web app if the project doesn't have one
17
- - Gets the SDK config and writes it to your app's `.env`
18
- - Updates `.firebaserc` with the project ID
19
- - Updates `firebase.json` placeholders
13
+ This prints a numbered checklist of what to configure. For Firebase, you'll need:
14
+ - **SDK config** (API key, project ID, auth domain, etc.) → paste into your app's `.env`
15
+ - **Service account key** download and save as `service-account-key.json`
16
+ - **Enable services** (Auth, Firestore, Storage) in Firebase Console
17
+
18
+ Then run setup to validate and automate:
19
+
20
+ ```bash
21
+ dndev setup
22
+ ```
23
+
24
+ Setup validates .env values, checks Firebase CLI, selects/creates a web app, updates `.firebaserc` and `firebase.json`.
20
25
 
21
26
  **After running, it will prompt you for 2 manual steps (below).**
22
27
 
@@ -154,7 +159,7 @@ If you deploy manually with `firebase deploy`, you'll see `403 Forbidden` on COR
154
159
  | `functions/.env` | Server secrets: STRIPE_SECRET_KEY, OAuth secrets | Cloud Functions runtime |
155
160
  | Root `.env` | **Not read by Vite.** Reference only. | Nothing |
156
161
 
157
- **`dndev setup firebase` writes Firebase vars to `apps/<app>/.env` automatically.**
162
+ **`dndev setup` writes Firebase vars to the app's `.env` automatically.**
158
163
 
159
164
  **Custom domains:** Framework uses `APP_URL` hostname as `authDomain` in production (not Firebase's `projectId.firebaseapp.com`). Set your `FIREBASE_AUTH_DOMAIN` env var (with the appropriate `VITE_` or `NEXT_PUBLIC_` prefix) in `.env.local` and `.env.production` — framework handles the rest.
160
165
 
@@ -163,7 +168,7 @@ If you deploy manually with `firebase deploy`, you'll see `403 Forbidden` on COR
163
168
  ## Staging Environment (Optional)
164
169
 
165
170
  1. Create a second Firebase project (e.g., `my-app-staging`)
166
- 2. Run `dndev setup firebase` again and select the staging project
171
+ 2. Run `dndev setup firebase` to configure the staging project
167
172
  3. The wizard updates `.firebaserc` — add a `"staging"` alias manually if the wizard only sets `"default"`:
168
173
  ```json
169
174
  { "projects": { "default": "my-app-prod", "staging": "my-app-staging" } }
@@ -223,4 +228,4 @@ See [ENV_SETUP.md → Secrets Philosophy](./ENV_SETUP.md#secrets-philosophy) for
223
228
 
224
229
  ---
225
230
 
226
- **`dndev setup firebase` → download service account key → enable Auth + Firestore → `dndev emu start` → `dndev deploy`. That's it.**
231
+ **`dndev coach` → fill .env → `dndev setup` → download service account key → enable Auth + Firestore → `dndev emu start` → `dndev deploy`. That's it.**
@@ -36,6 +36,38 @@ All presets automatically include these components when applicable:
36
36
 
37
37
  ---
38
38
 
39
+ ## Per-Route Layout Switching
40
+
41
+ **Override the app preset on a per-page basis via `PageMeta.preset`:**
42
+
43
+ ```tsx
44
+ // src/pages/DashboardPage.tsx
45
+ import type { PageMeta } from '@donotdev/core';
46
+
47
+ export const meta: PageMeta = {
48
+ preset: 'admin', // This route uses admin layout (sidebar, compact density)
49
+ auth: true,
50
+ };
51
+ ```
52
+
53
+ - If `preset` is set → that route uses the specified layout
54
+ - If `preset` is absent → the app's `appConfig.preset` is used
55
+ - The override is **transient** — navigating away restores the next route's preset or the app default
56
+ - No localStorage pollution — route presets are not persisted
57
+
58
+ **Common pattern (SaaS app):**
59
+ | Route | Preset | Purpose |
60
+ |-------|--------|---------|
61
+ | `/` | (app default: `landing`) | Marketing landing page |
62
+ | `/pricing` | (app default: `landing`) | Pricing page |
63
+ | `/dashboard` | `admin` | Dashboard with sidebar |
64
+ | `/products` | `admin` | CRUD with sidebar |
65
+ | `/changelog` | `docs` | Documentation layout |
66
+
67
+ **Reference implementation:** See `packages/cli/templates/app-demo/` for a working example of per-route switching.
68
+
69
+ ---
70
+
39
71
  ## Advanced: Slot Overrides
40
72
 
41
73
  **Customize zones:**
@@ -1,7 +1,7 @@
1
1
  # OAuth Provider Setup Guide
2
2
 
3
3
  Each OAuth provider requires manual registration in their developer console.
4
- `dndev setup oauth` computes the correct redirect URI for you.
4
+ `dndev coach` shows the correct redirect URI and setup steps for each provider.
5
5
 
6
6
  ## Redirect URIs
7
7