@donotdev/cli 0.1.1 → 0.1.42

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 (366) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +0 -0
  3. package/dependencies-matrix.json +93 -40
  4. package/dist/bin/commands/agent-setup.js +695 -420
  5. package/dist/bin/commands/build.js +1181 -832
  6. package/dist/bin/commands/bump.js +1054 -771
  7. package/dist/bin/commands/cacheout.js +253 -355
  8. package/dist/bin/commands/coach.js +275 -375
  9. package/dist/bin/commands/create-app.js +1074 -790
  10. package/dist/bin/commands/create-project.js +1106 -819
  11. package/dist/bin/commands/db.js +17045 -16542
  12. package/dist/bin/commands/deploy.js +1999 -1367
  13. package/dist/bin/commands/dev.js +879 -627
  14. package/dist/bin/commands/doctor.js +696 -425
  15. package/dist/bin/commands/emu.js +1001 -712
  16. package/dist/bin/commands/format.js +253 -355
  17. package/dist/bin/commands/get-demo.js +968 -706
  18. package/dist/bin/commands/make-admin.js +6279 -5746
  19. package/dist/bin/commands/preview.js +883 -628
  20. package/dist/bin/commands/seed.js +17058 -16555
  21. package/dist/bin/commands/setup-cicd.js +1024 -749
  22. package/dist/bin/commands/setup.js +1162 -844
  23. package/dist/bin/commands/staging.js +2000 -1368
  24. package/dist/bin/commands/sync-secrets.js +1181 -667
  25. package/dist/bin/commands/type-check.js +735 -461
  26. package/dist/bin/commands/wai.js +258 -360
  27. package/dist/bin/dndev.js +31 -16
  28. package/dist/bin/donotdev.js +31 -16
  29. package/dist/index.js +2189 -1513
  30. package/guidelines/DEPENDENCIES.md +155 -0
  31. package/guidelines/VERSION_CONTROL.md +0 -0
  32. package/package.json +1 -1
  33. package/templates/app-demo/.env.example +1 -1
  34. package/templates/app-demo/entities/Contact.ts.example +0 -0
  35. package/templates/app-demo/entities/ExampleEntity.ts.example +0 -0
  36. package/templates/app-demo/entities/demo.ts.example +0 -0
  37. package/templates/app-demo/index.html.example +0 -0
  38. package/templates/app-demo/public/apple-touch-icon.png.example +0 -0
  39. package/templates/app-demo/public/fonts/fonts.css.example +0 -0
  40. package/templates/app-demo/public/icon-192x192.png.example +0 -0
  41. package/templates/app-demo/public/icon-512x512.png.example +0 -0
  42. package/templates/app-demo/src/App.tsx.example +0 -0
  43. package/templates/app-demo/src/config/app.ts.example +0 -0
  44. package/templates/app-demo/src/entities/booking.ts.example +0 -0
  45. package/templates/app-demo/src/entities/onboarding.ts.example +0 -0
  46. package/templates/app-demo/src/entities/product.ts.example +0 -0
  47. package/templates/app-demo/src/entities/quote.ts.example +0 -0
  48. package/templates/app-demo/src/globals.css.example +0 -0
  49. package/templates/app-demo/src/main.tsx.example +0 -0
  50. package/templates/app-demo/src/pages/ChangelogPage.tsx.example +0 -0
  51. package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +0 -0
  52. package/templates/app-demo/src/pages/DashboardPage.tsx.example +0 -0
  53. package/templates/app-demo/src/pages/HomePage.tsx.example +0 -0
  54. package/templates/app-demo/src/pages/OnboardingPage.tsx.example +0 -0
  55. package/templates/app-demo/src/pages/PricingPage.tsx.example +0 -0
  56. package/templates/app-demo/src/pages/ProductsPage.tsx.example +0 -0
  57. package/templates/app-demo/src/pages/ProfilePage.tsx.example +0 -0
  58. package/templates/app-demo/src/pages/SettingsPage.tsx.example +0 -0
  59. package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +0 -0
  60. package/templates/app-demo/src/pages/ShowcasePage.tsx.example +0 -0
  61. package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +0 -0
  62. package/templates/app-demo/src/pages/components/ComponentsData.tsx.example +0 -0
  63. package/templates/app-demo/src/pages/components/componentConfig.ts.example +0 -0
  64. package/templates/app-demo/src/pages/legal/LegalPage.tsx.example +0 -0
  65. package/templates/app-demo/src/pages/legal/PrivacyPage.tsx.example +0 -0
  66. package/templates/app-demo/src/pages/legal/TermsPage.tsx.example +0 -0
  67. package/templates/app-demo/src/themes.css.example +6 -0
  68. package/templates/app-demo/tsconfig.json.example +0 -0
  69. package/templates/app-demo/vite.config.ts.example +0 -0
  70. package/templates/app-dndev/index.html.example +0 -0
  71. package/templates/app-dndev/src/App.tsx.example +0 -0
  72. package/templates/app-dndev/src/components/CockpitLayout.css.example +0 -0
  73. package/templates/app-dndev/src/components/CockpitLayout.tsx.example +0 -0
  74. package/templates/app-dndev/src/components/Kanban.css.example +0 -0
  75. package/templates/app-dndev/src/components/ModeToggle.tsx.example +0 -0
  76. package/templates/app-dndev/src/components/OverlaySlot.tsx.example +0 -0
  77. package/templates/app-dndev/src/components/TerminalPanel.css.example +0 -0
  78. package/templates/app-dndev/src/components/TerminalPanel.tsx.example +0 -0
  79. package/templates/app-dndev/src/components/markdown-prose.css.example +0 -0
  80. package/templates/app-dndev/src/components/phases/CaptainLog.tsx.example +0 -0
  81. package/templates/app-dndev/src/components/phases/ContextTabs.tsx.example +0 -0
  82. package/templates/app-dndev/src/components/phases/PhaseCard.tsx.example +0 -0
  83. package/templates/app-dndev/src/components/phases/PhaseDetail.tsx.example +0 -0
  84. package/templates/app-dndev/src/components/phases/ReviewPanel.tsx.example +0 -0
  85. package/templates/app-dndev/src/components/phases/phaseData.ts.example +0 -0
  86. package/templates/app-dndev/src/config/app.ts.example +0 -0
  87. package/templates/app-dndev/src/config/commands.ts.example +0 -0
  88. package/templates/app-dndev/src/config/legal.ts.example +0 -0
  89. package/templates/app-dndev/src/config/providers.ts.example +1 -1
  90. package/templates/app-dndev/src/globals.css.example +0 -0
  91. package/templates/app-dndev/src/hooks/useDndevFile.ts.example +0 -0
  92. package/templates/app-dndev/src/main.tsx.example +0 -0
  93. package/templates/app-dndev/src/pages/BoardPage.tsx.example +0 -0
  94. package/templates/app-dndev/src/pages/GrillPage.tsx.example +0 -0
  95. package/templates/app-dndev/src/pages/HomePage.tsx.example +0 -0
  96. package/templates/app-dndev/src/pages/NotFoundPage.tsx.example +0 -0
  97. package/templates/app-dndev/src/pages/PhasesPage.tsx.example +0 -0
  98. package/templates/app-dndev/src/pages/SettingsPage.tsx.example +0 -0
  99. package/templates/app-dndev/src/pages/legal/LegalNoticePage.tsx.example +0 -0
  100. package/templates/app-dndev/src/pages/legal/PrivacyPage.tsx.example +0 -0
  101. package/templates/app-dndev/src/pages/legal/TermsPage.tsx.example +0 -0
  102. package/templates/app-dndev/src/stores/dndevStore.ts.example +0 -0
  103. package/templates/app-dndev/src/themes.css.example +5 -0
  104. package/templates/app-dndev/terminal-sidecar.cjs.example +0 -0
  105. package/templates/app-dndev/vite.config.ts.example +0 -0
  106. package/templates/app-expo/.env.example +0 -32
  107. package/templates/app-expo/.expo/README.md.example +0 -0
  108. package/templates/app-expo/.gitignore.example +0 -0
  109. package/templates/app-expo/README.md.example +1 -1
  110. package/templates/app-expo/app/.gitkeep +0 -0
  111. package/templates/app-expo/app/_layout.tsx.example +0 -0
  112. package/templates/app-expo/app/form.tsx.example +0 -0
  113. package/templates/app-expo/app/index.tsx.example +0 -0
  114. package/templates/app-expo/app/list.tsx.example +0 -0
  115. package/templates/app-expo/app/profile.tsx.example +0 -0
  116. package/templates/app-expo/app/signin.tsx.example +0 -0
  117. package/templates/app-expo/app.json.example +0 -0
  118. package/templates/app-expo/assets/adaptive-icon.png +0 -0
  119. package/templates/app-expo/assets/favicon.png +0 -0
  120. package/templates/app-expo/assets/icon.png +0 -0
  121. package/templates/app-expo/assets/splash.png +0 -0
  122. package/templates/app-expo/babel.config.js.example +0 -0
  123. package/templates/app-expo/eas.json.example +0 -0
  124. package/templates/app-expo/expo-env.d.ts.example +0 -0
  125. package/templates/app-expo/metro.config.js.example +0 -0
  126. package/templates/app-expo/service-account-key.json.example +1 -1
  127. package/templates/app-expo/src/config/app.ts.example +0 -0
  128. package/templates/app-expo/src/config/providers.ts.example +1 -1
  129. package/templates/app-expo/tsconfig.json.example +0 -0
  130. package/templates/app-next/.env.example +0 -33
  131. package/templates/app-next/next.config.ts.example +0 -2
  132. package/templates/app-next/postcss.config.js.example +0 -0
  133. package/templates/app-next/service-account-key.json.example +0 -0
  134. package/templates/app-next/src/app/ClientLayout.tsx.example +0 -0
  135. package/templates/app-next/src/app/not-found.tsx.example +0 -0
  136. package/templates/app-next/src/config/app.ts.example +0 -0
  137. package/templates/app-next/src/config/legal.ts.example +0 -0
  138. package/templates/app-next/src/config/providers.ts.example +1 -1
  139. package/templates/app-next/src/globals.css.example +0 -0
  140. package/templates/app-next/src/locales/dndev_en.json.example +0 -0
  141. package/templates/app-next/src/locales/home_en.json.example +6 -6
  142. package/templates/app-next/src/pages/HomePage.tsx.example +0 -0
  143. package/templates/app-next/src/pages/legal/LegalNoticePage.tsx.example +0 -0
  144. package/templates/app-next/src/pages/legal/PrivacyPage.tsx.example +0 -0
  145. package/templates/app-next/src/pages/legal/TermsPage.tsx.example +0 -0
  146. package/templates/app-next/src/pages/locales/example_en.json.example +0 -0
  147. package/templates/app-next/src/themes.css.example +7 -1
  148. package/templates/app-vite/.env.example +0 -33
  149. package/templates/app-vite/csp.example.json +0 -0
  150. package/templates/app-vite/index.html.example +0 -0
  151. package/templates/app-vite/service-account-key.json.example +0 -0
  152. package/templates/app-vite/src/App.tsx.example +0 -0
  153. package/templates/app-vite/src/config/app.ts.example +0 -0
  154. package/templates/app-vite/src/config/legal.ts.example +0 -0
  155. package/templates/app-vite/src/config/providers.ts.example +1 -1
  156. package/templates/app-vite/src/globals.css.example +0 -0
  157. package/templates/app-vite/src/locales/dndev_en.json.example +0 -0
  158. package/templates/app-vite/src/locales/home_en.json.example +6 -6
  159. package/templates/app-vite/src/main.tsx.example +0 -0
  160. package/templates/app-vite/src/pages/FormPageExample.tsx.example +0 -0
  161. package/templates/app-vite/src/pages/HomePage.tsx.example +1 -1
  162. package/templates/app-vite/src/pages/ListPageExample.tsx.example +0 -0
  163. package/templates/app-vite/src/pages/NotFoundPage.tsx.example +0 -0
  164. package/templates/app-vite/src/pages/legal/LegalNoticePage.tsx.example +0 -0
  165. package/templates/app-vite/src/pages/legal/PrivacyPage.tsx.example +0 -0
  166. package/templates/app-vite/src/pages/legal/TermsPage.tsx.example +0 -0
  167. package/templates/app-vite/src/pages/locales/example_en.json.example +0 -0
  168. package/templates/app-vite/src/themes.css.example +5 -0
  169. package/templates/deploy-config/.firebaserc.example +0 -0
  170. package/templates/deploy-config/firestore.indexes.json.example +0 -0
  171. package/templates/deploy-config/firestore.rules.example +0 -0
  172. package/templates/deploy-config/storage.rules.example +0 -0
  173. package/templates/deploy-config/tsconfig.functions.json.example +0 -0
  174. package/templates/deploy-config/vercel.json.example +2 -2
  175. package/templates/functions-firebase/.env.example +2 -2
  176. package/templates/functions-firebase/README.md.example +3 -3
  177. package/templates/functions-firebase/build.mjs.example +0 -0
  178. package/templates/functions-firebase/functions.config.js.example +0 -0
  179. package/templates/functions-firebase/functions.yaml.example +0 -0
  180. package/templates/functions-firebase/src/auth/getCustomClaims.ts.example +0 -0
  181. package/templates/functions-firebase/src/auth/getUserAuthStatus.ts.example +0 -0
  182. package/templates/functions-firebase/src/auth/index.ts.example +0 -0
  183. package/templates/functions-firebase/src/auth/removeCustomClaims.ts.example +0 -0
  184. package/templates/functions-firebase/src/auth/setCustomClaims.ts.example +0 -0
  185. package/templates/functions-firebase/src/billing/handleStripeWebhook.ts.example +0 -0
  186. package/templates/functions-firebase/src/billing/index.ts.example +0 -0
  187. package/templates/functions-firebase/src/billing/processPaymentSuccess.ts.example +0 -0
  188. package/templates/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +0 -0
  189. package/templates/functions-firebase/src/crud/createEntity.ts.example +0 -0
  190. package/templates/functions-firebase/src/crud/deleteEntity.ts.example +0 -0
  191. package/templates/functions-firebase/src/crud/getEntity.ts.example +0 -0
  192. package/templates/functions-firebase/src/crud/index.ts.example +0 -0
  193. package/templates/functions-firebase/src/crud/listEntities.ts.example +0 -0
  194. package/templates/functions-firebase/src/crud/updateEntity.ts.example +0 -0
  195. package/templates/functions-firebase/src/index.ts.example +0 -0
  196. package/templates/functions-firebase/src/oauth/checkGitHubAccess.ts.example +0 -0
  197. package/templates/functions-firebase/src/oauth/disconnect.ts.example +0 -0
  198. package/templates/functions-firebase/src/oauth/exchangeToken.ts.example +0 -0
  199. package/templates/functions-firebase/src/oauth/getConnections.ts.example +0 -0
  200. package/templates/functions-firebase/src/oauth/grantGitHubAccess.ts.example +0 -0
  201. package/templates/functions-firebase/src/oauth/index.ts.example +0 -0
  202. package/templates/functions-firebase/src/oauth/refreshToken.ts.example +0 -0
  203. package/templates/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +0 -0
  204. package/templates/functions-firebase/tsconfig.json.example +0 -0
  205. package/templates/functions-supabase/supabase/config.toml.example +0 -0
  206. package/templates/functions-supabase/supabase/functions/.env.example +0 -0
  207. package/templates/functions-supabase/supabase/functions/cancel-subscription/index.ts.example +0 -0
  208. package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +0 -0
  209. package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +0 -0
  210. package/templates/functions-supabase/supabase/functions/create-customer-portal/index.ts.example +0 -0
  211. package/templates/functions-supabase/supabase/functions/crud/index.ts.example +0 -0
  212. package/templates/functions-supabase/supabase/functions/delete-account/index.ts.example +0 -0
  213. package/templates/functions-supabase/supabase/functions/deno.json.example +0 -0
  214. package/templates/functions-supabase/supabase/functions/disconnect-oauth/index.ts.example +0 -0
  215. package/templates/functions-supabase/supabase/functions/exchange-token/index.ts.example +0 -0
  216. package/templates/functions-supabase/supabase/functions/get-connections/index.ts.example +0 -0
  217. package/templates/functions-supabase/supabase/functions/get-custom-claims/index.ts.example +0 -0
  218. package/templates/functions-supabase/supabase/functions/get-user-auth-status/index.ts.example +0 -0
  219. package/templates/functions-supabase/supabase/functions/refresh-subscription-status/index.ts.example +0 -0
  220. package/templates/functions-supabase/supabase/functions/refresh-token/index.ts.example +0 -0
  221. package/templates/functions-supabase/supabase/functions/remove-custom-claims/index.ts.example +0 -0
  222. package/templates/functions-supabase/supabase/functions/set-custom-claims/index.ts.example +0 -0
  223. package/templates/functions-supabase/supabase/migrations/20250101000000_idempotency.sql +0 -0
  224. package/templates/functions-supabase/supabase/migrations/20250101000001_rate_limits.sql +0 -0
  225. package/templates/functions-supabase/supabase/migrations/20250101000002_cleanup_jobs.sql +0 -0
  226. package/templates/functions-supabase/supabase/migrations/20250101000003_operation_metrics.sql +0 -0
  227. package/templates/functions-supabase/supabase/migrations/20250101000004_crud_bulk.sql +192 -0
  228. package/templates/functions-vercel/.env.example +3 -3
  229. package/templates/functions-vercel/README.md.example +2 -2
  230. package/templates/functions-vercel/build.mjs.example +0 -0
  231. package/templates/functions-vercel/src/api/auth/getCustomClaims.ts.example +0 -0
  232. package/templates/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +0 -0
  233. package/templates/functions-vercel/src/api/auth/removeCustomClaims.ts.example +0 -0
  234. package/templates/functions-vercel/src/api/auth/setCustomClaims.ts.example +0 -0
  235. package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +0 -0
  236. package/templates/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +0 -0
  237. package/templates/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +0 -0
  238. package/templates/functions-vercel/src/api/crud/createEntity.ts.example +0 -0
  239. package/templates/functions-vercel/src/api/crud/deleteEntity.ts.example +0 -0
  240. package/templates/functions-vercel/src/api/crud/getEntity.ts.example +0 -0
  241. package/templates/functions-vercel/src/api/crud/listEntities.ts.example +0 -0
  242. package/templates/functions-vercel/src/api/crud/updateEntity.ts.example +0 -0
  243. package/templates/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +0 -0
  244. package/templates/functions-vercel/src/api/oauth/disconnect.ts.example +0 -0
  245. package/templates/functions-vercel/src/api/oauth/exchangeToken.ts.example +0 -0
  246. package/templates/functions-vercel/src/api/oauth/getConnections.ts.example +0 -0
  247. package/templates/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +0 -0
  248. package/templates/functions-vercel/src/api/oauth/refreshToken.ts.example +0 -0
  249. package/templates/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +0 -0
  250. package/templates/functions-vercel/tsconfig.json.example +0 -0
  251. package/templates/functions-vercel/vercel.json.example +0 -0
  252. package/templates/github-consumer/.github/workflows/ci.yml.example +0 -0
  253. package/templates/overlay-firebase/env.fragment.example +0 -0
  254. package/templates/overlay-firebase/env.fragment.expo.example +0 -0
  255. package/templates/overlay-firebase/env.fragment.nextjs.example +0 -0
  256. package/templates/overlay-firebase/src/config/providers.expo.ts.example +0 -0
  257. package/templates/overlay-firebase/src/config/providers.ts.example +0 -0
  258. package/templates/overlay-supabase/env.fragment.example +0 -0
  259. package/templates/overlay-supabase/env.fragment.expo.example +0 -0
  260. package/templates/overlay-supabase/env.fragment.nextjs.example +0 -0
  261. package/templates/overlay-supabase/src/config/providers.expo.ts.example +1 -1
  262. package/templates/overlay-supabase/src/config/providers.ts.example +1 -1
  263. package/templates/overlay-vercel/env.fragment.example +0 -0
  264. package/templates/overlay-vercel/env.fragment.nextjs.example +0 -0
  265. package/templates/overlay-vercel/src/config/providers.ts.example +0 -0
  266. package/templates/preset-admin/src/pages/DashboardPage.tsx.example +0 -0
  267. package/templates/preset-admin/src/pages/EntityPage.tsx.example +0 -0
  268. package/templates/preset-admin/src/pages/ReportsPage.tsx.example +0 -0
  269. package/templates/preset-admin/src/pages/SettingsPage.tsx.example +0 -0
  270. package/templates/preset-admin/src/pages/UsersPage.tsx.example +0 -0
  271. package/templates/preset-ecommerce/src/pages/CartPage.tsx.example +0 -0
  272. package/templates/preset-ecommerce/src/pages/CatalogPage.tsx.example +0 -0
  273. package/templates/preset-ecommerce/src/pages/CheckoutPage.tsx.example +0 -0
  274. package/templates/preset-ecommerce/src/pages/HomePage.tsx.example +0 -0
  275. package/templates/preset-ecommerce/src/pages/ProductPage.tsx.example +0 -0
  276. package/templates/preset-landing/src/pages/AboutPage.tsx.example +0 -0
  277. package/templates/preset-landing/src/pages/ContactPage.tsx.example +0 -0
  278. package/templates/preset-landing/src/pages/HomePage.tsx.example +0 -0
  279. package/templates/preset-saas/src/pages/DashboardPage.tsx.example +0 -0
  280. package/templates/preset-saas/src/pages/HomePage.tsx.example +0 -0
  281. package/templates/preset-saas/src/pages/PricingPage.tsx.example +0 -0
  282. package/templates/preset-saas/src/pages/ProfilePage.tsx.example +0 -0
  283. package/templates/preset-saas/src/pages/SettingsPage.tsx.example +0 -0
  284. package/templates/root-consumer/.claude/agents/architect.md.example +0 -0
  285. package/templates/root-consumer/.claude/agents/builder.md.example +0 -0
  286. package/templates/root-consumer/.claude/agents/coder.md.example +0 -0
  287. package/templates/root-consumer/.claude/agents/extractor.md.example +0 -0
  288. package/templates/root-consumer/.claude/agents/polisher.md.example +0 -0
  289. package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +0 -0
  290. package/templates/root-consumer/.claude/hooks/guard-bash.sh.example +0 -0
  291. package/templates/root-consumer/.claude/hooks/guard-write.sh.example +2 -35
  292. package/templates/root-consumer/.claude/hooks/session-start.sh.example +1 -1
  293. package/templates/root-consumer/.claude/hooks/typecheck-stop.sh.example +0 -0
  294. package/templates/root-consumer/.claude/rules/consumer-ux.md.example +1 -1
  295. package/templates/root-consumer/.claude/rules/definition-of-done.md.example +0 -0
  296. package/templates/root-consumer/.claude/rules/framework.md.example +0 -0
  297. package/templates/root-consumer/.claude/rules/git.md.example +0 -0
  298. package/templates/root-consumer/.claude/rules/security.md.example +0 -0
  299. package/templates/root-consumer/.claude/settings.json.example +1 -27
  300. package/templates/root-consumer/.claude/skills/brainstorm/SKILL.md.example +0 -0
  301. package/templates/root-consumer/.claude/skills/build/SKILL.md.example +23 -106
  302. package/templates/root-consumer/.claude/skills/design/SKILL.md.example +0 -0
  303. package/templates/root-consumer/.claude/skills/design/output-template.md +0 -0
  304. package/templates/root-consumer/.claude/skills/grill/SKILL.md.example +0 -0
  305. package/templates/root-consumer/.claude/skills/polish/SKILL.md.example +0 -0
  306. package/templates/root-consumer/.claude/skills/techdebt/SKILL.md.example +0 -0
  307. package/templates/root-consumer/.cursor/mcp.json.example +0 -0
  308. package/templates/root-consumer/.cursor/rules/no-docs.mdc.example +5 -1
  309. package/templates/root-consumer/.dndev/args.json.example +0 -0
  310. package/templates/root-consumer/.dndev.secrets.example +0 -0
  311. package/templates/root-consumer/.env.example +0 -1
  312. package/templates/root-consumer/.gemini/settings.json.example +0 -0
  313. package/templates/root-consumer/.gitignore.example +1 -0
  314. package/templates/root-consumer/.mcp.json.example +0 -0
  315. package/templates/root-consumer/.prettierrc.cjs.example +0 -0
  316. package/templates/root-consumer/AGENTS.md.example +63 -0
  317. package/templates/root-consumer/CLAUDE.md.example +1 -33
  318. package/templates/root-consumer/README.md.example +11 -33
  319. package/templates/root-consumer/entities/index.ts.example +0 -0
  320. package/templates/root-consumer/eslint.config.js.example +0 -0
  321. package/templates/root-consumer/tsconfig.json.example +0 -0
  322. package/templates/root-consumer/.claude/hooks/framework-compliance.sh.example +0 -56
  323. package/templates/root-consumer/.claude/hooks/guard-files.sh.example +0 -46
  324. package/templates/root-consumer/.claude/hooks/guard-mcp.sh.example +0 -91
  325. package/templates/root-consumer/.claude/hooks/guard-secrets.sh.example +0 -67
  326. package/templates/root-consumer/.claude/hooks/track-mcp-lookup.sh.example +0 -20
  327. package/templates/root-consumer/.claude/statusline.py.example +0 -79
  328. package/templates/root-consumer/.clinerules.example +0 -1
  329. package/templates/root-consumer/.cursorrules.example +0 -1
  330. package/templates/root-consumer/.github/copilot-instructions.md.example +0 -1
  331. package/templates/root-consumer/.windsurfrules.example +0 -1
  332. package/templates/root-consumer/AI.md.example +0 -108
  333. package/templates/root-consumer/CONVENTIONS.md.example +0 -1
  334. package/templates/root-consumer/GEMINI.md.example +0 -1
  335. package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +0 -135
  336. package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +0 -276
  337. package/templates/root-consumer/guides/dndev/INDEX.md.example +0 -56
  338. package/templates/root-consumer/guides/dndev/SETUP_AUTH.md.example +0 -134
  339. package/templates/root-consumer/guides/dndev/SETUP_BILLING.md.example +0 -114
  340. package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +0 -231
  341. package/templates/root-consumer/guides/dndev/SETUP_OAUTH.md.example +0 -59
  342. package/templates/root-consumer/guides/dndev/SETUP_OAUTH_PROVIDERS.md.example +0 -60
  343. package/templates/root-consumer/guides/dndev/SETUP_SOC2.md.example +0 -234
  344. package/templates/root-consumer/guides/dndev/SETUP_STRIPE.md.example +0 -62
  345. package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +0 -262
  346. package/templates/root-consumer/guides/dndev/advanced/APP_CHECK.md.example +0 -111
  347. package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +0 -252
  348. package/templates/root-consumer/guides/dndev/advanced/EMULATORS.md.example +0 -48
  349. package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +0 -402
  350. package/templates/root-consumer/guides/wai-way/agents/architect.md.example +0 -78
  351. package/templates/root-consumer/guides/wai-way/agents/builder.md.example +0 -97
  352. package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +0 -363
  353. package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +0 -133
  354. package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +0 -315
  355. package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +0 -133
  356. package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +0 -111
  357. package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +0 -148
  358. package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +0 -238
  359. package/templates/root-consumer/guides/wai-way/context_map.json.example +0 -127
  360. package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +0 -839
  361. package/templates/root-consumer/guides/wai-way/hld_template.md.example +0 -138
  362. package/templates/root-consumer/guides/wai-way/lld_template.md.example +0 -103
  363. package/templates/root-consumer/guides/wai-way/page_patterns.md.example +0 -722
  364. package/templates/root-consumer/guides/wai-way/prd_template.md.example +0 -140
  365. package/templates/root-consumer/guides/wai-way/presets_guide.md.example +0 -217
  366. package/templates/root-consumer/guides/wai-way/spec_template.md.example +0 -313
@@ -1,62 +0,0 @@
1
- # Stripe Setup Guide
2
-
3
- ## Prerequisites
4
- - Stripe account (https://dashboard.stripe.com)
5
- - `@donotdev/billing` installed
6
-
7
- ## 1. Get API Keys
8
-
9
- 1. Go to https://dashboard.stripe.com/apikeys
10
- 2. Copy your **Publishable key** (`pk_test_...`) → `.env`
11
- 3. Copy your **Secret key** (`sk_test_...`) → `supabase/functions/.env` or `functions/.env`
12
-
13
- > **Security:** Never commit secret keys. Stripe also supports restricted keys (`rk_test_...`, `rk_live_...`) for tighter permissions.
14
-
15
- ## 2. Configure Webhook
16
-
17
- 1. Go to https://dashboard.stripe.com/webhooks
18
- 2. Click **Add endpoint**
19
- 3. Set endpoint URL:
20
- - Supabase: `https://{{PROJECT_ID}}.supabase.co/functions/v1/stripe-webhook`
21
- - Firebase: `https://europe-west1-{{PROJECT_ID}}.cloudfunctions.net/stripeWebhook` (replace `europe-west1` with your region if different)
22
- 4. Select events:
23
- - `checkout.session.completed`
24
- - `customer.subscription.created`
25
- - `customer.subscription.updated`
26
- - `customer.subscription.deleted`
27
- - `invoice.payment_succeeded`
28
- - `invoice.payment_failed`
29
- 5. Copy the **Signing secret** (`whsec_...`) → `supabase/functions/.env`
30
-
31
- ## 3. Environment Variables
32
-
33
- ### App `.env` (public)
34
- ```
35
- VITE_STRIPE_PUBLISHABLE_KEY=pk_test_...
36
- ```
37
-
38
- ### Functions `.env` (secret)
39
- ```
40
- STRIPE_SECRET_KEY=sk_test_...
41
- STRIPE_WEBHOOK_SECRET=whsec_...
42
- ```
43
-
44
- ## 4. Test Clocks (Optional)
45
-
46
- For subscription testing without waiting for real billing cycles:
47
- 1. Go to https://dashboard.stripe.com/test/test-clocks
48
- 2. Create a test clock
49
- 3. Create customers attached to the test clock
50
- 4. Advance time to trigger billing events
51
-
52
- ## 5. Verify
53
-
54
- ```bash
55
- dndev setup # Validates key formats + health check
56
- dndev doctor # Full health check for all providers
57
- ```
58
-
59
- Check that:
60
- - Publishable key format is valid
61
- - Secret key format is valid
62
- - Key modes match (both test or both live)
@@ -1,262 +0,0 @@
1
- # Setup: Supabase
2
-
3
- **From zero to a working Supabase backend. Covers Auth, PostgreSQL, Storage, Edge Functions, and deployment.**
4
-
5
- ---
6
-
7
- ## Step 1: Run Coach + Fill .env
8
-
9
- ```bash
10
- dndev coach
11
- ```
12
-
13
- This prints a numbered checklist of what to configure. For Supabase, you'll need:
14
- - **Project URL** and **public key** → paste into your app's `.env`
15
- - **service_role key** → paste into `.dndev.secrets` at project root
16
- - **Access token** → paste into `.dndev.secrets` (needed for DB migrations via Management API)
17
-
18
- Where to get them:
19
- - URL + public key + service_role key: [Supabase Dashboard](https://supabase.com/dashboard) → your project → **Settings → API**
20
- - Access token: [supabase.com/dashboard/account/tokens](https://supabase.com/dashboard/account/tokens) (account-level, not project-level)
21
-
22
- Then run setup to validate and automate:
23
-
24
- ```bash
25
- dndev setup
26
- ```
27
-
28
- Setup validates your credentials, generates SQL migrations from entities, and pushes them via the Supabase Management API (HTTPS — no CLI needed).
29
-
30
- ---
31
-
32
- ## Step 2: Generate Tables from Entities
33
-
34
- The framework generates PostgreSQL migrations from your entity definitions. This runs automatically as part of `dndev setup`, or you can run it separately:
35
-
36
- ```bash
37
- dndev setup
38
- ```
39
-
40
- During setup, the wizard detects your entities and generates SQL migrations.
41
-
42
- **What it does:**
43
- - Discovers entities (e.g. in `entities/` or your configured entity directory)
44
- - For each entity: `CREATE TABLE` with columns mapped from field types (text, number, boolean, timestamptz, uuid, jsonb, etc.)
45
- - Adds technical columns: `id` (uuid, default `gen_random_uuid()`), `user_id`, `created_at`, `updated_at` (with `DEFAULT now()`), `created_by_id`, `updated_by_id`, `status`
46
- - Enables **Row Level Security (RLS)** and creates policies so rows are scoped by `auth.uid() = user_id`
47
- - Adds a trigger so `updated_at` is set automatically on every `UPDATE`
48
-
49
- Output is written to `supabase/migrations/` as a timestamped `.sql` file.
50
-
51
- ---
52
-
53
- ## Step 3: Apply Migrations
54
-
55
- `dndev setup` pushes migrations automatically via the Supabase Management API. No CLI needed.
56
-
57
- If you prefer to apply manually:
58
-
59
- **Dashboard SQL Editor** — Copy the generated `.sql` file contents from `supabase/migrations/` into the SQL Editor in the Supabase Dashboard and run it.
60
-
61
- ---
62
-
63
- ## Step 4: Enable Supabase Services
64
-
65
- Go to the Supabase Dashboard and configure:
66
-
67
- **Authentication** (enabled by default on new projects):
68
- - Authentication → Providers → Verify Email is enabled
69
- - Add OAuth providers if needed (Google, GitHub, etc.)
70
-
71
- **Storage** (optional — only if your app uploads files):
72
- - Storage → Create bucket (e.g. `uploads`)
73
- - Configure public or RLS policies as needed
74
-
75
- ---
76
-
77
- ## Edge Functions
78
-
79
- Supabase Edge Functions run on Deno at the edge. If you selected functions during scaffolding, they're in `supabase/functions/`.
80
-
81
- ### CRUD Functions (one line)
82
-
83
- ```typescript
84
- // supabase/functions/crud/index.ts
85
- import * as entities from '../_shared/entities.ts';
86
- import { createSupabaseCrudFunctions } from '@donotdev/functions/supabase';
87
-
88
- const { serve } = createSupabaseCrudFunctions(entities);
89
- Deno.serve(serve);
90
- ```
91
-
92
- **Result:** Auto-generates create, get, list, update, delete handlers for each entity. The dispatcher routes via `_functionName` in the request body.
93
-
94
- ### Custom Functions (typed)
95
-
96
- For single-operation, schema-validated endpoints (one handler, one schema):
97
-
98
- ```typescript
99
- // supabase/functions/my-function/index.ts
100
- import * as v from 'valibot';
101
- import { createSupabaseHandler } from '@donotdev/functions/supabase';
102
-
103
- const schema = v.object({ productId: v.string() });
104
-
105
- export default createSupabaseHandler(
106
- 'get_product_details',
107
- schema,
108
- async (data, ctx) => {
109
- const { data: product } = await ctx.supabaseAdmin
110
- .from('products')
111
- .select('*')
112
- .eq('id', data.productId)
113
- .single();
114
- return product;
115
- },
116
- 'user' // requiredRole (default)
117
- );
118
- ```
119
-
120
- **Context:** `ctx.uid`, `ctx.userRole`, `ctx.supabaseAdmin`. Rate limiting, metrics, auth, schema validation included.
121
-
122
- ### Custom Functions (lightweight)
123
-
124
- For multi-action functions, webhooks, AI chat, or anything that needs raw `Request` access:
125
-
126
- ```typescript
127
- // supabase/functions/my-function/index.ts
128
- import { createEdgeFunction } from '@donotdev/functions/supabase';
129
-
130
- // Auth required (default)
131
- Deno.serve(createEdgeFunction(async (req, ctx) => {
132
- const body = await req.json();
133
-
134
- if (body.action === 'list') {
135
- const { data } = await ctx.supabaseAdmin.from('items').select('*');
136
- return ctx.json({ items: data });
137
- }
138
-
139
- return ctx.error('Unknown action');
140
- }));
141
- ```
142
-
143
- **Context:** `ctx.user` (`{ id, email }` or null), `ctx.supabaseAdmin` (service role), `ctx.userClient` (RLS-scoped), `ctx.json()`, `ctx.error()`, `ctx.respond()`.
144
-
145
- ```typescript
146
- // No auth (public endpoint)
147
- Deno.serve(createEdgeFunction(async (req, ctx) => {
148
- return ctx.json({ public: true });
149
- }, { requireAuth: false }));
150
-
151
- // Webhook with custom auth header
152
- Deno.serve(createEdgeFunction(async (req, ctx) => {
153
- const sig = req.headers.get('stripe-signature');
154
- if (!sig) return ctx.error('Missing signature', 401);
155
- // verify signature, handle event...
156
- return ctx.json({ received: true });
157
- }, { requireAuth: false, extraHeaders: ['stripe-signature'] }));
158
- ```
159
-
160
- Both `createSupabaseHandler` and `createEdgeFunction` handle CORS, OPTIONS preflight, and method checking. Never manually define `CORS_HEADERS` in edge functions.
161
-
162
- ### Deploy Edge Functions
163
-
164
- ```bash
165
- supabase functions deploy
166
- ```
167
-
168
- Or deploy everything with:
169
-
170
- ```bash
171
- dndev deploy
172
- ```
173
-
174
- ---
175
-
176
- ## Adapter Behavior (DB-Managed Timestamps)
177
-
178
- Tables use **snake_case** column names and **timestamptz** for `created_at` / `updated_at`. The framework expects **camelCase** and **ISO date strings** in the app.
179
-
180
- The **Supabase CRUD adapter** handles this automatically:
181
-
182
- | Direction | Behavior |
183
- |-----------|----------|
184
- | **Read** (get, query, subscribe) | Rows from Supabase are normalized: snake_case → camelCase (e.g. `created_at` → `createdAt`), and timestamp columns are converted to ISO strings. Your UI receives the same shape as with Firebase. |
185
- | **Write** (add, set, update) | The adapter does **not** send `createdAt` / `updatedAt` (or snake equivalents). The database sets them via `DEFAULT now()` and the `updated_at` trigger. |
186
-
187
- You never set timestamps in app code — the DB owns them.
188
-
189
- ---
190
-
191
- ## Environment Variables
192
-
193
- **Client (Vite):** in `apps/<app>/.env`
194
-
195
- | Variable | Purpose |
196
- |----------|---------|
197
- | `VITE_SUPABASE_URL` | Project URL (public) |
198
- | `VITE_SUPABASE_PUBLIC_KEY` | Public key (safe in bundle) |
199
-
200
- **Server (Edge Functions, API routes):** use the same URL and `SUPABASE_SECRET_KEY` for admin operations. Never expose the service_role key to the client. Put it in `.dndev.secrets` at project root (or your host's env for production).
201
-
202
- | Variable | Purpose |
203
- |----------|---------|
204
- | `SUPABASE_URL` | Project URL (set automatically by Supabase) |
205
- | `SUPABASE_SERVICE_ROLE_KEY` | Admin key (set automatically by Supabase) |
206
- | `SUPABASE_ANON_KEY` | Public key (set automatically by Supabase) |
207
- | `ALLOWED_ORIGIN` | CORS origin for edge functions (default: `*`). Set to your frontend URL in production for credentialed requests (e.g. `https://myapp.com`) |
208
-
209
- See [ENV_SETUP.md](./ENV_SETUP.md) for the full secrets policy.
210
-
211
- ---
212
-
213
- ## Hosting the Frontend
214
-
215
- Supabase provides **Auth, PostgreSQL, Storage, and Edge Functions**. It does **not** host your built frontend.
216
-
217
- **We recommend Vercel** — see [SETUP_VERCEL.md](./SETUP_VERCEL.md).
218
-
219
- ```bash
220
- dndev deploy
221
- ```
222
-
223
- For Supabase projects, `dndev deploy` deploys frontend to Vercel (via scaffolded `vercel.json`) and Edge Functions to Supabase. Make sure you've set `VITE_SUPABASE_*` in Vercel Dashboard → Environment Variables.
224
-
225
- ---
226
-
227
- ## Local Development
228
-
229
- **Against hosted Supabase:**
230
-
231
- ```bash
232
- dndev dev
233
- ```
234
-
235
- The app talks to your Supabase project directly.
236
-
237
- **Local emulation:**
238
-
239
- ```bash
240
- dndev emu start
241
- ```
242
-
243
- Or install the [Supabase CLI](https://supabase.com/docs/guides/cli) and run `supabase start` for a local Postgres + Auth + Storage stack. Point `VITE_SUPABASE_URL` and keys to the local instance.
244
-
245
- ---
246
-
247
- ## Troubleshooting
248
-
249
- **"Table not found" / "relation does not exist"**
250
- → Run `dndev setup` — it generates SQL and pushes via Management API. Or copy the SQL from `supabase/migrations/` into the Dashboard SQL Editor.
251
-
252
- **"Permission denied" / RLS errors**
253
- → Check RLS policies in Supabase Dashboard → Database → Policies
254
- → Generated migrations include default policies — verify they were applied
255
-
256
- **"Service role key" errors in functions**
257
- → Put `SUPABASE_SECRET_KEY` in `.dndev.secrets` at project root (never in `VITE_*` vars)
258
- → Get it from Supabase Dashboard → Settings → API
259
-
260
- ---
261
-
262
- **`dndev coach` → fill `.env` + `.dndev.secrets` → `dndev setup` → `dndev dev`. The adapter normalizes everything automatically.**
@@ -1,111 +0,0 @@
1
- # App Check Setup (Abuse Protection)
2
-
3
- **For AI Agents:** Configure reCAPTCHA key. Framework auto-enables App Check for all Firebase resources.
4
-
5
- ---
6
-
7
- ## 1. Environment Variables
8
-
9
- **Vite:**
10
- ```bash
11
- # .env
12
- VITE_RECAPTCHA_SITE_KEY=6LcXXXX... # reCAPTCHA v3 site key
13
- VITE_APPCHECK_DEBUG_TOKEN=XXXX-XXXX-XXXX # Optional: localhost testing
14
- ```
15
-
16
- **Next.js:**
17
- ```bash
18
- # .env.local
19
- NEXT_PUBLIC_RECAPTCHA_SITE_KEY=6LcXXXX...
20
- NEXT_PUBLIC_APPCHECK_DEBUG_TOKEN=XXXX-XXXX-XXXX
21
- ```
22
-
23
- **Functions (.env):**
24
- ```bash
25
- ENFORCE_APP_CHECK=false # Set 'true' to reject requests without tokens
26
- ```
27
-
28
- ---
29
-
30
- ## 2. Get reCAPTCHA Enterprise Key
31
-
32
- 1. Go to [Google Cloud Console - reCAPTCHA](https://console.cloud.google.com/security/recaptcha)
33
- 2. Create key:
34
- - Platform: Website
35
- - Type: Score-based (checkbox optional)
36
- - Domains: `localhost`, `yourdomain.com`
37
- 3. Copy Site Key (starts with `6L...`)
38
-
39
- > First 1M calls/month are free.
40
-
41
- ---
42
-
43
- ## 3. Enable in Firebase Console
44
-
45
- 1. [Firebase Console](https://console.firebase.google.com) → **App Check**
46
- 2. Click **Register app** → select your web app
47
- 3. Choose **reCAPTCHA v3**, paste Site Key
48
- 4. Save
49
-
50
- ---
51
-
52
- ## 4. Localhost Debug Token
53
-
54
- reCAPTCHA doesn't work on localhost. Use debug tokens:
55
-
56
- 1. Start app in dev mode
57
- 2. Check console for: `App Check debug token: XXXXXXXX-XXXX-...`
58
- 3. Copy token
59
- 4. Firebase Console → App Check → **Manage debug tokens**
60
- 5. Add token with name (e.g., "Local Dev - John")
61
- 6. Add to `.env`:
62
- - Vite: `VITE_APPCHECK_DEBUG_TOKEN=XXXXXXXX-XXXX-...`
63
- - Next.js: `NEXT_PUBLIC_APPCHECK_DEBUG_TOKEN=XXXXXXXX-XXXX-...`
64
-
65
- ---
66
-
67
- ## 5. How It Works
68
-
69
- **Automatic:**
70
- - Framework detects `RECAPTCHA_SITE_KEY` env var
71
- - Auto-initializes App Check during Firebase init
72
- - All Firebase requests include tokens automatically
73
- - No code changes needed
74
-
75
- **Server-side:**
76
- - Default: Logs warnings for missing tokens
77
- - Set `ENFORCE_APP_CHECK=true` to reject invalid requests
78
-
79
- ---
80
-
81
- ## 6. Verification
82
-
83
- **Console messages:**
84
- | Message | Status |
85
- |---------|--------|
86
- | `[AppCheck] Enabled - all Firebase requests are protected` | Working |
87
- | `[AppCheck] Not configured...` | Key missing (prod only) |
88
- | `[AppCheck] Missing token for <operation>` | Server warning |
89
-
90
- ---
91
-
92
- ## 7. Rollout Strategy
93
-
94
- 1. **Monitor:** Deploy without enforcement, check logs
95
- 2. **Enforce:** Set `ENFORCE_APP_CHECK=true` when ready
96
-
97
- ---
98
-
99
- ## What App Check Protects
100
-
101
- - Bot/script attacks
102
- - Unauthorized API access
103
- - Request replay attacks
104
-
105
- **Does NOT replace:** Firebase Auth, Firestore Rules, Rate Limiting
106
-
107
- ---
108
-
109
- **Files to configure:**
110
- - `.env` or `.env.local` - Add reCAPTCHA key
111
- - `functions/.env` - Optional enforcement
@@ -1,252 +0,0 @@
1
- # Cookie Reference Guide
2
-
3
- **For Framework Consumers: GDPR Compliance**
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- This guide maps DoNotDev framework features to the cookies they set, helping you configure your cookie consent banner and privacy policy correctly.
10
-
11
- ---
12
-
13
- ## Cookie Categories (GDPR)
14
-
15
- - **Necessary** - Essential for service to function (no consent required per GDPR Article 6(1)(f))
16
- - **Functional** - Enhances experience (requires consent per GDPR Article 6(1)(a))
17
- - **Analytics** - Usage tracking (requires consent)
18
- - **Marketing** - Advertising/tracking (requires consent)
19
-
20
- ---
21
-
22
- ## Feature Cookie Mapping
23
-
24
- ### Authentication (`@donotdev/auth`)
25
-
26
- **Provider: Firebase Authentication**
27
-
28
- | Cookie Name | Category | Purpose | Expires |
29
- |------------|----------|---------|---------|
30
- | `__session` | Necessary | Session authentication token | Session |
31
- | `__Secure-*` | Necessary | Security tokens (HTTPS only) | Varies |
32
-
33
- **GDPR Status:** Necessary - Authentication is essential for account-based services.
34
-
35
- **Environment Variables:**
36
- ```bash
37
- VITE_FIREBASE_API_KEY=your-key
38
- VITE_FIREBASE_PROJECT_ID=your-project
39
- ```
40
-
41
- ---
42
-
43
- ### OAuth (`@donotdev/oauth`)
44
-
45
- **Providers: Google, GitHub OAuth**
46
-
47
- | Cookie Name | Category | Purpose | Expires |
48
- |------------|----------|---------|---------|
49
- | OAuth state cookies | Necessary | CSRF protection during OAuth flow | Session |
50
- | Provider session cookies | Necessary | Maintain OAuth session | Per provider |
51
-
52
- **GDPR Status:** Necessary - Part of authentication flow.
53
-
54
- **Environment Variables:**
55
- ```bash
56
- VITE_AUTH_PARTNERS=google,github
57
- ```
58
-
59
- **Third-party cookies set by OAuth providers:**
60
- - **Google:** `SID`, `HSID`, `SSID`, `APISID`, `SAPISID` (necessary for OAuth)
61
- - **GitHub:** `user_session`, `logged_in` (necessary for OAuth)
62
-
63
- ---
64
-
65
- ### Billing (`@donotdev/billing`)
66
-
67
- **Provider: Stripe**
68
-
69
- | Cookie Name | Category | Purpose | Expires |
70
- |------------|----------|---------|---------|
71
- | `__stripe_mid` | Necessary | Fraud prevention | 1 year |
72
- | `__stripe_sid` | Necessary | Checkout session | 30 minutes |
73
-
74
- **GDPR Status:** Necessary - Required for payment processing and fraud prevention.
75
-
76
- **Environment Variables:**
77
- ```bash
78
- VITE_STRIPE_PUBLIC_KEY=pk_live_xxx
79
- ```
80
-
81
- **Stripe Privacy:** Stripe sets these cookies when Checkout or Customer Portal is opened. They're classified as necessary for PCI compliance and fraud prevention.
82
-
83
- ---
84
-
85
- ### Framework Core Cookies
86
-
87
- **Set by `@donotdev/core`**
88
-
89
- | Cookie Name | Category | Purpose | Expires |
90
- |------------|----------|---------|---------|
91
- | `dndev-cookie-consent` | Necessary | Stores user's cookie preferences | 365 days |
92
- | `dndev-theme` | Necessary | Remembers dark/light mode preference | 365 days |
93
- | `dndev-lang` | Necessary | Remembers language preference | 365 days |
94
-
95
- **GDPR Status:** Necessary (essential for UX, no tracking, purely local preferences)
96
-
97
- ---
98
-
99
- ## Analytics & Marketing (Optional)
100
-
101
- These are NOT included in the framework but commonly added by consumers:
102
-
103
- ### Google Analytics
104
-
105
- | Cookie Name | Category | Purpose | Expires |
106
- |------------|----------|---------|---------|
107
- | `_ga` | Analytics | Distinguish users | 2 years |
108
- | `_gid` | Analytics | Distinguish users | 24 hours |
109
- | `_gat` | Analytics | Throttle requests | 1 minute |
110
-
111
- **GDPR Status:** Analytics - Requires explicit consent.
112
-
113
- **Setup:** Consumer must add Google Analytics script and obtain consent.
114
-
115
- ### Facebook Pixel
116
-
117
- | Cookie Name | Category | Purpose | Expires |
118
- |------------|----------|---------|---------|
119
- | `_fbp` | Marketing | Track conversions | 90 days |
120
-
121
- **GDPR Status:** Marketing - Requires explicit consent.
122
-
123
- ---
124
-
125
- ## Cookie Banner Configuration
126
-
127
- ### Minimal Setup (Auth + Billing + Theme/Lang)
128
-
129
- If your app only uses auth, billing, theme, and language preferences, all cookies are **necessary**:
130
-
131
- ```typescript
132
- // src/config/app.ts
133
- export const appConfig: AppConfig = {
134
- features: {
135
- // No config needed - all framework cookies are necessary
136
- },
137
- };
138
- ```
139
-
140
- **Result:** No cookie banner shown - all cookies are GDPR-compliant without consent.
141
-
142
- ### With Analytics/Marketing
143
-
144
- If you add Google Analytics or marketing pixels:
145
-
146
- ```typescript
147
- // src/config/app.ts
148
- export const appConfig: AppConfig = {
149
- features: {
150
- requiredCookies: ['necessary', 'functional', 'analytics'],
151
- },
152
- };
153
- ```
154
-
155
- **Result:** Cookie banner shows all categories, users must consent to analytics.
156
-
157
- ---
158
-
159
- ## Privacy Policy Template
160
-
161
- **Example text for your privacy policy:**
162
-
163
- ```markdown
164
- ## Cookies We Use
165
-
166
- ### Essential Cookies (Always Active)
167
-
168
- We use essential cookies that are necessary for our service to function:
169
-
170
- - **Authentication** (Firebase): Maintains your login session
171
- - **Payment Processing** (Stripe): Enables secure payments and fraud prevention
172
- - **Cookie Preferences**: Remembers your cookie consent choices
173
-
174
- These cookies are essential and cannot be disabled.
175
-
176
- ### Functional Cookies (Optional)
177
-
178
- With your consent, we use functional cookies to enhance your experience:
179
-
180
- - **Theme Preference**: Remembers your dark/light mode choice
181
- - **Language Preference**: Remembers your selected language
182
-
183
- You can disable these in cookie settings.
184
-
185
- ### Analytics Cookies (Optional) [If applicable]
186
-
187
- With your consent, we use Google Analytics to understand how visitors use our site.
188
- This helps us improve the user experience.
189
-
190
- You can disable these in cookie settings.
191
- ```
192
-
193
- ---
194
-
195
- ## Testing Cookie Compliance
196
-
197
- ### Check What Cookies Are Set
198
-
199
- ```javascript
200
- // Browser console
201
- document.cookie
202
- ```
203
-
204
- ### Verify Consent Before Analytics
205
-
206
- ```typescript
207
- import { useConsent } from '@donotdev/core';
208
-
209
- function MyAnalytics() {
210
- const hasAnalyticsConsent = useConsent('hasCategory')('analytics');
211
-
212
- useEffect(() => {
213
- if (hasAnalyticsConsent) {
214
- // Initialize Google Analytics
215
- }
216
- }, [hasAnalyticsConsent]);
217
- }
218
- ```
219
-
220
- ---
221
-
222
- ## GDPR Compliance Checklist
223
-
224
- - [ ] List all cookies in privacy policy with categories
225
- - [ ] Only set analytics/marketing cookies after consent
226
- - [ ] Provide cookie settings link in footer
227
- - [ ] Allow users to withdraw consent
228
- - [ ] Store consent for 12 months maximum
229
- - [ ] Don't block essential features if functional cookies declined
230
-
231
- **Framework handles:** Consent storage, banner UI, category management
232
-
233
- **You handle:** Privacy policy text, analytics integration, marketing pixels
234
-
235
- ---
236
-
237
- ## Quick Reference
238
-
239
- | Feature | Cookies | Category | Consent Required? |
240
- |---------|---------|----------|-------------------|
241
- | Auth | `__session`, `__Secure-*` | Necessary | No |
242
- | OAuth | Provider session cookies | Necessary | No |
243
- | Billing | `__stripe_mid`, `__stripe_sid` | Necessary | No |
244
- | Theme | `dndev-theme` | Necessary | No |
245
- | Language | `dndev-lang` | Necessary | No |
246
- | Consent | `dndev-cookie-consent` | Necessary | No |
247
- | Analytics | `_ga`, `_gid` | Analytics | Yes |
248
- | Marketing | `_fbp`, etc. | Marketing | Yes |
249
-
250
- ---
251
-
252
- **Need help?** Check your browser DevTools → Application → Cookies to see exactly what's being set.