@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,177 @@
1
+ # Firebase Functions Setup
2
+
3
+ This guide covers Firebase Cloud Functions setup, deployment, and the critical `functions.yaml` file.
4
+
5
+ ## Overview
6
+
7
+ Firebase Functions provide serverless backend capabilities for your DoNotDev application. Functions are scaffolded into your app's `functions/` directory and deployed to Firebase Cloud Functions.
8
+
9
+ ## Structure
10
+
11
+ ```
12
+ functions/
13
+ ├── src/
14
+ │ ├── auth/ # Authentication functions
15
+ │ ├── oauth/ # OAuth functions
16
+ │ ├── billing/ # Billing functions
17
+ │ └── index.ts # Main functions entry point
18
+ ├── package.json # Dependencies and scripts
19
+ ├── tsconfig.json # TypeScript configuration
20
+ ├── functions.yaml # Firebase function manifest (auto-generated)
21
+ ├── .env.example # Environment variables template
22
+ ├── service-account-key.json # Firebase service account key
23
+ └── README.md # Functions documentation
24
+ ```
25
+
26
+ ## Critical: functions.yaml
27
+
28
+ **`functions.yaml` must be manually created and maintained.** This file serves as a manifest that tells Firebase which functions to deploy and their configuration.
29
+
30
+ ### Important Notes
31
+
32
+ 1. **Manually Maintained**: You must create and maintain this file yourself
33
+ 2. **Must Include All Functions**: Every function exported from `src/index.ts` must be listed in `functions.yaml`
34
+ 3. **Deployment Dependency**: If a function is missing from `functions.yaml`, it won't be deployed
35
+ 4. **Cleared Before Build**: The deployment script clears `functions.yaml` before building, so you must recreate it with all your functions
36
+
37
+ ### How It Works
38
+
39
+ 1. **Export in `src/index.ts`**: All functions must be exported from `src/index.ts`
40
+ ```typescript
41
+ export * from './billing/createCustomerPortal.js';
42
+ ```
43
+
44
+ 2. **Create Entry in `functions.yaml`**: For each exported function, add an entry:
45
+ ```yaml
46
+ endpoints:
47
+ createCustomerPortal:
48
+ region:
49
+ - europe-west1
50
+ platform: gcfv2
51
+ httpsTrigger: {}
52
+ entryPoint: createCustomerPortal
53
+ labels: {}
54
+ ```
55
+
56
+ 3. **Deployment Process**: During `dndev deploy`:
57
+ - Functions are built to `lib/`
58
+ - Firebase CLI deploys functions listed in `functions.yaml`
59
+ - `functions.yaml` is preserved and not modified by the deployment script
60
+
61
+ ### Troubleshooting Missing Functions
62
+
63
+ If a function isn't being deployed:
64
+
65
+ 1. **Check Export**: Ensure the function is exported in `src/index.ts`
66
+ 2. **Check Build**: Verify the function exists in `lib/index.js` after build
67
+ 3. **Check functions.yaml**: Verify the function is listed in `functions.yaml` with correct `entryPoint` name matching the export name
68
+
69
+ ### Example functions.yaml
70
+
71
+ ```yaml
72
+ endpoints:
73
+ functionName1:
74
+ region:
75
+ - europe-west1
76
+ platform: gcfv2
77
+ httpsTrigger: {}
78
+ entryPoint: functionName1
79
+ labels: {}
80
+ functionName2:
81
+ region:
82
+ - europe-west1
83
+ platform: gcfv2
84
+ httpsTrigger: {}
85
+ entryPoint: functionName2
86
+ labels: {}
87
+ specVersion: v1alpha1
88
+ requiredAPIs: []
89
+ ```
90
+
91
+ ## Environment Variables
92
+
93
+ Functions use a different `.env` system than Vite/Next.js:
94
+
95
+ - **Local Development**: `.env.local` file (Loaded automatically by `dn emu`)
96
+ - **Production Secrets**: `.env` file (Used by `dn sync-secrets` to update Cloud Functions)
97
+
98
+ **Note:** Functions don't follow Vite/Next.js `.env.local` priority rules. We enforce a strict separation: `.env` is ONLY for production, `.env.local` is ONLY for emulators.
99
+
100
+ See [EMULATOR_SETUP.md](./EMULATOR_SETUP.md) for more details.
101
+
102
+ ### Required Environment Variables (.env.local for development)
103
+
104
+ ```bash
105
+ # Stripe Configuration
106
+ STRIPE_SECRET_KEY=sk_test_...
107
+ STRIPE_WEBHOOK_SECRET=whsec_...
108
+ ```
109
+
110
+ ## Deployment
111
+
112
+ Use the unified deployment command from workspace root:
113
+
114
+ ```bash
115
+ # Deploy everything (interactive)
116
+ dndev deploy
117
+
118
+ # Deploy specific app
119
+ dndev deploy <app-name>
120
+ ```
121
+
122
+ The deployment process:
123
+ 1. Clears `lib/` folder for fresh build
124
+ 2. Builds functions to `lib/`
125
+ 3. Deploys all functions listed in `functions.yaml` (manually maintained, not modified by deployment)
126
+
127
+ ## Development
128
+
129
+ ```bash
130
+ # Start Firebase emulators
131
+ bun run serve
132
+
133
+ # Start with debugging
134
+ bun run dev
135
+ ```
136
+
137
+ ## Adding New Functions
138
+
139
+ 1. **Create Function File**: Add your function in `src/` (e.g., `src/billing/myNewFunction.ts`)
140
+ 2. **Export in index.ts**: Add export to `src/index.ts`:
141
+ ```typescript
142
+ export * from './billing/myNewFunction.js';
143
+ ```
144
+ 3. **Add to functions.yaml**: Add entry to `functions.yaml`:
145
+ ```yaml
146
+ myNewFunction:
147
+ region:
148
+ - europe-west1
149
+ platform: gcfv2
150
+ httpsTrigger: {}
151
+ entryPoint: myNewFunction
152
+ labels: {}
153
+ ```
154
+ 4. **Deploy**: Run `dndev deploy` - the function will be deployed if listed in `functions.yaml`
155
+
156
+ ## Security
157
+
158
+ - All functions require authentication
159
+ - Webhook signature verification
160
+ - Secure token management
161
+ - Firebase custom claims for user status
162
+
163
+ ## Framework Integration
164
+
165
+ Functions use the framework's `@donotdev/functions` package:
166
+
167
+ ```typescript
168
+ // apps/your-app/functions/src/billing/createCheckoutSession.ts
169
+ import { createCheckoutSession as generic } from '@donotdev/functions/firebase';
170
+ import { stripeBackConfig } from '../config/stripeBackConfig';
171
+
172
+ // Your app's function = framework + your config
173
+ export const createCheckoutSession = generic(stripeBackConfig);
174
+ ```
175
+
176
+ See [Functions Package Architecture](../../../docs/architecture/packages/FUNCTIONS_PACKAGE.md) for detailed explanation.
177
+
@@ -0,0 +1,451 @@
1
+ # 🚀 Getting Started with DoNotDev Framework
2
+
3
+ This guide will help you create your first DoNotDev application from scratch.
4
+
5
+ ## Prerequisites
6
+
7
+ Before you begin, ensure you have:
8
+
9
+ - **Bun** >= 1.3.0 ([install](https://bun.sh/))
10
+ - **Node.js** >= 20.19.0 or >= 22.12.0 (LTS)
11
+ - **Git** (for version control)
12
+ - A GitHub account (for framework access)
13
+
14
+ ## Step 1: Install the CLI
15
+
16
+ ```bash
17
+ # Using npx (temporary)
18
+ npx @donotdev/cli create-project
19
+
20
+ # Or install globally with Bun
21
+ bun add -g @donotdev/cli
22
+
23
+ # Or use bunx (recommended)
24
+ bunx @donotdev/cli create-project
25
+ ```
26
+
27
+ ## Choosing Your Features
28
+
29
+ Before creating your project, decide what features you need:
30
+
31
+ ### Do You Need Billing?
32
+
33
+ ```
34
+ ┌─────────────────────────────────────────┐
35
+ │ Do you need billing/subscriptions? │
36
+ └─────────┬───────────────────────────────┘
37
+
38
+ ┌─────┴─────┐
39
+ │ │
40
+ No Yes
41
+ │ │
42
+ ▼ ▼
43
+ ┌────────┐ ┌─────────┐
44
+ │ Auth │ │ Auth │
45
+ │ Only │ │ + │
46
+ │ │ │ Billing │
47
+ └────────┘ └─────────┘
48
+ │ │
49
+ ├───────────┼──────────────────────┐
50
+ │ │ │
51
+ ▼ ▼ ▼
52
+ Internal Subscription One-Time
53
+ Tools (Recurring) Payment
54
+ Free Apps SaaS Apps Lifetime
55
+ MVPs Monthly/Yearly License
56
+ ```
57
+
58
+ **Auth-Only Apps:**
59
+
60
+ - ✅ 49% smaller bundle
61
+ - ✅ No Stripe overhead
62
+ - ✅ Simpler setup
63
+ - ✅ Easy to add billing later
64
+ - **Use cases:** Internal tools, free apps, MVPs, prototypes
65
+ - **Guide:** [Auth-Only Apps](docs/guides/AUTH_ONLY_APPS.md)
66
+
67
+ **Billing-Enabled Apps:**
68
+
69
+ - ✅ Full Stripe integration
70
+ - ✅ 80-90% less code than manual
71
+ - ✅ Webhook handling included
72
+ - ✅ Subscription management
73
+ - **Use cases:** SaaS products, paid tools, membership sites
74
+ - **Guide:** [Billing Quickstart](docs/guides/BILLING_QUICKSTART.md)
75
+
76
+ ## Step 2: Create Your Project
77
+
78
+ ```bash
79
+ # Run the scaffolding command
80
+ bunx @donotdev/cli create-project
81
+
82
+ # You'll be prompted for:
83
+ # - Project name: my-awesome-app
84
+ # - Include Firebase Functions: Yes/No
85
+ # - App name(s): web, admin (comma-separated)
86
+ # - Template for each app: Vite (SPA)
87
+ ```
88
+
89
+ **Example interaction:**
90
+
91
+ ```
92
+ 🚀 DoNotDev Project Creator
93
+
94
+ ? Project name: my-awesome-app
95
+ ? Include Firebase Functions? Yes
96
+ ? Configuration mode? Guided (recommended)
97
+ ? App name(s): web
98
+ ? What are you building? A web application with user accounts
99
+ ? Need backend/API? Yes, Firebase
100
+ ? User authentication? Yes, email/password
101
+ ? Payment/subscriptions? No
102
+ ```
103
+
104
+ ## Step 3: Navigate and Install
105
+
106
+ ```bash
107
+ cd my-awesome-app
108
+ bun install
109
+ ```
110
+
111
+ ## Step 4: Configure Environment
112
+
113
+ Create `.env` file in your project root:
114
+
115
+ ```bash
116
+ # Firebase Configuration (if using Firebase)
117
+ VITE_FIREBASE_API_KEY=your-api-key
118
+ VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
119
+ VITE_FIREBASE_PROJECT_ID=your-project-id
120
+ VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
121
+ VITE_FIREBASE_MESSAGING_SENDER_ID=123456789
122
+ VITE_FIREBASE_APP_ID=1:123456789:web:abcdef
123
+
124
+ # Stripe Configuration (if using billing)
125
+ VITE_STRIPE_PUBLISHABLE_KEY=pk_test_...
126
+ STRIPE_SECRET_KEY=sk_test_...
127
+ STRIPE_WEBHOOK_SECRET=whsec_...
128
+
129
+ # App Configuration
130
+ VITE_APP_NAME="My Awesome App"
131
+ VITE_APP_URL=http://localhost:5173
132
+ ```
133
+
134
+ ## Step 5: Start Development
135
+
136
+ ```bash
137
+ # Start all apps
138
+ bun run dev
139
+
140
+ # Or start a specific app
141
+ bun run dev:web
142
+ ```
143
+
144
+ Your app should now be running at `http://localhost:5173`!
145
+
146
+ **Note:** During the first build, if `logo.svg` is missing, the framework will prompt: "We didn't find a logo.svg. Do you want us to provide one from the framework?" You can say yes, or add your own logo to `public/logo.svg`.
147
+
148
+ ## Project Structure Explained
149
+
150
+ ```
151
+ my-awesome-app/
152
+ ├── apps/
153
+ │ └── web/ # Your application
154
+ │ ├── src/
155
+ │ │ ├── pages/ # Routes (auto-discovered)
156
+ │ │ │ ├── HomePage.tsx # → /home
157
+ │ │ │ ├── AboutPage.tsx # → /about
158
+ │ │ │ └── blog/
159
+ │ │ │ └── BlogPostPage.tsx # → /blog/:slug
160
+ │ │ ├── components/ # Your components
161
+ │ │ ├── locales/ # Translation files
162
+ │ │ │ ├── home_en.json
163
+ │ │ │ ├── home_fr.json
164
+ │ │ │ └── ...
165
+ │ │ ├── themes.css # Custom themes
166
+ │ │ ├── App.tsx # App entry
167
+ │ │ └── main.tsx # Vite entry
168
+ │ ├── public/ # Static assets
169
+ │ ├── functions/ # Backend functions (if enabled, per-app)
170
+ │ │ ├── src/
171
+ │ │ │ ├── firebase/ # Firebase Cloud Functions
172
+ │ │ │ │ └── auth/
173
+ │ │ │ │ └── onCreate.ts
174
+ │ │ │ └── shared/ # Shared business logic
175
+ │ │ └── package.json
176
+ │ ├── package.json
177
+ │ └── vite.config.ts # Vite configuration
178
+ ├── entities/ # Your data models (Valibot schemas, workspace package)
179
+ │ ├── package.json # Workspace package (includes valibot from matrix)
180
+ │ ├── index.ts
181
+ │ ├── user.ts
182
+ │ └── post.ts
183
+ ├── .env # Environment variables (don't commit!)
184
+ ├── .env.example # Example env vars (commit this)
185
+ ├── firebase.json # Firebase config (if using Firebase)
186
+ ├── turbo.json # Turborepo configuration
187
+ └── package.json # Monorepo root
188
+ ```
189
+
190
+ ## Step 6: Create Your First Page
191
+
192
+ ```tsx
193
+ // apps/web/src/pages/DashboardPage.tsx
194
+ import { PageContainer } from '@donotdev/templates';
195
+ import { useAuth } from '@donotdev/auth';
196
+
197
+ export function DashboardPage() {
198
+ const { user } = useAuth();
199
+
200
+ return (
201
+ <PageContainer>
202
+ <h1>Welcome, {user?.displayName}!</h1>
203
+ <p>This is your dashboard.</p>
204
+ </PageContainer>
205
+ );
206
+ }
207
+
208
+ // Auto-discovered route: /dashboard
209
+ // No configuration needed!
210
+ ```
211
+
212
+ ## Step 7: Add Translations
213
+
214
+ ```json
215
+ // apps/web/src/locales/dashboard_en.json
216
+ {
217
+ "title": "Dashboard",
218
+ "welcome": "Welcome, {{name}}!",
219
+ "description": "This is your dashboard."
220
+ }
221
+ ```
222
+
223
+ ```tsx
224
+ // Use in your component
225
+ import { useTranslation } from '@donotdev/core';
226
+
227
+ export function DashboardPage() {
228
+ const { t } = useTranslation();
229
+ const { user } = useAuth();
230
+
231
+ return (
232
+ <PageContainer>
233
+ <h1>{t('dashboard.welcome', { name: user?.displayName })}</h1>
234
+ <p>{t('dashboard.description')}</p>
235
+ </PageContainer>
236
+ );
237
+ }
238
+ ```
239
+
240
+ ## Step 8: Customize Your Theme
241
+
242
+ ```css
243
+ /* apps/web/src/themes.css */
244
+
245
+ /* Extend the default light theme */
246
+ .light {
247
+ --primary: #3b82f6; /* Your brand color */
248
+ --secondary: #10b981;
249
+ --background: #ffffff;
250
+ --foreground: #0a0a0a;
251
+ }
252
+
253
+ /* Extend the default dark theme */
254
+ .dark {
255
+ --primary: #60a5fa;
256
+ --secondary: #34d399;
257
+ --background: #0a0a0a;
258
+ --foreground: #fafafa;
259
+ }
260
+
261
+ /* Add a custom theme */
262
+ .ocean {
263
+ --theme-icon: 'Waves'; /* Lucide icon name */
264
+ --theme-label: 'Ocean'; /* Display name */
265
+ --primary: #0ea5e9;
266
+ --secondary: #06b6d4;
267
+ --background: #001a33;
268
+ --foreground: #e0f2fe;
269
+ }
270
+ ```
271
+
272
+ Users can now switch between light, dark, and ocean themes!
273
+
274
+ ## Step 9: Add Dynamic Routes
275
+
276
+ ```tsx
277
+ // apps/web/src/pages/blog/BlogPostPage.tsx
278
+ import type { PageMeta } from '@donotdev/types';
279
+ import { useParams } from 'react-router-dom';
280
+
281
+ // Define route parameters
282
+ export const meta: PageMeta = {
283
+ route: { params: ['slug'] }, // Creates /blog/:slug
284
+ };
285
+
286
+ export function BlogPostPage() {
287
+ const { slug } = useParams<{ slug: string }>();
288
+
289
+ return (
290
+ <article>
291
+ <h1>Blog Post: {slug}</h1>
292
+ {/* Fetch and display post content */}
293
+ </article>
294
+ );
295
+ }
296
+ ```
297
+
298
+ ## Step 10: Deploy
299
+
300
+ ### Firebase
301
+
302
+ ```bash
303
+ # Login to Firebase
304
+ firebase login
305
+
306
+ # Initialize (if not already done)
307
+ firebase init
308
+
309
+ # Deploy
310
+ dndev deploy
311
+ ```
312
+
313
+ ### Vercel
314
+
315
+ ```bash
316
+ # Login to Vercel
317
+ vercel login
318
+
319
+ # Link project
320
+ vercel link
321
+
322
+ # Deploy
323
+ vercel --prod
324
+ ```
325
+
326
+ ## Common Tasks
327
+
328
+ ### Add Authentication
329
+
330
+ ```tsx
331
+ import { useAuth, LoginPage } from '@donotdev/auth';
332
+
333
+ export function ProtectedPage() {
334
+ const user = useAuth('user');
335
+ const isLoading = useAuth('loading');
336
+
337
+ if (isLoading) return <div>Loading...</div>;
338
+ if (!user) return <LoginPage />;
339
+
340
+ return <div>Protected content for {user.email}</div>;
341
+ }
342
+ ```
343
+
344
+ ### Add Billing
345
+
346
+ ```tsx
347
+ import { useStripeBilling } from '@donotdev/billing';
348
+
349
+ export function UpgradePage() {
350
+ const subscription = useStripeBilling('subscription');
351
+ const checkout = useStripeBilling('checkout');
352
+
353
+ return (
354
+ <div>
355
+ <h2>Current Plan: {subscription?.planId || 'Free'}</h2>
356
+ <button
357
+ onClick={() => checkout({ priceId: 'pro', mode: 'subscription' })}
358
+ >
359
+ Upgrade to Pro
360
+ </button>
361
+ </div>
362
+ );
363
+ }
364
+ ```
365
+
366
+ ### Add a New Language
367
+
368
+ 1. Create translation files in `apps/web/src/locales/`:
369
+
370
+ ```
371
+ home_es.json (Spanish)
372
+ about_es.json
373
+ dashboard_es.json
374
+ ```
375
+
376
+ 2. The framework automatically detects and enables the language!
377
+
378
+ ### Create CRUD Operations
379
+
380
+ ```tsx
381
+ import { DataTable, CreateForm, EditForm } from '@donotdev/ui';
382
+ import { userSchema } from 'entities/user';
383
+
384
+ export function UsersPage() {
385
+ return (
386
+ <DataTable
387
+ entity="users"
388
+ schema={userSchema}
389
+ columns={['name', 'email', 'role']}
390
+ actions={['create', 'edit', 'delete']}
391
+ />
392
+ );
393
+ }
394
+ ```
395
+
396
+ ## Next Steps
397
+
398
+ - **Read the full documentation**: [docs.donotdev.com](https://docs.donotdev.com)
399
+ - **Join the community**: [Discord](https://discord.gg/your-invite)
400
+ - **Explore the demo app**: `apps/demo` in the framework repository
401
+ - **Check CLAUDE.md**: For architecture deep-dive and framework internals
402
+
403
+ ## Troubleshooting
404
+
405
+ ### "Module not found: @donotdev/..."
406
+
407
+ Make sure you ran `bun install` in the project root. The framework uses workspaces.
408
+
409
+ ```bash
410
+ cd /path/to/your/project
411
+ bun install
412
+ ```
413
+
414
+ ### Firebase deployment fails
415
+
416
+ 1. Check you're logged in: `firebase login`
417
+ 2. Verify project ID in `.firebaserc`
418
+ 3. Ensure functions are built: `bun run build`
419
+
420
+ ### Vite dev server not starting
421
+
422
+ 1. Check port 5173 isn't already in use
423
+ 2. Clear cache: `rm -rf node_modules/.vite`
424
+ 3. Reinstall: `bun install`
425
+
426
+ ### Type errors in IDE
427
+
428
+ 1. Restart TypeScript server in your IDE
429
+ 2. Check `tsconfig.json` is properly configured
430
+ 3. Run `bun run type-check` to see actual errors
431
+
432
+ ## Tips & Tricks
433
+
434
+ 1. **Use the demo app as reference** - It showcases all features
435
+ 2. **Follow the dependency hierarchy** - Don't import up the chain
436
+ 3. **Let the framework handle routing** - Just create pages, routes are auto-discovered
437
+ 4. **Use TypeScript** - Full type safety throughout
438
+ 5. **Customize via override** - Don't modify framework files directly
439
+
440
+ ## Need Help?
441
+
442
+ - **Discord**: Real-time help from the community
443
+ - **GitHub Issues**: Report bugs or request features
444
+ - **Email**: mooti.web.app@gmail.com for licensing questions
445
+ - **Documentation**: Comprehensive guides at docs.donotdev.com
446
+
447
+ ---
448
+
449
+ **Happy coding! 🚀**
450
+
451
+ Built something cool? Share it in the Discord community!