vibefast-cli 1.1.5 → 1.2.1

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 (299) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +63 -169
  3. package/dist/commands/add.d.ts +1 -1
  4. package/dist/commands/add.d.ts.map +1 -1
  5. package/dist/commands/add.js +547 -589
  6. package/dist/commands/add.js.map +1 -1
  7. package/dist/commands/checklist.d.ts +1 -1
  8. package/dist/commands/checklist.d.ts.map +1 -1
  9. package/dist/commands/checklist.js +40 -39
  10. package/dist/commands/checklist.js.map +1 -1
  11. package/dist/commands/doctor.d.ts +1 -1
  12. package/dist/commands/doctor.js +22 -22
  13. package/dist/commands/doctor.js.map +1 -1
  14. package/dist/commands/env.d.ts +1 -1
  15. package/dist/commands/env.d.ts.map +1 -1
  16. package/dist/commands/env.js +58 -53
  17. package/dist/commands/env.js.map +1 -1
  18. package/dist/commands/health.d.ts +1 -1
  19. package/dist/commands/health.d.ts.map +1 -1
  20. package/dist/commands/health.js +101 -93
  21. package/dist/commands/health.js.map +1 -1
  22. package/dist/commands/init.d.ts +1 -1
  23. package/dist/commands/init.d.ts.map +1 -1
  24. package/dist/commands/init.js +416 -296
  25. package/dist/commands/init.js.map +1 -1
  26. package/dist/commands/remove.d.ts +1 -1
  27. package/dist/commands/remove.d.ts.map +1 -1
  28. package/dist/commands/remove.js +77 -64
  29. package/dist/commands/remove.js.map +1 -1
  30. package/dist/commands/status.d.ts +1 -1
  31. package/dist/commands/status.d.ts.map +1 -1
  32. package/dist/commands/status.js +15 -14
  33. package/dist/commands/status.js.map +1 -1
  34. package/dist/core/__tests__/detect.test.js +68 -34
  35. package/dist/core/__tests__/detect.test.js.map +1 -1
  36. package/dist/core/ast.d.ts +14 -0
  37. package/dist/core/ast.d.ts.map +1 -0
  38. package/dist/core/ast.js +239 -0
  39. package/dist/core/ast.js.map +1 -0
  40. package/dist/core/codemod.d.ts.map +1 -1
  41. package/dist/core/codemod.js +62 -44
  42. package/dist/core/codemod.js.map +1 -1
  43. package/dist/core/config.d.ts +10 -0
  44. package/dist/core/config.d.ts.map +1 -0
  45. package/dist/core/config.js +51 -0
  46. package/dist/core/config.js.map +1 -0
  47. package/dist/core/detect.d.ts +8 -2
  48. package/dist/core/detect.d.ts.map +1 -1
  49. package/dist/core/detect.js +52 -21
  50. package/dist/core/detect.js.map +1 -1
  51. package/dist/core/errors.d.ts.map +1 -1
  52. package/dist/core/errors.js +9 -8
  53. package/dist/core/errors.js.map +1 -1
  54. package/dist/core/exec.d.ts +16 -0
  55. package/dist/core/exec.d.ts.map +1 -0
  56. package/dist/core/exec.js +48 -0
  57. package/dist/core/exec.js.map +1 -0
  58. package/dist/core/manualSteps.d.ts +7 -0
  59. package/dist/core/manualSteps.d.ts.map +1 -0
  60. package/dist/core/manualSteps.js +59 -0
  61. package/dist/core/manualSteps.js.map +1 -0
  62. package/dist/core/paths.d.ts +3 -1
  63. package/dist/core/paths.d.ts.map +1 -1
  64. package/dist/core/paths.js +14 -10
  65. package/dist/core/paths.js.map +1 -1
  66. package/dist/core/spinner.d.ts +1 -1
  67. package/dist/core/spinner.d.ts.map +1 -1
  68. package/dist/core/spinner.js +38 -8
  69. package/dist/core/spinner.js.map +1 -1
  70. package/dist/core/vosk.d.ts.map +1 -1
  71. package/dist/core/vosk.js +50 -39
  72. package/dist/core/vosk.js.map +1 -1
  73. package/docs/manual-testing.md +91 -0
  74. package/package.json +6 -3
  75. package/recipes/audio-recorder/apps/native/src/app/audio-recorder/index.tsx +5 -0
  76. package/recipes/audio-recorder/recipe.json +3 -3
  77. package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/audio-player.tsx +301 -0
  78. package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/audio-recorder.tsx +373 -0
  79. package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/audio-waveform.tsx +270 -0
  80. package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/index.ts +4 -0
  81. package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/recording-list.tsx +89 -0
  82. package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/audio-player-demo.tsx +66 -0
  83. package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/audio-recorder-cloud.tsx +68 -0
  84. package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/audio-recorder-interview.tsx +102 -0
  85. package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/basic.tsx +27 -0
  86. package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/index.ts +5 -0
  87. package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/with-recording-list-demo.tsx +82 -0
  88. package/recipes/audio-recorder-supabase/packages/backend/src/services/recordings.ts +369 -0
  89. package/recipes/audio-recorder-supabase/packages/backend/supabase/migrations/recordings.sql +70 -0
  90. package/recipes/audio-recorder-supabase/recipe.json +35 -0
  91. package/recipes/audio-recorder-supabase@latest.zip +0 -0
  92. package/recipes/audio-recorder@latest.zip +0 -0
  93. package/recipes/charts/apps/native/src/features/charts/components/bar-chart.tsx +3 -3
  94. package/recipes/charts/apps/native/src/features/charts/components/candlestick-chart.tsx +2 -2
  95. package/recipes/charts/apps/native/src/features/charts/components/chart-card.tsx +5 -5
  96. package/recipes/charts/apps/native/src/features/charts/components/column-chart.tsx +3 -3
  97. package/recipes/charts/apps/native/src/features/charts/components/doughnut-chart.tsx +20 -4
  98. package/recipes/charts/apps/native/src/features/charts/components/line-chart.tsx +7 -6
  99. package/recipes/charts/apps/native/src/features/charts/components/radar-chart.tsx +6 -4
  100. package/recipes/charts/apps/native/src/features/charts/components/radial-bar-chart.tsx +1 -1
  101. package/recipes/charts/apps/native/src/features/charts/components/stacked-bar-chart.tsx +5 -4
  102. package/recipes/charts/recipe.json +4 -13
  103. package/recipes/charts@latest.zip +0 -0
  104. package/recipes/chatbot/apps/native/src/app/chatbot/index.tsx +1 -0
  105. package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-markdown.tsx +86 -86
  106. package/recipes/chatbot/apps/native/src/features/chatbot/components/markdown/code-block.tsx +86 -53
  107. package/recipes/chatbot/recipe.json +26 -92
  108. package/recipes/chatbot-supabase/apps/native/src/api-client/supabase/chatbot.ts +515 -0
  109. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/app/index.tsx +257 -0
  110. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-header-buttons.tsx +59 -0
  111. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-input-bar.tsx +485 -0
  112. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-markdown.tsx +575 -0
  113. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-message-bubble.tsx +223 -0
  114. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-settings-modal.tsx +161 -0
  115. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/image-preview-list.tsx +116 -0
  116. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/markdown/code-block.tsx +165 -0
  117. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/markdown/index.ts +10 -0
  118. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/markdown/table-renderer.tsx +129 -0
  119. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/message-error-boundary.tsx +78 -0
  120. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/message-list.tsx +170 -0
  121. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/model-selector.tsx +283 -0
  122. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/report-content-modal.tsx +188 -0
  123. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/suggested-messages.tsx +67 -0
  124. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/constants/models.ts +20 -0
  125. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/constants/report-reasons.ts +9 -0
  126. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-attachment-cache.ts +142 -0
  127. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-chat-config.ts +458 -0
  128. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-chat-handlers.ts +429 -0
  129. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-chatbot-settings.ts +89 -0
  130. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-conversation.ts +90 -0
  131. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-image-picker.ts +122 -0
  132. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-keyboard-coordinator.ts +161 -0
  133. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-smart-scroll-manager.ts +213 -0
  134. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/models/index.ts +86 -0
  135. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/models/models.ts +162 -0
  136. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/models/providers.ts +62 -0
  137. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/models/types.ts +40 -0
  138. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/services/file-uploader.ts +287 -0
  139. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/services/message-handler-service.ts +189 -0
  140. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/types/index.ts +70 -0
  141. package/recipes/chatbot-supabase/apps/native/src/features/chatbot/utils/chat-telemetry.ts +91 -0
  142. package/recipes/chatbot-supabase/packages/backend/src/services/conversations.ts +243 -0
  143. package/recipes/chatbot-supabase/packages/backend/src/services/messages.ts +327 -0
  144. package/recipes/chatbot-supabase/packages/backend/supabase/functions/chat-stream/index.ts +347 -0
  145. package/recipes/chatbot-supabase/packages/backend/supabase/migrations/chatbot.sql +104 -0
  146. package/recipes/chatbot-supabase/recipe.json +79 -0
  147. package/recipes/chatbot-supabase@latest.zip +0 -0
  148. package/recipes/chatbot.zip +0 -0
  149. package/recipes/chatbot@latest.zip +0 -0
  150. package/recipes/image-analysis/packages/backend/convex/imageAnalysis/index.ts +2 -2
  151. package/recipes/image-analysis/packages/backend/convex/imageAnalysis.ts +0 -1
  152. package/recipes/image-analysis/recipe.json +15 -55
  153. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/analysis-options-screen.tsx +304 -0
  154. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/camera.tsx +221 -0
  155. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/image-capture-screen.tsx +333 -0
  156. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/loading-screen.tsx +214 -0
  157. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/loading.tsx +191 -0
  158. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/results.tsx +137 -0
  159. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/trait-details.tsx +172 -0
  160. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/use-analysis-data.ts +160 -0
  161. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/use-results-screen.ts +151 -0
  162. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/achievement-badge.tsx +77 -0
  163. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/achievement-card.tsx +75 -0
  164. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/achievement-unlocked-modal.tsx +162 -0
  165. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/achievements-section.tsx +44 -0
  166. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/advice-list.tsx +42 -0
  167. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/circular-progress.tsx +233 -0
  168. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/content-card.tsx +38 -0
  169. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/error-state.tsx +42 -0
  170. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/index.ts +9 -0
  171. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/loading-state.tsx +26 -0
  172. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/profile-image.tsx +60 -0
  173. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/results-header.tsx +62 -0
  174. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/score-display.tsx +54 -0
  175. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/share-options-modal.tsx +110 -0
  176. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/traits-grid.tsx +74 -0
  177. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/config/analysis-config.ts +80 -0
  178. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/config/master-analysis-config.ts +157 -0
  179. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/hooks/index.ts +1 -0
  180. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/hooks/use-analysis.ts +38 -0
  181. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/hooks/use-image-analysis.ts +208 -0
  182. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/services/analysis-service.ts +262 -0
  183. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/services/share-service.ts +176 -0
  184. package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/services/trait-details-service.ts +289 -0
  185. package/recipes/image-analysis-supabase/packages/backend/src/services/image-analyses.ts +132 -0
  186. package/recipes/image-analysis-supabase/packages/backend/supabase/functions/analyze-image/index.ts +312 -0
  187. package/recipes/image-analysis-supabase/packages/backend/supabase/migrations/image_analysis.sql +42 -0
  188. package/recipes/image-analysis-supabase/recipe.json +57 -0
  189. package/recipes/image-analysis-supabase@latest.zip +0 -0
  190. package/recipes/image-analysis@latest.zip +0 -0
  191. package/recipes/image-generator/apps/native/src/features/image-generator/app/index.tsx +16 -2
  192. package/recipes/image-generator/apps/native/src/features/image-generator/components/image-model-selector.tsx +11 -5
  193. package/recipes/image-generator/apps/native/src/features/image-generator/hooks/use-image-generator.ts +11 -5
  194. package/recipes/image-generator/packages/backend/convex/imageGeneration/index.ts +2 -2
  195. package/recipes/image-generator/recipe.json +16 -39
  196. package/recipes/image-generator-supabase/apps/native/src/features/image-generator/app/_layout.tsx +26 -0
  197. package/recipes/image-generator-supabase/apps/native/src/features/image-generator/app/gallery.tsx +217 -0
  198. package/recipes/image-generator-supabase/apps/native/src/features/image-generator/app/index.tsx +251 -0
  199. package/recipes/image-generator-supabase/apps/native/src/features/image-generator/components/gallery-image.tsx +25 -0
  200. package/recipes/image-generator-supabase/apps/native/src/features/image-generator/components/image-detail-modal.tsx +215 -0
  201. package/recipes/image-generator-supabase/apps/native/src/features/image-generator/components/image-model-selector.tsx +216 -0
  202. package/recipes/image-generator-supabase/apps/native/src/features/image-generator/components/image-placeholder.tsx +26 -0
  203. package/recipes/image-generator-supabase/apps/native/src/features/image-generator/hooks/use-image-gallery.ts +71 -0
  204. package/recipes/image-generator-supabase/apps/native/src/features/image-generator/hooks/use-image-generator-settings.ts +152 -0
  205. package/recipes/image-generator-supabase/apps/native/src/features/image-generator/hooks/use-image-generator.ts +103 -0
  206. package/recipes/image-generator-supabase/apps/native/src/features/image-generator/models/models.ts +66 -0
  207. package/recipes/image-generator-supabase/apps/native/src/features/image-generator/services/image-gallery-service.ts +96 -0
  208. package/recipes/image-generator-supabase/apps/native/src/features/image-generator/services/image-save-service.ts +120 -0
  209. package/recipes/image-generator-supabase/packages/backend/supabase/functions/generate-image/index.ts +291 -0
  210. package/recipes/image-generator-supabase/packages/backend/supabase/migrations/image_generator.sql +71 -0
  211. package/recipes/image-generator-supabase/recipe.json +59 -0
  212. package/recipes/image-generator-supabase@latest.zip +0 -0
  213. package/recipes/image-generator@latest.zip +0 -0
  214. package/recipes/ios-widget/recipe.json +15 -24
  215. package/recipes/ios-widget@latest.zip +0 -0
  216. package/recipes/onboarding/apps/native/src/features/onboarding/analytics/index.ts +9 -0
  217. package/recipes/onboarding/apps/native/src/features/onboarding/components/onboarding-with-analytics.tsx +141 -0
  218. package/recipes/onboarding/apps/native/src/features/onboarding/components/onboarding.tsx +173 -0
  219. package/recipes/onboarding/apps/native/src/features/onboarding/config/onboarding-flow-config.ts +189 -0
  220. package/recipes/onboarding/apps/native/src/features/onboarding/demo-one/app/index.tsx +42 -0
  221. package/recipes/onboarding/apps/native/src/features/onboarding/demo-one/data.ts +32 -0
  222. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/app/index.tsx +43 -0
  223. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/interactive-onboarding.tsx +222 -0
  224. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/ai-tone-step.tsx +133 -0
  225. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/currency-step.tsx +165 -0
  226. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-ai-step.tsx +199 -0
  227. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-chatbot-step.tsx +154 -0
  228. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-manual-step.tsx +156 -0
  229. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-scan-step.tsx +158 -0
  230. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/main-reason-step.tsx +139 -0
  231. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/notification-step.tsx +129 -0
  232. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/overspend-step.tsx +138 -0
  233. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/personalizing-step.tsx +190 -0
  234. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/rating-step.tsx +98 -0
  235. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/reminder-step.tsx +181 -0
  236. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/safety-step.tsx +110 -0
  237. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/struggle-step.tsx +139 -0
  238. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/welcome-step.tsx +217 -0
  239. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/ui/onboarding-header.tsx +58 -0
  240. package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/constants.ts +179 -0
  241. package/recipes/onboarding/apps/native/src/features/onboarding/hooks/use-onboarding-analytics.ts +323 -0
  242. package/recipes/onboarding/apps/native/src/features/onboarding/services/onboarding-analytics.ts +432 -0
  243. package/recipes/onboarding/recipe.json +15 -0
  244. package/recipes/onboarding@latest.zip +0 -0
  245. package/recipes/payments/recipe.json +28 -61
  246. package/recipes/payments-supabase/apps/native/src/features/payments/README.md +200 -0
  247. package/recipes/payments-supabase/apps/native/src/features/payments/app/local-paywall.tsx +194 -0
  248. package/recipes/payments-supabase/apps/native/src/features/payments/app/remote-paywall.tsx +79 -0
  249. package/recipes/payments-supabase/apps/native/src/features/payments/components/payment-initializer.tsx +95 -0
  250. package/recipes/payments-supabase/apps/native/src/features/payments/components/paywall-error-state.tsx +60 -0
  251. package/recipes/payments-supabase/apps/native/src/features/payments/components/paywall-local-mode.tsx +116 -0
  252. package/recipes/payments-supabase/apps/native/src/features/payments/components/paywall-product-card.tsx +133 -0
  253. package/recipes/payments-supabase/apps/native/src/features/payments/components/paywall-remote-mode.tsx +146 -0
  254. package/recipes/payments-supabase/apps/native/src/features/payments/hooks/use-entitlement.ts +63 -0
  255. package/recipes/payments-supabase/apps/native/src/features/payments/index.ts +8 -0
  256. package/recipes/payments-supabase/apps/native/src/features/payments/services/revenuecat-adapter.ts +407 -0
  257. package/recipes/payments-supabase/packages/backend/src/services/payments.ts +201 -0
  258. package/recipes/payments-supabase/packages/backend/supabase/migrations/payments.sql +35 -0
  259. package/recipes/payments-supabase/recipe.json +51 -0
  260. package/recipes/payments-supabase@latest.zip +0 -0
  261. package/recipes/payments@latest.zip +0 -0
  262. package/recipes/quiz/apps/native/src/features/quiz/index.tsx +1 -2
  263. package/recipes/quiz/recipe.json +6 -9
  264. package/recipes/quiz@latest.zip +0 -0
  265. package/recipes/tracker-app/apps/native/src/features/tracker-app/app/index.tsx +1 -2
  266. package/recipes/tracker-app/recipe.json +7 -10
  267. package/recipes/tracker-app@latest.zip +0 -0
  268. package/recipes/voice-bot/recipe.json +8 -68
  269. package/recipes/voice-bot.zip +0 -0
  270. package/recipes/voice-bot@latest.zip +0 -0
  271. package/recipes/wake-word/recipe.json +10 -9
  272. package/recipes/wake-word.zip +0 -0
  273. package/recipes/wake-word@latest.zip +0 -0
  274. package/recipes/charts/apps/native/src/app/(root)/(protected)/charts/index.tsx +0 -3
  275. package/recipes/chatbot/packages/backend/convex/lib/rateLimit.ts +0 -100
  276. package/recipes/chatbot/packages/backend/convex/lib/telemetry.ts +0 -29
  277. package/recipes/chatbot/packages/backend/convex/ragKnowledge.ts +0 -0
  278. package/recipes/image-analysis/apps/native/assets/features/image-analyzer/front.jpg +0 -0
  279. package/recipes/image-analysis/apps/native/assets/features/image-analyzer/side.jpg +0 -0
  280. package/recipes/image-analysis/apps/native/assets/features/image-analyzer/threeQuarter.jpg +0 -0
  281. package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/_layout.tsx +0 -5
  282. package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/analysis-options.tsx +0 -50
  283. package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/camera.tsx +0 -2
  284. package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/index.tsx +0 -50
  285. package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/loading.tsx +0 -50
  286. package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/results.tsx +0 -2
  287. package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/trait-details.tsx +0 -3
  288. package/recipes/image-analysis/packages/backend/convex/imageAnalysisFunctions.ts +0 -325
  289. package/recipes/image-analysis/packages/backend/convex/lib/ai/imageAnalysisAdapter.ts +0 -200
  290. package/recipes/payments/apps/native/src/app/(root)/(protected)/paywall/index.tsx +0 -74
  291. package/recipes/payments/apps/native/src/app/(root)/(protected)/paywall/local.tsx +0 -25
  292. package/recipes/payments/apps/native/src/app/(root)/(protected)/paywall/remote.tsx +0 -23
  293. package/recipes/quiz/apps/native/src/app/(root)/(protected)/quiz/index.tsx +0 -47
  294. package/recipes/tracker-app/apps/native/src/app/(root)/(protected)/tracker-app/index.tsx +0 -1
  295. package/recipes/voice-bot/apps/native/src/app/(root)/(protected)/voice-bot/index.tsx +0 -27
  296. package/recipes/voice-bot/packages/backend/convex/router.ts +0 -81
  297. /package/recipes/{chatbot/apps/native/src/app/(root)/(protected) → chatbot-supabase/apps/native/src/app}/chatbot/index.tsx +0 -0
  298. /package/recipes/{image-generator/apps/native/src/app/(root)/(protected) → image-generator-supabase/apps/native/src/app}/image-generator/gallery.tsx +0 -0
  299. /package/recipes/{image-generator/apps/native/src/app/(root)/(protected) → image-generator-supabase/apps/native/src/app}/image-generator/index.tsx +0 -0
@@ -0,0 +1,116 @@
1
+ import type React from 'react';
2
+ import { ActivityIndicator, ScrollView, Text, View } from 'react-native';
3
+
4
+ import type { ProductOffering } from '@/core/payments/payment-service';
5
+ import { translate } from '@/lib';
6
+ import { useThemeConfig } from '@/lib/use-theme-config';
7
+
8
+ import { PaywallErrorState } from './paywall-error-state';
9
+ import { PaywallProductCard } from './paywall-product-card';
10
+
11
+ type PaywallLocalModeProps = {
12
+ isLoading: boolean;
13
+ error: string | null;
14
+ offerings: ProductOffering[];
15
+ onPurchase: (productId: string) => void;
16
+ onRetry: () => void;
17
+ onRestorePurchases: () => void;
18
+ isPurchasing: boolean;
19
+ primaryColor: string;
20
+ };
21
+
22
+ export const PaywallLocalMode: React.FC<PaywallLocalModeProps> = ({
23
+ isLoading,
24
+ error,
25
+ offerings,
26
+ onPurchase,
27
+ onRetry,
28
+ onRestorePurchases,
29
+ isPurchasing,
30
+ primaryColor,
31
+ }) => {
32
+ const theme = useThemeConfig();
33
+
34
+ return (
35
+ <View className="flex-1">
36
+ <View className="mb-8 items-center px-4">
37
+ <View
38
+ className="mb-6 size-32 items-center justify-center rounded-full"
39
+ style={{
40
+ backgroundColor: `${theme.colors.primary}10`,
41
+ borderWidth: 3,
42
+ borderColor: theme.colors.primary,
43
+ }}
44
+ >
45
+ <Text className="text-6xl">✨</Text>
46
+ </View>
47
+ <Text
48
+ className="mb-4 text-center text-3xl font-bold"
49
+ style={{ color: theme.colors.foreground }}
50
+ >
51
+ {translate('paywall.title')}
52
+ </Text>
53
+ <Text
54
+ className="text-center text-lg leading-6"
55
+ style={{ color: theme.colors.mutedForeground }}
56
+ >
57
+ {translate('paywall.subtitle')}
58
+ </Text>
59
+ </View>
60
+
61
+ {isLoading && (
62
+ <View className="flex-1 items-center justify-center py-20">
63
+ <ActivityIndicator size="large" color={theme.colors.primary} />
64
+ <Text
65
+ className="mt-4 text-lg"
66
+ style={{ color: theme.colors.mutedForeground }}
67
+ >
68
+ {translate('paywall.loading')}
69
+ </Text>
70
+ </View>
71
+ )}
72
+
73
+ {error && !isLoading && (
74
+ <PaywallErrorState
75
+ error={error}
76
+ onRetry={onRetry}
77
+ onRestorePurchases={onRestorePurchases}
78
+ isRestoringPurchases={isPurchasing}
79
+ />
80
+ )}
81
+
82
+ {!isLoading && !error && offerings.length === 0 && (
83
+ <View className="mx-4 mb-6">
84
+ <View
85
+ className="rounded-2xl p-6"
86
+ style={{ backgroundColor: `${theme.colors.warning}10` }}
87
+ >
88
+ <Text
89
+ className="text-center"
90
+ style={{ color: theme.colors.warning }}
91
+ >
92
+ {translate('paywall.no_offerings')}
93
+ </Text>
94
+ </View>
95
+ </View>
96
+ )}
97
+
98
+ {!isLoading && !error && offerings.length > 0 && (
99
+ <ScrollView
100
+ showsVerticalScrollIndicator={false}
101
+ contentContainerStyle={{ paddingBottom: 20 }}
102
+ >
103
+ {offerings.map((offering) => (
104
+ <PaywallProductCard
105
+ key={offering.id}
106
+ offering={offering}
107
+ onPurchase={onPurchase}
108
+ isLoading={isPurchasing}
109
+ primaryColor={primaryColor}
110
+ />
111
+ ))}
112
+ </ScrollView>
113
+ )}
114
+ </View>
115
+ );
116
+ };
@@ -0,0 +1,133 @@
1
+ import type React from 'react';
2
+ import { ActivityIndicator, Pressable, Text, View } from 'react-native';
3
+
4
+ import type { ProductOffering } from '@/core/payments/payment-service';
5
+ import { translate } from '@/lib';
6
+ import { useThemeConfig } from '@/lib/use-theme-config';
7
+
8
+ type PaywallProductCardProps = {
9
+ offering: ProductOffering;
10
+ onPurchase: (productId: string) => void;
11
+ isLoading: boolean;
12
+ primaryColor: string;
13
+ };
14
+
15
+ export const PaywallProductCard: React.FC<PaywallProductCardProps> = ({
16
+ offering,
17
+ onPurchase,
18
+ isLoading,
19
+ primaryColor,
20
+ }) => {
21
+ const theme = useThemeConfig();
22
+
23
+ return (
24
+ <View
25
+ key={offering.id}
26
+ className="mx-4 mb-6 overflow-hidden rounded-3xl"
27
+ style={{
28
+ backgroundColor: theme.colors.card,
29
+ shadowColor: theme.colors.primary,
30
+ shadowOffset: { width: 0, height: 20 },
31
+ shadowOpacity: 0.15,
32
+ shadowRadius: 40,
33
+ elevation: 8,
34
+ }}
35
+ >
36
+ {/* Popular Badge */}
37
+ <View
38
+ className="absolute right-6 top-0 z-10 rounded-b-2xl px-4 py-2"
39
+ style={{ backgroundColor: theme.colors.primary }}
40
+ >
41
+ <Text
42
+ className="text-xs font-bold"
43
+ style={{ color: theme.colors.primaryForeground }}
44
+ >
45
+ {translate('paywall.product_card.badge')}
46
+ </Text>
47
+ </View>
48
+
49
+ <View className="p-6 pt-8">
50
+ {/* Header */}
51
+ <View className="mb-6 items-center">
52
+ <View
53
+ className="mb-4 size-20 items-center justify-center rounded-full"
54
+ style={{
55
+ backgroundColor: `${primaryColor}20`,
56
+ borderWidth: 3,
57
+ borderColor: `${primaryColor}30`,
58
+ }}
59
+ >
60
+ <Text className="text-3xl">💎</Text>
61
+ </View>
62
+
63
+ <Text
64
+ className="mb-2 text-xl font-bold"
65
+ style={{ color: theme.colors.foreground }}
66
+ >
67
+ {translate('paywall.product_card.title')}
68
+ </Text>
69
+
70
+ <Text className="text-3xl font-black" style={{ color: primaryColor }}>
71
+ {offering.priceString}
72
+ </Text>
73
+ </View>
74
+
75
+ {/* Features */}
76
+ <View className="mb-6 space-y-3">
77
+ <View className="flex-row items-center">
78
+ <Text className="mr-2 text-base">✨</Text>
79
+ <Text
80
+ className="text-base"
81
+ style={{ color: theme.colors.mutedForeground }}
82
+ >
83
+ {translate('paywall.product_card.features.ai_generations')}
84
+ </Text>
85
+ </View>
86
+ <View className="flex-row items-center">
87
+ <Text className="mr-2 text-base">🚀</Text>
88
+ <Text
89
+ className="text-base"
90
+ style={{ color: theme.colors.mutedForeground }}
91
+ >
92
+ {translate('paywall.product_card.features.priority_processing')}
93
+ </Text>
94
+ </View>
95
+ <View className="flex-row items-center">
96
+ <Text className="mr-2 text-base">💫</Text>
97
+ <Text
98
+ className="text-base"
99
+ style={{ color: theme.colors.mutedForeground }}
100
+ >
101
+ {translate('paywall.product_card.features.advanced_models')}
102
+ </Text>
103
+ </View>
104
+ </View>
105
+
106
+ {/* Purchase Button */}
107
+ <Pressable
108
+ onPress={() => onPurchase(offering.id)}
109
+ disabled={isLoading}
110
+ className="items-center justify-center rounded-2xl py-4"
111
+ style={{
112
+ backgroundColor: primaryColor,
113
+ opacity: isLoading ? 0.7 : 1,
114
+ }}
115
+ >
116
+ {isLoading ? (
117
+ <ActivityIndicator
118
+ size="small"
119
+ color={theme.colors.primaryForeground}
120
+ />
121
+ ) : (
122
+ <Text
123
+ className="text-lg font-bold"
124
+ style={{ color: theme.colors.primaryForeground }}
125
+ >
126
+ {translate('paywall.product_card.cta')}
127
+ </Text>
128
+ )}
129
+ </Pressable>
130
+ </View>
131
+ </View>
132
+ );
133
+ };
@@ -0,0 +1,146 @@
1
+ import type React from 'react';
2
+ import { ActivityIndicator, Pressable, Text, View } from 'react-native';
3
+
4
+ import { translate } from '@/lib';
5
+ import { useThemeConfig } from '@/lib/use-theme-config';
6
+
7
+ type PaywallRemoteModeProps = {
8
+ onPresentPaywall: () => void;
9
+ isPurchasing: boolean;
10
+ };
11
+
12
+ export const PaywallRemoteMode: React.FC<PaywallRemoteModeProps> = ({
13
+ onPresentPaywall,
14
+ isPurchasing,
15
+ }) => {
16
+ const theme = useThemeConfig();
17
+
18
+ return (
19
+ <View className="flex-1 px-4">
20
+ <View className="mb-8 items-center">
21
+ <View
22
+ className="mb-6 size-32 items-center justify-center rounded-full"
23
+ style={{
24
+ backgroundColor: `${theme.colors.primary}10`,
25
+ borderWidth: 3,
26
+ borderColor: theme.colors.primary,
27
+ }}
28
+ >
29
+ <Text className="text-6xl">🎨</Text>
30
+ </View>
31
+ <Text
32
+ className="mb-4 text-center text-3xl font-bold"
33
+ style={{ color: theme.colors.foreground }}
34
+ >
35
+ {translate('paywall.remote.hero_title')}
36
+ </Text>
37
+ <Text
38
+ className="mb-8 text-center text-lg leading-6"
39
+ style={{ color: theme.colors.mutedForeground }}
40
+ >
41
+ {translate('paywall.remote.hero_subtitle')}
42
+ </Text>
43
+ </View>
44
+
45
+ <View
46
+ className="mb-6 rounded-3xl p-8"
47
+ style={{
48
+ backgroundColor: theme.colors.card,
49
+ shadowColor: theme.colors.primary,
50
+ shadowOffset: { width: 0, height: 20 },
51
+ shadowOpacity: 0.1,
52
+ shadowRadius: 30,
53
+ elevation: 8,
54
+ }}
55
+ >
56
+ <View className="mb-6 items-center">
57
+ <Text
58
+ className="mb-2 text-xl font-semibold"
59
+ style={{ color: theme.colors.foreground }}
60
+ >
61
+ {translate('paywall.remote.features_title')}
62
+ </Text>
63
+ <View
64
+ className="h-1 w-16 rounded-full"
65
+ style={{ backgroundColor: theme.colors.primary }}
66
+ />
67
+ </View>
68
+
69
+ <View className="gap-y-4">
70
+ <View className="flex-row items-center">
71
+ <View
72
+ className="mr-3 size-8 items-center justify-center rounded-full"
73
+ style={{ backgroundColor: `${theme.colors.success}20` }}
74
+ >
75
+ <Text className="text-sm">🎨</Text>
76
+ </View>
77
+ <Text style={{ color: theme.colors.mutedForeground }}>
78
+ {translate('paywall.remote.features.native_ui')}
79
+ </Text>
80
+ </View>
81
+ <View className="flex-row items-center">
82
+ <View
83
+ className="mr-3 size-8 items-center justify-center rounded-full"
84
+ style={{ backgroundColor: `${theme.colors.success}20` }}
85
+ >
86
+ <Text className="text-sm">🔄</Text>
87
+ </View>
88
+ <Text style={{ color: theme.colors.mutedForeground }}>
89
+ {translate('paywall.remote.features.realtime_updates')}
90
+ </Text>
91
+ </View>
92
+ <View className="flex-row items-center">
93
+ <View
94
+ className="mr-3 size-8 items-center justify-center rounded-full"
95
+ style={{ backgroundColor: `${theme.colors.success}20` }}
96
+ >
97
+ <Text className="text-sm">📱</Text>
98
+ </View>
99
+ <Text style={{ color: theme.colors.mutedForeground }}>
100
+ {translate('paywall.remote.features.mobile_optimized')}
101
+ </Text>
102
+ </View>
103
+ </View>
104
+ </View>
105
+
106
+ <Pressable
107
+ onPress={onPresentPaywall}
108
+ disabled={isPurchasing}
109
+ className="mb-4 items-center justify-center rounded-3xl py-6"
110
+ style={{
111
+ backgroundColor: isPurchasing
112
+ ? theme.colors.muted
113
+ : theme.colors.primary,
114
+ opacity: isPurchasing ? 0.6 : 1,
115
+ shadowColor: theme.colors.primary,
116
+ shadowOffset: { width: 0, height: 8 },
117
+ shadowOpacity: 0.3,
118
+ shadowRadius: 16,
119
+ elevation: 8,
120
+ }}
121
+ >
122
+ {isPurchasing ? (
123
+ <View className="flex-row items-center">
124
+ <ActivityIndicator
125
+ size="small"
126
+ color={theme.colors.primaryForeground}
127
+ />
128
+ <Text
129
+ className="ml-3 text-lg font-bold"
130
+ style={{ color: theme.colors.primaryForeground }}
131
+ >
132
+ {translate('common.loading')}
133
+ </Text>
134
+ </View>
135
+ ) : (
136
+ <Text
137
+ className="text-xl font-bold"
138
+ style={{ color: theme.colors.primaryForeground }}
139
+ >
140
+ {translate('paywall.remote.cta')}
141
+ </Text>
142
+ )}
143
+ </Pressable>
144
+ </View>
145
+ );
146
+ };
@@ -0,0 +1,63 @@
1
+ import { useEffect, useState } from 'react';
2
+
3
+ import { RevenueCatAdapter } from '@/features/payments/services/revenuecat-adapter';
4
+
5
+ /**
6
+ * Hook to check if a user has a specific entitlement
7
+ * @param entitlementId - The entitlement identifier to check
8
+ * @returns Object containing entitlement status, loading state, and any error
9
+ */
10
+ export const useEntitlement = (entitlementId: string) => {
11
+ const [isEntitled, setIsEntitled] = useState(false);
12
+ const [isLoading, setIsLoading] = useState(true);
13
+ const [error, setError] = useState<string | null>(null);
14
+
15
+ useEffect(() => {
16
+ let isMounted = true;
17
+
18
+ const checkEntitlement = async () => {
19
+ if (!entitlementId) {
20
+ if (!isMounted) return;
21
+ setIsEntitled(false);
22
+ setIsLoading(false);
23
+ return;
24
+ }
25
+
26
+ try {
27
+ if (!isMounted) return;
28
+ setIsLoading(true);
29
+ setError(null);
30
+
31
+ if (!RevenueCatAdapter.getIsInitialized()) {
32
+ await RevenueCatAdapter.initialize();
33
+ }
34
+
35
+ const paymentService = new RevenueCatAdapter();
36
+ const { isActive } =
37
+ await paymentService.getUserSubscriptionStatus(entitlementId);
38
+ if (!isMounted) return;
39
+ setIsEntitled(isActive);
40
+ } catch (e) {
41
+ if (!isMounted) return;
42
+ setIsEntitled(false); // Default to not entitled on error
43
+ setError(
44
+ e instanceof Error ? e.message : 'Failed to check entitlement',
45
+ );
46
+ } finally {
47
+ if (!isMounted) return;
48
+ setIsLoading(false);
49
+ }
50
+ };
51
+
52
+ checkEntitlement();
53
+
54
+ // Optional: Add listener for customer info updates from RevenueCat
55
+ // This would require implementing a listener mechanism in RevenueCatAdapter
56
+ // For now, we'll rely on component re-mounting or manual refresh
57
+ return () => {
58
+ isMounted = false;
59
+ };
60
+ }, [entitlementId]);
61
+
62
+ return { isEntitled, isLoading, error };
63
+ };
@@ -0,0 +1,8 @@
1
+ // Components
2
+ export { PaymentInitializer } from './components/payment-initializer';
3
+
4
+ // Hooks
5
+ export { useEntitlement } from './hooks/use-entitlement';
6
+
7
+ // Services
8
+ export { RevenueCatAdapter } from './services/revenuecat-adapter';