@donotdev/cli 0.0.3

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 (281) hide show
  1. package/LICENSE.md +48 -0
  2. package/README.md +291 -0
  3. package/dependencies-matrix.json +694 -0
  4. package/dist/bin/commands/build.d.ts +11 -0
  5. package/dist/bin/commands/build.d.ts.map +1 -0
  6. package/dist/bin/commands/build.js +8162 -0
  7. package/dist/bin/commands/build.js.map +1 -0
  8. package/dist/bin/commands/bump.d.ts +11 -0
  9. package/dist/bin/commands/bump.d.ts.map +1 -0
  10. package/dist/bin/commands/bump.js +8004 -0
  11. package/dist/bin/commands/bump.js.map +1 -0
  12. package/dist/bin/commands/cacheout.d.ts +11 -0
  13. package/dist/bin/commands/cacheout.d.ts.map +1 -0
  14. package/dist/bin/commands/cacheout.js +7630 -0
  15. package/dist/bin/commands/cacheout.js.map +1 -0
  16. package/dist/bin/commands/create-app.d.ts +11 -0
  17. package/dist/bin/commands/create-app.d.ts.map +1 -0
  18. package/dist/bin/commands/create-app.js +9032 -0
  19. package/dist/bin/commands/create-app.js.map +1 -0
  20. package/dist/bin/commands/create-project.d.ts +11 -0
  21. package/dist/bin/commands/create-project.d.ts.map +1 -0
  22. package/dist/bin/commands/create-project.js +9643 -0
  23. package/dist/bin/commands/create-project.js.map +1 -0
  24. package/dist/bin/commands/deploy.d.ts +11 -0
  25. package/dist/bin/commands/deploy.d.ts.map +1 -0
  26. package/dist/bin/commands/deploy.js +9007 -0
  27. package/dist/bin/commands/deploy.js.map +1 -0
  28. package/dist/bin/commands/dev.d.ts +11 -0
  29. package/dist/bin/commands/dev.d.ts.map +1 -0
  30. package/dist/bin/commands/dev.js +7892 -0
  31. package/dist/bin/commands/dev.js.map +1 -0
  32. package/dist/bin/commands/emu.d.ts +11 -0
  33. package/dist/bin/commands/emu.d.ts.map +1 -0
  34. package/dist/bin/commands/emu.js +8302 -0
  35. package/dist/bin/commands/emu.js.map +1 -0
  36. package/dist/bin/commands/format.d.ts +11 -0
  37. package/dist/bin/commands/format.d.ts.map +1 -0
  38. package/dist/bin/commands/format.js +8009 -0
  39. package/dist/bin/commands/format.js.map +1 -0
  40. package/dist/bin/commands/lint.d.ts +11 -0
  41. package/dist/bin/commands/lint.d.ts.map +1 -0
  42. package/dist/bin/commands/lint.js +7481 -0
  43. package/dist/bin/commands/lint.js.map +1 -0
  44. package/dist/bin/commands/preview.d.ts +11 -0
  45. package/dist/bin/commands/preview.d.ts.map +1 -0
  46. package/dist/bin/commands/preview.js +7909 -0
  47. package/dist/bin/commands/preview.js.map +1 -0
  48. package/dist/bin/commands/sync-secrets.d.ts +11 -0
  49. package/dist/bin/commands/sync-secrets.d.ts.map +1 -0
  50. package/dist/bin/commands/sync-secrets.js +8227 -0
  51. package/dist/bin/commands/sync-secrets.js.map +1 -0
  52. package/dist/bin/dndev.js +222 -0
  53. package/dist/bin/donotdev.js +222 -0
  54. package/dist/index.d.ts +8 -0
  55. package/dist/index.d.ts.map +1 -0
  56. package/dist/index.js +12820 -0
  57. package/dist/index.js.map +1 -0
  58. package/package.json +71 -0
  59. package/templates/app-demo/index.html.example +20 -0
  60. package/templates/app-demo/public/favicon.ico.example +0 -0
  61. package/templates/app-demo/public/fonts/Roboto-400-cyrillic-ext.woff2.example +0 -0
  62. package/templates/app-demo/public/fonts/Roboto-400-cyrillic.woff2.example +0 -0
  63. package/templates/app-demo/public/fonts/Roboto-400-greek-ext.woff2.example +0 -0
  64. package/templates/app-demo/public/fonts/Roboto-400-greek.woff2.example +0 -0
  65. package/templates/app-demo/public/fonts/Roboto-400-latin-ext.woff2.example +0 -0
  66. package/templates/app-demo/public/fonts/Roboto-400-latin.woff2.example +0 -0
  67. package/templates/app-demo/public/fonts/Roboto-400-vietnamese.woff2.example +0 -0
  68. package/templates/app-demo/public/fonts/Roboto-700-cyrillic-ext.woff2.example +0 -0
  69. package/templates/app-demo/public/fonts/Roboto-700-cyrillic.woff2.example +0 -0
  70. package/templates/app-demo/public/fonts/Roboto-700-greek-ext.woff2.example +0 -0
  71. package/templates/app-demo/public/fonts/Roboto-700-greek.woff2.example +0 -0
  72. package/templates/app-demo/public/fonts/Roboto-700-latin-ext.woff2.example +0 -0
  73. package/templates/app-demo/public/fonts/Roboto-700-latin.woff2.example +0 -0
  74. package/templates/app-demo/public/fonts/Roboto-700-vietnamese.woff2.example +0 -0
  75. package/templates/app-demo/public/fonts/fonts.css.example +144 -0
  76. package/templates/app-demo/public/logo.png.example +0 -0
  77. package/templates/app-demo/public/logo.svg.example +1 -0
  78. package/templates/app-demo/public/manifest.json.example +10 -0
  79. package/templates/app-demo/src/App.tsx.example +17 -0
  80. package/templates/app-demo/src/Routes.tsx.example +20 -0
  81. package/templates/app-demo/src/components/ThemeToggle.tsx.example +48 -0
  82. package/templates/app-demo/src/globals.css.example +4 -0
  83. package/templates/app-demo/src/main.tsx.example +27 -0
  84. package/templates/app-demo/src/pages/DetailPage.tsx.example +103 -0
  85. package/templates/app-demo/src/pages/FullPage.tsx.example +142 -0
  86. package/templates/app-demo/src/pages/HomePage.tsx.example +79 -0
  87. package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +511 -0
  88. package/templates/app-demo/src/pages/components/ComponentsData.tsx.example +152 -0
  89. package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +266 -0
  90. package/templates/app-demo/src/pages/components/LayoutRoute.tsx.example +20 -0
  91. package/templates/app-demo/src/pages/components/componentConfig.ts.example +921 -0
  92. package/templates/app-demo/src/themes.css.example +179 -0
  93. package/templates/app-demo/tsconfig.json.example +9 -0
  94. package/templates/app-demo/vite.config.ts.example +53 -0
  95. package/templates/app-next/.env.example +92 -0
  96. package/templates/app-next/next.config.ts.example +8 -0
  97. package/templates/app-next/postcss.config.js.example +58 -0
  98. package/templates/app-next/service-account-key.json.example +2 -0
  99. package/templates/app-next/src/app/ClientLayout.tsx.example +39 -0
  100. package/templates/app-next/src/app/layout.tsx.example +52 -0
  101. package/templates/app-next/src/app/not-found.tsx.example +21 -0
  102. package/templates/app-next/src/config/app.ts.example +75 -0
  103. package/templates/app-next/src/config/legal.ts.example +170 -0
  104. package/templates/app-next/src/globals.css.example +15 -0
  105. package/templates/app-next/src/locales/dndev_en.json.example +516 -0
  106. package/templates/app-next/src/pages/HomePage.tsx.example +20 -0
  107. package/templates/app-next/src/pages/legal/LegalNoticePage.tsx.example +75 -0
  108. package/templates/app-next/src/pages/legal/PrivacyPage.tsx.example +69 -0
  109. package/templates/app-next/src/pages/legal/TermsPage.tsx.example +71 -0
  110. package/templates/app-next/src/themes.css.example +179 -0
  111. package/templates/app-next/tsconfig.json.example +11 -0
  112. package/templates/app-payload/.env.example +28 -0
  113. package/templates/app-payload/README.md.example +233 -0
  114. package/templates/app-payload/collections/Company.ts.example +125 -0
  115. package/templates/app-payload/collections/Hero.ts.example +62 -0
  116. package/templates/app-payload/collections/Media.ts.example +41 -0
  117. package/templates/app-payload/collections/Products.ts.example +115 -0
  118. package/templates/app-payload/collections/Services.ts.example +104 -0
  119. package/templates/app-payload/collections/Testimonials.ts.example +92 -0
  120. package/templates/app-payload/collections/Users.ts.example +35 -0
  121. package/templates/app-payload/src/server.ts.example +79 -0
  122. package/templates/app-payload/tsconfig.json.example +24 -0
  123. package/templates/app-vite/.env.example +77 -0
  124. package/templates/app-vite/index.html.example +127 -0
  125. package/templates/app-vite/service-account-key.json.example +2 -0
  126. package/templates/app-vite/src/App.tsx.example +39 -0
  127. package/templates/app-vite/src/Routes.tsx.example +16 -0
  128. package/templates/app-vite/src/config/app.ts.example +75 -0
  129. package/templates/app-vite/src/config/legal.ts.example +170 -0
  130. package/templates/app-vite/src/globals.css.example +11 -0
  131. package/templates/app-vite/src/locales/dndev_en.json.example +516 -0
  132. package/templates/app-vite/src/main.tsx.example +21 -0
  133. package/templates/app-vite/src/pages/HomePage.tsx.example +22 -0
  134. package/templates/app-vite/src/pages/NotFoundPage.tsx.example +33 -0
  135. package/templates/app-vite/src/pages/legal/LegalNoticePage.tsx.example +75 -0
  136. package/templates/app-vite/src/pages/legal/PrivacyPage.tsx.example +69 -0
  137. package/templates/app-vite/src/pages/legal/TermsPage.tsx.example +71 -0
  138. package/templates/app-vite/src/pages/locales/README.md.example +1 -0
  139. package/templates/app-vite/src/pages/locales/example_en.json.example +5 -0
  140. package/templates/app-vite/src/themes.css.example +179 -0
  141. package/templates/app-vite/tsconfig.json.example +9 -0
  142. package/templates/app-vite/vite.config.ts.example +9 -0
  143. package/templates/functions-firebase/README.md.example +129 -0
  144. package/templates/functions-firebase/build.mjs.example +52 -0
  145. package/templates/functions-firebase/functions-firebase/.env.example.example +45 -0
  146. package/templates/functions-firebase/functions-firebase/README.md.example +123 -0
  147. package/templates/functions-firebase/functions-firebase/build.mjs.example +52 -0
  148. package/templates/functions-firebase/functions-firebase/src/auth/getCustomClaims.ts.example +19 -0
  149. package/templates/functions-firebase/functions-firebase/src/auth/getUserAuthStatus.ts.example +21 -0
  150. package/templates/functions-firebase/functions-firebase/src/auth/index.ts.example +11 -0
  151. package/templates/functions-firebase/functions-firebase/src/auth/removeCustomClaims.ts.example +21 -0
  152. package/templates/functions-firebase/functions-firebase/src/auth/setCustomClaims.ts.example +21 -0
  153. package/templates/functions-firebase/functions-firebase/src/billing/handleStripeWebhook.ts.example +24 -0
  154. package/templates/functions-firebase/functions-firebase/src/billing/index.ts.example +10 -0
  155. package/templates/functions-firebase/functions-firebase/src/billing/processPaymentSuccess.ts.example +14 -0
  156. package/templates/functions-firebase/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +14 -0
  157. package/templates/functions-firebase/functions-firebase/src/crud/createEntity.ts.example +19 -0
  158. package/templates/functions-firebase/functions-firebase/src/crud/deleteEntity.ts.example +14 -0
  159. package/templates/functions-firebase/functions-firebase/src/crud/getEntity.ts.example +14 -0
  160. package/templates/functions-firebase/functions-firebase/src/crud/index.ts.example +12 -0
  161. package/templates/functions-firebase/functions-firebase/src/crud/listEntities.ts.example +14 -0
  162. package/templates/functions-firebase/functions-firebase/src/crud/updateEntity.ts.example +14 -0
  163. package/templates/functions-firebase/functions-firebase/src/index.ts.example +45 -0
  164. package/templates/functions-firebase/functions-firebase/src/oauth/checkGitHubAccess.ts.example +14 -0
  165. package/templates/functions-firebase/functions-firebase/src/oauth/disconnect.ts.example +14 -0
  166. package/templates/functions-firebase/functions-firebase/src/oauth/exchangeToken.ts.example +14 -0
  167. package/templates/functions-firebase/functions-firebase/src/oauth/getConnections.ts.example +14 -0
  168. package/templates/functions-firebase/functions-firebase/src/oauth/grantGitHubAccess.ts.example +14 -0
  169. package/templates/functions-firebase/functions-firebase/src/oauth/index.ts.example +17 -0
  170. package/templates/functions-firebase/functions-firebase/src/oauth/refreshToken.ts.example +14 -0
  171. package/templates/functions-firebase/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +14 -0
  172. package/templates/functions-firebase/functions-firebase/tsconfig.json.example +21 -0
  173. package/templates/functions-firebase/functions.yaml.example +14 -0
  174. package/templates/functions-firebase/src/auth/getCustomClaims.ts.example +19 -0
  175. package/templates/functions-firebase/src/auth/getUserAuthStatus.ts.example +21 -0
  176. package/templates/functions-firebase/src/auth/index.ts.example +11 -0
  177. package/templates/functions-firebase/src/auth/removeCustomClaims.ts.example +21 -0
  178. package/templates/functions-firebase/src/auth/setCustomClaims.ts.example +21 -0
  179. package/templates/functions-firebase/src/billing/handleStripeWebhook.ts.example +24 -0
  180. package/templates/functions-firebase/src/billing/index.ts.example +10 -0
  181. package/templates/functions-firebase/src/billing/processPaymentSuccess.ts.example +14 -0
  182. package/templates/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +14 -0
  183. package/templates/functions-firebase/src/crud/createEntity.ts.example +19 -0
  184. package/templates/functions-firebase/src/crud/deleteEntity.ts.example +14 -0
  185. package/templates/functions-firebase/src/crud/getEntity.ts.example +14 -0
  186. package/templates/functions-firebase/src/crud/index.ts.example +12 -0
  187. package/templates/functions-firebase/src/crud/listEntities.ts.example +14 -0
  188. package/templates/functions-firebase/src/crud/updateEntity.ts.example +14 -0
  189. package/templates/functions-firebase/src/index.ts.example +45 -0
  190. package/templates/functions-firebase/src/oauth/checkGitHubAccess.ts.example +14 -0
  191. package/templates/functions-firebase/src/oauth/disconnect.ts.example +14 -0
  192. package/templates/functions-firebase/src/oauth/exchangeToken.ts.example +14 -0
  193. package/templates/functions-firebase/src/oauth/getConnections.ts.example +14 -0
  194. package/templates/functions-firebase/src/oauth/grantGitHubAccess.ts.example +14 -0
  195. package/templates/functions-firebase/src/oauth/index.ts.example +17 -0
  196. package/templates/functions-firebase/src/oauth/refreshToken.ts.example +14 -0
  197. package/templates/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +14 -0
  198. package/templates/functions-firebase/tsconfig.json.example +24 -0
  199. package/templates/functions-vercel/README.md.example +116 -0
  200. package/templates/functions-vercel/build.mjs.example +52 -0
  201. package/templates/functions-vercel/functions-vercel/.env.example.example +37 -0
  202. package/templates/functions-vercel/functions-vercel/README.md.example +116 -0
  203. package/templates/functions-vercel/functions-vercel/build.mjs.example +52 -0
  204. package/templates/functions-vercel/functions-vercel/src/api/auth/getCustomClaims.ts.example +20 -0
  205. package/templates/functions-vercel/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +20 -0
  206. package/templates/functions-vercel/functions-vercel/src/api/auth/removeCustomClaims.ts.example +20 -0
  207. package/templates/functions-vercel/functions-vercel/src/api/auth/setCustomClaims.ts.example +20 -0
  208. package/templates/functions-vercel/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +20 -0
  209. package/templates/functions-vercel/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +20 -0
  210. package/templates/functions-vercel/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +20 -0
  211. package/templates/functions-vercel/functions-vercel/src/api/crud/createEntity.ts.example +20 -0
  212. package/templates/functions-vercel/functions-vercel/src/api/crud/deleteEntity.ts.example +20 -0
  213. package/templates/functions-vercel/functions-vercel/src/api/crud/getEntity.ts.example +20 -0
  214. package/templates/functions-vercel/functions-vercel/src/api/crud/listEntities.ts.example +20 -0
  215. package/templates/functions-vercel/functions-vercel/src/api/crud/updateEntity.ts.example +20 -0
  216. package/templates/functions-vercel/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +20 -0
  217. package/templates/functions-vercel/functions-vercel/src/api/oauth/disconnect.ts.example +20 -0
  218. package/templates/functions-vercel/functions-vercel/src/api/oauth/exchangeToken.ts.example +20 -0
  219. package/templates/functions-vercel/functions-vercel/src/api/oauth/getConnections.ts.example +20 -0
  220. package/templates/functions-vercel/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +20 -0
  221. package/templates/functions-vercel/functions-vercel/src/api/oauth/refreshToken.ts.example +20 -0
  222. package/templates/functions-vercel/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +20 -0
  223. package/templates/functions-vercel/functions-vercel/tsconfig.json.example +21 -0
  224. package/templates/functions-vercel/functions-vercel/vercel.json.example +14 -0
  225. package/templates/functions-vercel/src/api/auth/getCustomClaims.ts.example +20 -0
  226. package/templates/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +20 -0
  227. package/templates/functions-vercel/src/api/auth/removeCustomClaims.ts.example +20 -0
  228. package/templates/functions-vercel/src/api/auth/setCustomClaims.ts.example +20 -0
  229. package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +20 -0
  230. package/templates/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +20 -0
  231. package/templates/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +20 -0
  232. package/templates/functions-vercel/src/api/crud/createEntity.ts.example +20 -0
  233. package/templates/functions-vercel/src/api/crud/deleteEntity.ts.example +20 -0
  234. package/templates/functions-vercel/src/api/crud/getEntity.ts.example +20 -0
  235. package/templates/functions-vercel/src/api/crud/listEntities.ts.example +20 -0
  236. package/templates/functions-vercel/src/api/crud/updateEntity.ts.example +20 -0
  237. package/templates/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +20 -0
  238. package/templates/functions-vercel/src/api/oauth/disconnect.ts.example +20 -0
  239. package/templates/functions-vercel/src/api/oauth/exchangeToken.ts.example +20 -0
  240. package/templates/functions-vercel/src/api/oauth/getConnections.ts.example +20 -0
  241. package/templates/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +20 -0
  242. package/templates/functions-vercel/src/api/oauth/refreshToken.ts.example +20 -0
  243. package/templates/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +20 -0
  244. package/templates/functions-vercel/tsconfig.json.example +24 -0
  245. package/templates/functions-vercel/vercel.json.example +14 -0
  246. package/templates/github/github/workflows/firebase-deploy.yml.example +79 -0
  247. package/templates/github/workflows/firebase-deploy.yml.example +79 -0
  248. package/templates/root-consumer/.env.example +19 -0
  249. package/templates/root-consumer/.gitignore.example +82 -0
  250. package/templates/root-consumer/.prettierrc.cjs.example +12 -0
  251. package/templates/root-consumer/CLAUDE.md.example +73 -0
  252. package/templates/root-consumer/README.md.example +295 -0
  253. package/templates/root-consumer/bunfig.toml.example +68 -0
  254. package/templates/root-consumer/eslint.config.js.example +336 -0
  255. package/templates/root-consumer/firebase.json.example +348 -0
  256. package/templates/root-consumer/guides/AGENT_START_HERE.md.example +98 -0
  257. package/templates/root-consumer/guides/APP_CHECK_SETUP.md.example +111 -0
  258. package/templates/root-consumer/guides/AUTH_SETUP.md.example +92 -0
  259. package/templates/root-consumer/guides/BILLING_SETUP.md.example +120 -0
  260. package/templates/root-consumer/guides/CLI.md.example +293 -0
  261. package/templates/root-consumer/guides/COMPONENTS.md.example +875 -0
  262. package/templates/root-consumer/guides/CONFIG_SETUP.md.example +132 -0
  263. package/templates/root-consumer/guides/EMULATOR_SETUP.md.example +48 -0
  264. package/templates/root-consumer/guides/FEATURES.md.example +286 -0
  265. package/templates/root-consumer/guides/FRAMEWORK_OVERVIEW.md.example +97 -0
  266. package/templates/root-consumer/guides/FUNCTIONS.md.example +177 -0
  267. package/templates/root-consumer/guides/GETTING_STARTED.md.example +451 -0
  268. package/templates/root-consumer/guides/HOW_TO_USE.md.example +296 -0
  269. package/templates/root-consumer/guides/I18N_SETUP.md.example +204 -0
  270. package/templates/root-consumer/guides/IMPORT_PATTERNS.md.example +79 -0
  271. package/templates/root-consumer/guides/INDEX.md.example +50 -0
  272. package/templates/root-consumer/guides/INSTALLATION.md.example +296 -0
  273. package/templates/root-consumer/guides/LAYOUTS.md.example +310 -0
  274. package/templates/root-consumer/guides/PAGES_SETUP.md.example +123 -0
  275. package/templates/root-consumer/guides/STYLING.md.example +273 -0
  276. package/templates/root-consumer/guides/THEMING_SETUP.md.example +119 -0
  277. package/templates/root-consumer/guides/VERSION_CONTROL.md.example +181 -0
  278. package/templates/root-consumer/tsconfig.functions.json.example +15 -0
  279. package/templates/root-consumer/tsconfig.json.example +18 -0
  280. package/templates/root-consumer/turbo.json.example +46 -0
  281. package/templates/root-consumer/vercel.json.example +124 -0
@@ -0,0 +1,296 @@
1
+ # How to Use DoNotDev Framework
2
+
3
+ **For AI Agents & Developers**
4
+
5
+ This guide explains how to build apps with DoNotDev following our conventions. The framework is designed for **AI-first development** - everything works by default, minimal configuration needed.
6
+
7
+ ---
8
+
9
+ ## Core Philosophy
10
+
11
+ **No CSS. Just Compose.**
12
+
13
+ - **NEVER write CSS** - use component props
14
+ - **NEVER use inline styles** - components handle styling
15
+ - **NEVER use Tailwind/utility classes** - props-based API only
16
+ - **NEVER nest components** - use props instead (e.g., `Card` with `title` prop, NOT `<Card><CardTitle>`)
17
+ - Compose components with props - that's it
18
+
19
+ ---
20
+
21
+ ## Quick Start: Building Your First App
22
+
23
+ ### 1. Scaffold Project
24
+
25
+ ```bash
26
+ dndev init my-app
27
+ cd my-app
28
+ bun install
29
+ ```
30
+
31
+ ### 2. Choose Layout Preset
32
+
33
+ Edit `apps/my-app/src/config/app.ts`:
34
+
35
+ ```tsx
36
+ import type { AppConfig } from '@donotdev/core';
37
+
38
+ export const appConfig: AppConfig = {
39
+ preset: 'landing', // 'landing' | 'admin' | 'moolti' | 'docs' | 'blog' | 'game' | 'plain'
40
+ app: {
41
+ name: 'My App',
42
+ // ...
43
+ },
44
+ };
45
+ ```
46
+
47
+ Edit `apps/my-app/src/App.tsx`:
48
+
49
+ ```tsx
50
+ import { ViteAppProviders } from '@donotdev/ui/vite';
51
+ import { appConfig } from './config/app';
52
+ import HomePage from './pages/HomePage';
53
+
54
+ export function App() {
55
+ return (
56
+ <ViteAppProviders
57
+ config={appConfig}
58
+ LandingPage={HomePage}
59
+ />
60
+ );
61
+ }
62
+ ```
63
+
64
+ **7 presets:** `landing`, `admin`, `moolti`, `docs`, `blog`, `game`, `plain`
65
+
66
+ ### 3. Create Pages
67
+
68
+ **Drop pages in `apps/<my_app>/src/pages/**` - routes are automatic.**
69
+
70
+ ```tsx
71
+ // apps/my-app/src/pages/AboutPage.tsx
72
+ import { PageContainer, Card } from '@donotdev/ui';
73
+ import type { PageMeta } from '@donotdev/core';
74
+ import { Rocket } from 'lucide-react';
75
+
76
+ export const meta: PageMeta = {
77
+ namespace: 'about',
78
+ icon: <Rocket />, // Optional - Lucide-react (default: Link)
79
+ hideFromMenu: true, // Hide from navigation
80
+ auth: { required: true }, // Require authentication
81
+ };
82
+
83
+ export default function AboutPage() {
84
+ return (
85
+ <PageContainer>
86
+ <Card title="About" content="Our story..." />
87
+ </PageContainer>
88
+ );
89
+ }
90
+ ```
91
+
92
+ ---
93
+
94
+ ## Component Composition (No CSS)
95
+
96
+ **Rule: Use props, not CSS. Compose components, don't nest.**
97
+
98
+ ### Layout Components
99
+
100
+ ```tsx
101
+ import { PageContainer, Section } from '@donotdev/ui';
102
+
103
+ <PageContainer variant="standard" density="comfortable">
104
+ <Section title="Features" gridCols={3} tone="muted">
105
+ {/* Children go here */}
106
+ </Section>
107
+ </PageContainer>
108
+ ```
109
+
110
+ **PageContainer props:**
111
+ - `variant`: `'full' | 'standard' | 'docs' | 'fixed'`
112
+ - `density`: `'compact' | 'comfortable' | 'spacious'`
113
+ - `centered`: `boolean`
114
+
115
+ **Section props:**
116
+ - `title`: `string` - Section title
117
+ - `subtitle`: `string` - Section subtitle
118
+ - `gridCols`: `1 | 2 | 3 | 4` - Grid columns for children
119
+ - `gridGap`: `'none' | 'tight' | 'medium' | 'large'`
120
+ - `tone`: `'base' | 'muted' | 'elevated' | 'contrast' | 'accent'`
121
+ - `badge`: `string` - Badge text
122
+ - `eyebrow`: `{ label: string, icon?: Component }` - Eyebrow label
123
+
124
+ ### Card Component
125
+
126
+ ```tsx
127
+ import { Card } from '@donotdev/components';
128
+ import { Rocket } from 'lucide-react';
129
+
130
+ // ✅ CORRECT: Props-based API
131
+ <Card
132
+ title="Feature Name"
133
+ subtitle="Feature description"
134
+ content="Detailed content here"
135
+ icon={Rocket}
136
+ footer={<Button>Action</Button>}
137
+ variant="default"
138
+ elevated
139
+ />
140
+
141
+ // ❌ WRONG: No nested components
142
+ // <Card>
143
+ // <CardTitle>Feature Name</CardTitle>
144
+ // <CardHeader>...</CardHeader>
145
+ // </Card>
146
+ ```
147
+
148
+ **Card props:**
149
+ - `title`: `string | ReactNode` - Card title
150
+ - `subtitle`: `string | ReactNode` - Card subtitle
151
+ - `content`: `string | ReactNode` - Main content
152
+ - `footer`: `ReactNode` - Footer content
153
+ - `icon`: `IconType` - Icon component (Lucide-react)
154
+ - `variant`: `'default' | 'muted' | 'accent'`
155
+ - `elevated`: `boolean` - Add shadow/elevation
156
+ - `onClick`: `() => void` - Click handler
157
+
158
+ ### Common Components
159
+
160
+ ```tsx
161
+ import { Button, HeroSection, CallToAction } from '@donotdev/components';
162
+ import { Rocket } from 'lucide-react';
163
+
164
+ // Button
165
+ <Button variant="primary" size="md" icon={Rocket}>Click</Button>
166
+
167
+ // HeroSection
168
+ <HeroSection
169
+ title="Welcome"
170
+ subtitle="Build fast"
171
+ primaryAction={<Button>Get Started</Button>}
172
+ />
173
+
174
+ // CallToAction
175
+ <CallToAction
176
+ title="Ready to start?"
177
+ primaryAction={<Button>Sign Up</Button>}
178
+ secondaryAction={<Button variant="outline">Learn More</Button>}
179
+ />
180
+ ```
181
+
182
+ ---
183
+
184
+ ## Key Components Reference
185
+
186
+ **From `@donotdev/ui`:**
187
+ - `PageContainer` - Page wrapper with width constraints
188
+ - `Section` - Layout section with grid
189
+ - `HeroSection` - Hero banner
190
+ - `CallToAction` - CTA section
191
+
192
+ **From `@donotdev/components`:**
193
+ - `Card` - Card with title/content/footer props
194
+ - `Button` - Button with variant/size/icon props
195
+ - `Input`, `Textarea`, `Select` - Form inputs
196
+ - `Dialog`, `AlertDialog` - Modals
197
+ - `DropdownMenu`, `Command` - Menus
198
+ - `Table`, `DataTable` - Tables
199
+ - `Tabs`, `Accordion` - Content organization
200
+ - `Badge`, `Avatar`, `Separator` - UI elements
201
+ - `Stack`, `Grid` - Layout utilities
202
+
203
+ **All components use props-based API - no nesting, no CSS needed.**
204
+
205
+ ---
206
+
207
+ ## Critical Rules
208
+
209
+ ### ✅ DO
210
+
211
+ - Compose components with props
212
+ - Use `Card` with `title`/`content` props
213
+ - Use `Section` with `gridCols` prop for layouts
214
+ - Use `PageContainer` to wrap pages
215
+ - Trust component defaults
216
+
217
+ ### ❌ DON'T
218
+
219
+ - **NEVER write CSS** - use component props
220
+ - **NEVER use inline styles** - `style={{ ... }}` forbidden
221
+ - **NEVER use Tailwind/utility classes** - props only
222
+ - **NEVER nest components** - `Card` has `title` prop, NOT `<CardTitle>`
223
+ - **NEVER use native HTML** - use framework components
224
+ - **NEVER override component styles** - use props/variants
225
+
226
+ ---
227
+
228
+ ## Example: Complete Page
229
+
230
+ ```tsx
231
+ import { PageContainer, Section, Card, Button, HeroSection } from '@donotdev/ui';
232
+ import { Zap, Sparkles, Rocket } from 'lucide-react';
233
+
234
+ export default function HomePage() {
235
+ return (
236
+ <PageContainer>
237
+ <HeroSection
238
+ title="Welcome"
239
+ subtitle="Build fast with DoNotDev"
240
+ primaryAction={<Button>Get Started</Button>}
241
+ />
242
+
243
+ <Section title="Features" gridCols={3}>
244
+ <Card
245
+ title="Fast"
246
+ content="Lightning fast development"
247
+ icon={Zap}
248
+ />
249
+ <Card
250
+ title="Simple"
251
+ content="Zero configuration needed"
252
+ icon={Sparkles}
253
+ />
254
+ <Card
255
+ title="Powerful"
256
+ content="Enterprise-grade features"
257
+ icon={Rocket}
258
+ />
259
+ </Section>
260
+ </PageContainer>
261
+ );
262
+ }
263
+ ```
264
+
265
+ **No CSS. No inline styles. Just compose.**
266
+
267
+ ---
268
+
269
+ ## Translations
270
+
271
+ **File naming:** `namespace_lng.json`
272
+ - `namespace` matches `PageMeta.namespace`
273
+ - `lng` is ISO 2-letter code (en, fr, es, etc.)
274
+
275
+ **Eager:** `src/locales/home_en.json` (loaded on start)
276
+ **Lazy:** `src/pages/locales/about_en.json` (loaded per page)
277
+
278
+ ---
279
+
280
+ ## Theming
281
+
282
+ Override `src/themes.css` to customize colors. Framework provides defaults - override selectively.
283
+
284
+ ---
285
+
286
+ ## Logos & Assets
287
+
288
+ **Logo:**
289
+ - Add your `logo.svg` to `public/`
290
+ - Framework will prompt during build if missing: "Do you want us to provide one from the framework?"
291
+ - Or manually copy from `node_modules/@donotdev/ui/assets/logo.svg`
292
+ - Framework automatically generates favicon, app icons, and PWA assets from your logo
293
+
294
+ ---
295
+
296
+ **Remember:** No CSS. Just compose components with props. Trust the defaults.
@@ -0,0 +1,204 @@
1
+ # Internationalization Setup
2
+
3
+ **For AI Agents:** Drop `{namespace}_{lng}.json` files. Framework discovers languages automatically.
4
+
5
+ ---
6
+
7
+ ## 1. File Naming & Locations
8
+
9
+ **Pattern:** `{namespace}_{lng}.json`
10
+
11
+ - `namespace` - Matches `PageMeta.namespace` - CAN NOT HAVE _ in its name
12
+ - `lng` - ISO 2-letter language code (en, fr, es, de, ar, it, ja, ko, zh, pt, ru, hi, ...)
13
+
14
+ **Eager (loaded on start):**
15
+ ```
16
+ src/locales/
17
+ ├── common_en.json
18
+ ├── common_fr.json
19
+ ├── home_en.json
20
+ └── home_fr.json
21
+ ```
22
+
23
+ **Lazy (loaded per route):**
24
+ ```
25
+ src/pages/locales/
26
+ ├── about_en.json
27
+ └── about_fr.json
28
+ ```
29
+
30
+ ---
31
+
32
+ ## 2. Translation Files
33
+
34
+ ```json
35
+ // src/locales/home_en.json
36
+ {
37
+ "title": "Welcome",
38
+ "subtitle": "Build apps faster",
39
+ "welcome": "Hello {{name}}",
40
+ "features": ["Fast", "Simple", "Powerful"],
41
+ "benefits": {
42
+ "0": "Lightning fast",
43
+ "1": "Zero config",
44
+ "2": "Enterprise ready"
45
+ },
46
+ "cases": {
47
+ "0": {
48
+ "useCase": "E-commerce",
49
+ "bestFit": "Stripe integration",
50
+ "reason": "Built-in billing"
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ ---
57
+
58
+ ## 3. Advanced Translation Utilities
59
+
60
+ **Import from `@donotdev/core`:**
61
+
62
+ ```tsx
63
+ import {
64
+ useTranslation,
65
+ maybeTranslate,
66
+ translateArray,
67
+ translateObjectArray,
68
+ } from '@donotdev/core';
69
+ ```
70
+
71
+ ### `maybeTranslate` - Smart Translation Helper
72
+
73
+ Auto-detects translation keys vs raw strings:
74
+
75
+ ```tsx
76
+ const { t } = useTranslation('home');
77
+
78
+ // Plain string → returns as-is
79
+ maybeTranslate(t, "Early Bird Lifetime")
80
+ // → "Early Bird Lifetime"
81
+
82
+ // Translation key → translates
83
+ maybeTranslate(t, "purchase:products.earlyBird.name")
84
+ // → "Accès Anticipé à Vie" (if FR)
85
+
86
+ // Namespace prefix optional
87
+ maybeTranslate(t, "products.earlyBird.name")
88
+ // → Uses current namespace
89
+ ```
90
+
91
+ **Use case:** Handle mixed content (some translated, some not).
92
+
93
+ ### `translateArray` - Array Translations
94
+
95
+ Translates indexed array keys:
96
+
97
+ ```tsx
98
+ const { t } = useTranslation('home');
99
+
100
+ // JSON: { "benefits": { "0": "Fast", "1": "Simple", "2": "Powerful" } }
101
+ const benefits = translateArray(t, 'benefits', 6);
102
+ // → ["Fast", "Simple", "Powerful"]
103
+ // Automatically filters out missing translations
104
+
105
+ // Nested keys
106
+ const features = translateArray(t, 'features.list', 5);
107
+ // → Gets features.list.0 through features.list.4
108
+ ```
109
+
110
+ **Options:**
111
+ ```tsx
112
+ translateArray(t, 'items', 10, {
113
+ minLength: 2, // Only include items with at least 2 characters
114
+ excludeEmpty: true, // Exclude empty strings
115
+ customFilter: (item, index) => item.length > 5
116
+ });
117
+ ```
118
+
119
+ ### `translateObjectArray` - Object Array Translations
120
+
121
+ Translates arrays of objects:
122
+
123
+ ```tsx
124
+ const { t } = useTranslation('home');
125
+
126
+ // JSON: { "cases": { "0": { "useCase": "...", "bestFit": "..." }, "1": {...} } }
127
+ const cases = translateObjectArray(
128
+ t,
129
+ 'cases',
130
+ 4,
131
+ ['useCase', 'bestFit', 'dndev', 'reason']
132
+ );
133
+ // → [
134
+ // { useCase: "...", bestFit: "...", dndev: "...", reason: "..." },
135
+ // ...
136
+ // ]
137
+ ```
138
+
139
+ **Automatically filters out missing translations.**
140
+
141
+ ### `translateArrayRange` - Range Translations
142
+
143
+ Translates a specific range:
144
+
145
+ ```tsx
146
+ // Get items 2-5 (indices 2, 3, 4)
147
+ const items = translateArrayRange(t, 'items', 2, 5);
148
+ ```
149
+
150
+ ### `translateArrayWithIndices` - With Original Indices
151
+
152
+ Returns items with their original indices:
153
+
154
+ ```tsx
155
+ const benefits = translateArrayWithIndices(t, 'benefits', 6);
156
+ // → [
157
+ // { item: "Fast", originalIndex: 0 },
158
+ // { item: "Simple", originalIndex: 1 },
159
+ // ...
160
+ // ]
161
+ ```
162
+
163
+ ---
164
+
165
+ ## 4. Basic Usage
166
+
167
+ ```tsx
168
+ import { useTranslation, type PageMeta } from '@donotdev/core';
169
+
170
+ export const meta: PageMeta = {
171
+ namespace: 'home', // Matches home_*.json
172
+ };
173
+
174
+ export default function HomePage() {
175
+ const { t } = useTranslation('home');
176
+
177
+ return (
178
+ <div>
179
+ <h1>{t('title')}</h1>
180
+ <p>{t('welcome', { name: 'Alice' })}</p>
181
+ </div>
182
+ );
183
+ }
184
+ ```
185
+
186
+ ---
187
+
188
+ ## 5. Configuration
189
+
190
+ ```typescript
191
+ // src/config/app.ts
192
+ export const appConfig: AppConfig = {
193
+ i18n: {
194
+ defaultLanguage: 'en',
195
+ fallbackLanguage: 'en',
196
+ },
197
+ };
198
+ ```
199
+
200
+ **Note:** `LanguageSelector` is included in default layout presets - no setup needed.
201
+
202
+ ---
203
+
204
+ **Zero config. Drop files, languages auto-discovered. Use utilities for advanced patterns.**
@@ -0,0 +1,79 @@
1
+ # Import Patterns
2
+
3
+ **Status:** Single Source of Truth for Import Conventions.
4
+
5
+ **GOLDEN RULE:**
6
+ **NEVER import from internal paths like `src/...` or `dist/...`. Always import from the package root.**
7
+
8
+ ---
9
+
10
+ ## 1. The "Root Import" Mandate
11
+
12
+ ✅ **Correct:**
13
+
14
+ ```typescript
15
+ import { Button } from '@donotdev/components';
16
+ import { PageContainer } from '@donotdev/ui';
17
+ import { useAuth } from '@donotdev/auth';
18
+ ```
19
+
20
+ ❌ **WRONG (Will break builds):**
21
+
22
+ ```typescript
23
+ import { Button } from '@donotdev/components/src/atomic/Button';
24
+ import { PageContainer } from '@donotdev/ui/src/components/layout/PageContainer';
25
+ ```
26
+
27
+ ---
28
+
29
+ ## 2. Verbatim Type Imports
30
+
31
+ We use strict TypeScript settings. You must use `import type` for interfaces and types.
32
+
33
+ ✅ **Correct:**
34
+
35
+ ```typescript
36
+ import type { ButtonProps } from '@donotdev/components';
37
+ ```
38
+
39
+ ❌ **Wrong:**
40
+
41
+ ```typescript
42
+ import { ButtonProps } from '@donotdev/components'; // Error: Value not found
43
+ ```
44
+
45
+ ---
46
+
47
+ ## 3. Import Order (Organization)
48
+
49
+ 1. **External Libraries** (React, Zustand, Lucide)
50
+ 2. **DoNotDev Framework** (`@donotdev/*`)
51
+ 3. **Local/Relative** (`./components`, `../../hooks`)
52
+
53
+ **Example:**
54
+
55
+ ```typescript
56
+ import React, { useState } from 'react';
57
+ import { User } from 'lucide-react';
58
+
59
+ import { Button, Card } from '@donotdev/components';
60
+ import { useThemeStore } from '@donotdev/core';
61
+
62
+ import { MyLocalComponent } from './MyLocalComponent';
63
+ ```
64
+
65
+ ---
66
+
67
+ ## 4. Package Guide
68
+
69
+ | Package | Usage | Examples |
70
+ | :------------------------- | :--------------------------- | :---------------------------------------------------------- |
71
+ | **`@donotdev/core`** | Logic, Hooks, Config, Stores | `useTranslation`, `useThemeStore`, `isClient`, `AppConfig` |
72
+ | **`@donotdev/components`** | Atomic UI Elements | `Button`, `Card`, `Input`, `Text`, `Section`, `HeroSection` |
73
+ | **`@donotdev/ui`** | Layouts & Containers | `PageContainer`, `Link`, `ViteAppProviders` |
74
+ | **`@donotdev/auth`** | Authentication | `useAuth`, `SignInPage` |
75
+ | **`@donotdev/billing`** | Stripe/Payments | `useStripeBilling`, `PricingTable` |
76
+
77
+ ---
78
+
79
+ **Adhere to these patterns to ensure your code is upgrade-safe and follows framework standards.**
@@ -0,0 +1,50 @@
1
+ # DoNotDev Framework Guides
2
+
3
+ **For AI Agents:** See [AGENT_START_HERE.md](./AGENT_START_HERE.md)
4
+
5
+ ---
6
+
7
+ ## Quick Setup
8
+
9
+ 1. [INSTALLATION.md](./INSTALLATION.md) - Install framework packages
10
+ 2. [GETTING_STARTED.md](./GETTING_STARTED.md) - Scaffold first app
11
+ 3. [FRAMEWORK_OVERVIEW.md](./FRAMEWORK_OVERVIEW.md) - Package structure
12
+
13
+ ---
14
+
15
+ ## Core Setup
16
+
17
+ - [PAGES_SETUP.md](./PAGES_SETUP.md) - File-based routing
18
+ - [CONFIG_SETUP.md](./CONFIG_SETUP.md) - App + Vite configuration
19
+ - [I18N_SETUP.md](./I18N_SETUP.md) - Translations
20
+ - [THEMING_SETUP.md](./THEMING_SETUP.md) - Themes + CSS variables
21
+
22
+ ---
23
+
24
+ ## Feature Setup
25
+
26
+ - [AUTH_SETUP.md](./AUTH_SETUP.md) - Authentication
27
+ - [BILLING_SETUP.md](./BILLING_SETUP.md) - Stripe subscriptions
28
+ - [APP_CHECK_SETUP.md](./APP_CHECK_SETUP.md) - Abuse protection (reCAPTCHA)
29
+ - [FUNCTIONS.md](./FUNCTIONS.md) - Firebase Cloud Functions
30
+
31
+ ---
32
+
33
+ ## Usage & Reference
34
+
35
+ - [HOW_TO_USE.md](./HOW_TO_USE.md) - Component composition philosophy
36
+ - [COMPONENTS.md](./COMPONENTS.md) - Component catalog
37
+ - [FEATURES.md](./FEATURES.md) - Feature packages usage
38
+ - [LAYOUTS.md](./LAYOUTS.md) - Layout presets
39
+ - [STYLING.md](./STYLING.md) - Styling system
40
+ - [IMPORT_PATTERNS.md](./IMPORT_PATTERNS.md) - Import conventions
41
+
42
+ ---
43
+
44
+ ## Tools
45
+
46
+ - [CLI.md](./CLI.md) - `dndev` commands
47
+
48
+ ---
49
+
50
+ **Convention over configuration. AI-first design.**