vibefast-cli 1.3.0 → 1.3.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.
- package/README.md +30 -95
- package/dist/__tests__/recipes.test.js +8 -9
- package/dist/__tests__/recipes.test.js.map +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +271 -125
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/checklist.d.ts.map +1 -1
- package/dist/commands/checklist.js +85 -44
- package/dist/commands/checklist.js.map +1 -1
- package/dist/commands/health.d.ts.map +1 -1
- package/dist/commands/health.js +13 -4
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +118 -26
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/migrate.d.ts +3 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +202 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +61 -3
- package/dist/commands/remove.js.map +1 -1
- package/dist/core/auth.d.ts.map +1 -1
- package/dist/core/auth.js +20 -18
- package/dist/core/auth.js.map +1 -1
- package/dist/core/codemod.d.ts +33 -0
- package/dist/core/codemod.d.ts.map +1 -1
- package/dist/core/codemod.js +116 -0
- package/dist/core/codemod.js.map +1 -1
- package/dist/core/detect.d.ts.map +1 -1
- package/dist/core/detect.js +24 -7
- package/dist/core/detect.js.map +1 -1
- package/dist/core/journal.d.ts +1 -0
- package/dist/core/journal.d.ts.map +1 -1
- package/dist/core/journal.js.map +1 -1
- package/dist/core/recipes.d.ts.map +1 -1
- package/dist/core/recipes.js +25 -7
- package/dist/core/recipes.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/docs/architecture.md +50 -0
- package/docs/commands.md +78 -0
- package/docs/contributing.md +27 -0
- package/docs/quickstart.md +50 -0
- package/docs/recipes.md +57 -0
- package/docs/troubleshooting.md +31 -0
- package/package.json +2 -2
- package/recipes/0/apps/native/src/components/advanced-ui/timeline/demo.tsx +445 -0
- package/recipes/0/apps/native/src/components/advanced-ui/timeline/timeline-view.tsx +355 -0
- package/recipes/0/apps/native/src/components/advanced-ui/timeline/types.ts +31 -0
- package/recipes/0/recipe.json +18 -0
- package/recipes/animated-chip/apps/native/src/components/advanced-ui/chip/demo.tsx +2 -1
- package/recipes/animated-chip/recipe.json +5 -2
- package/recipes/animated-chip-native@latest.zip +0 -0
- package/recipes/animated-chip@latest.zip +0 -0
- package/recipes/animated-switch/apps/native/src/components/advanced-ui/switch/demo.tsx +1 -1
- package/recipes/animated-switch/recipe.json +5 -2
- package/recipes/animated-switch-native@latest.zip +0 -0
- package/recipes/animated-switch@latest.zip +0 -0
- package/recipes/audio-recorder/apps/native/src/features/audio-recorder/components/audio-recorder.tsx +2 -1
- package/recipes/audio-recorder/apps/native/src/features/audio-recorder/demo/with-recording-list-demo.tsx +2 -2
- package/recipes/audio-recorder/recipe.json +7 -2
- package/recipes/audio-recorder-native@latest.zip +0 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/audio-recorder.tsx +2 -1
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/with-recording-list-demo.tsx +2 -1
- package/recipes/audio-recorder-supabase/recipe.json +12 -33
- package/recipes/audio-recorder-supabase-native@latest.zip +0 -0
- package/recipes/audio-recorder-supabase@latest.zip +0 -0
- package/recipes/audio-recorder@latest.zip +0 -0
- package/recipes/charts/apps/native/src/app/charts/index.tsx +3 -0
- package/recipes/charts/apps/native/src/features/charts/components/bar-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/candlestick-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/column-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/doughnut-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/line-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/radar-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/stacked-bar-chart.tsx +3 -1
- package/recipes/charts/recipe.json +13 -4
- package/recipes/charts-native@latest.zip +0 -0
- package/recipes/charts@latest.zip +0 -0
- package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-markdown.tsx +86 -86
- package/recipes/chatbot/apps/native/src/features/chatbot/components/markdown/code-block.tsx +4 -4
- package/recipes/chatbot/recipe.json +3 -40
- package/recipes/chatbot-native@latest.zip +0 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-markdown.tsx +4 -1
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/markdown/code-block.tsx +86 -53
- package/recipes/chatbot-supabase/recipe.json +3 -69
- package/recipes/chatbot-supabase-native@latest.zip +0 -0
- package/recipes/chatbot-supabase@latest.zip +0 -0
- package/recipes/chatbot@latest.zip +0 -0
- package/recipes/glowing-button/recipe.json +6 -2
- package/recipes/glowing-button-native@latest.zip +0 -0
- package/recipes/glowing-button@latest.zip +0 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/_layout.tsx +5 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/analysis-options.tsx +50 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/camera.tsx +2 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/index.tsx +50 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/loading.tsx +50 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/results.tsx +2 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/trait-details.tsx +3 -0
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/analysis-options-screen.tsx +2 -2
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/camera.tsx +72 -65
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/image-capture-screen.tsx +65 -47
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/loading-screen.tsx +43 -2
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/loading.tsx +34 -1
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/hooks/use-image-analysis.ts +83 -2
- package/recipes/image-analysis/recipe.json +11 -19
- package/recipes/image-analysis-native@latest.zip +0 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/_layout.tsx +5 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/analysis-options.tsx +50 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/camera.tsx +2 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/index.tsx +50 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/loading.tsx +50 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/results.tsx +2 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/trait-details.tsx +3 -0
- package/recipes/image-analysis-supabase/recipe.json +10 -70
- package/recipes/image-analysis-supabase-native@latest.zip +0 -0
- package/recipes/image-analysis-supabase@latest.zip +0 -0
- package/recipes/image-analysis@latest.zip +0 -0
- package/recipes/image-analyzer/apps/native/src/app/(root)/(protected)/image-analyzer/index.tsx +2 -0
- package/recipes/image-generator/apps/native/src/app/image-generator/gallery.tsx +3 -0
- package/recipes/image-generator/apps/native/src/app/image-generator/index.tsx +3 -0
- package/recipes/image-generator/recipe.json +8 -18
- package/recipes/image-generator-native@latest.zip +0 -0
- package/recipes/image-generator-supabase/recipe.json +6 -62
- package/recipes/image-generator-supabase-native@latest.zip +0 -0
- package/recipes/image-generator-supabase@latest.zip +0 -0
- package/recipes/image-generator@latest.zip +0 -0
- package/recipes/ios-widget/recipe.json +18 -119
- package/recipes/ios-widget-native@latest.zip +0 -0
- package/recipes/ios-widget@latest.zip +0 -0
- package/recipes/number-stepper/apps/native/src/components/advanced-ui/stepper/demo.tsx +1 -1
- package/recipes/number-stepper/recipe.json +5 -2
- package/recipes/number-stepper-native@latest.zip +0 -0
- package/recipes/number-stepper@latest.zip +0 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/interactive-onboarding.tsx +11 -18
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/ai-tone-step.tsx +5 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/currency-step.tsx +9 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-ai-step.tsx +8 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-chatbot-step.tsx +6 -5
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-manual-step.tsx +4 -3
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-scan-step.tsx +6 -5
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/main-reason-step.tsx +5 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/notification-step.tsx +7 -6
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/overspend-step.tsx +5 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/personalizing-step.tsx +8 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/rating-step.tsx +6 -5
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/reminder-step.tsx +5 -6
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/safety-step.tsx +5 -4
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/struggle-step.tsx +5 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/welcome-step.tsx +7 -6
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/ui/onboarding-header.tsx +4 -3
- package/recipes/onboarding/recipe.json +9 -6
- package/recipes/onboarding-native@latest.zip +0 -0
- package/recipes/onboarding@latest.zip +0 -0
- package/recipes/payments/apps/native/src/app/paywall/index.tsx +74 -0
- package/recipes/payments/apps/native/src/app/paywall/local.tsx +25 -0
- package/recipes/payments/apps/native/src/app/paywall/remote.tsx +23 -0
- package/recipes/payments/packages/backend/convex/payments.ts +21 -3
- package/recipes/payments/recipe.json +14 -34
- package/recipes/payments-native@latest.zip +0 -0
- package/recipes/payments-supabase/apps/native/src/app/paywall/index.tsx +74 -0
- package/recipes/payments-supabase/apps/native/src/app/paywall/local.tsx +25 -0
- package/recipes/payments-supabase/apps/native/src/app/paywall/remote.tsx +23 -0
- package/recipes/payments-supabase/recipe.json +16 -44
- package/recipes/payments-supabase-native@latest.zip +0 -0
- package/recipes/payments-supabase@latest.zip +0 -0
- package/recipes/payments@latest.zip +0 -0
- package/recipes/posthog/apps/native/src/components/analytics/navigation-tracker.tsx +14 -0
- package/recipes/posthog/apps/native/src/lib/hooks/use-navigation-analytics.ts +44 -0
- package/recipes/posthog/apps/native/src/providers/posthog-provider.tsx +51 -0
- package/recipes/posthog/recipe.json +60 -0
- package/recipes/posthog-native@latest.zip +0 -0
- package/recipes/progress-circle/apps/native/src/components/advanced-ui/progress-bars/progress-circle-page.tsx +1 -1
- package/recipes/progress-circle/recipe.json +5 -2
- package/recipes/progress-circle-native@latest.zip +0 -0
- package/recipes/progress-circle@latest.zip +0 -0
- package/recipes/quiz/apps/native/src/app/quiz/index.tsx +47 -0
- package/recipes/quiz/recipe.json +9 -6
- package/recipes/quiz-native@latest.zip +0 -0
- package/recipes/quiz@latest.zip +0 -0
- package/recipes/screen-kits/apps/native/src/app/screen-kits/_layout.tsx +12 -0
- package/recipes/screen-kits/apps/native/src/app/screen-kits/index.tsx +114 -0
- package/recipes/screen-kits/apps/native/src/features/screen-kits/index.ts +1 -0
- package/recipes/screen-kits/apps/native/src/features/screen-kits/types.ts +28 -0
- package/recipes/screen-kits/recipe.json +26 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/_layout.tsx +12 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/home.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/index.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/lesson-complete.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/lesson-fail.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/lesson.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/skill-tree.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/components/duo-button.tsx +174 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/components/skill-button.tsx +186 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/components/xp-header.tsx +115 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/constants.ts +89 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/index.ts +3 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/screens/home-screen.tsx +225 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/screens/lesson-complete-screen.tsx +485 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/screens/lesson-fail-screen.tsx +105 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/screens/lesson-screen.tsx +384 -0
- package/recipes/screen-kits-duolingo/recipe.json +58 -0
- package/recipes/screen-kits-duolingo-native@latest.zip +0 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/_layout.tsx +45 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/asset-detail.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/notifications.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/receive.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/send.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/swap.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/wallet.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/components/ActionButtons.tsx +78 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/components/AssetRow.tsx +94 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/components/BalanceCard.tsx +118 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/constants.ts +85 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/asset-detail.tsx +378 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/notifications.tsx +210 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/receive-modal.tsx +317 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/send-modal.tsx +420 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/swap-modal.tsx +363 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/wallet-dashboard.tsx +281 -0
- package/recipes/screen-kits-finance/recipe.json +46 -0
- package/recipes/screen-kits-finance-native@latest.zip +0 -0
- package/recipes/screen-kits-fitness/apps/native/assets/sounds/timer-beep.wav +0 -0
- package/recipes/screen-kits-fitness/apps/native/src/app/screen-kits/fitness/_layout.tsx +10 -0
- package/recipes/screen-kits-fitness/apps/native/src/app/screen-kits/fitness/index.tsx +6 -0
- package/recipes/screen-kits-fitness/apps/native/src/app/screen-kits/fitness/timer.tsx +3 -0
- package/recipes/screen-kits-fitness/apps/native/src/app/screen-kits/fitness/workout.tsx +3 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/components/timer-components.tsx +500 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/components/timer-settings-modal.tsx +352 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/components/workout-card.tsx +105 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/constants.ts +189 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/hooks/use-timer.ts +307 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/index.ts +1 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/screens/timer-screen.tsx +278 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/screens/workout-dashboard.tsx +350 -0
- package/recipes/screen-kits-fitness/recipe.json +63 -0
- package/recipes/screen-kits-fitness-native@latest.zip +0 -0
- package/recipes/screen-kits-habits/apps/native/src/app/screen-kits/productivity/habits.tsx +1 -0
- package/recipes/screen-kits-habits/apps/native/src/app/screen-kits/productivity/kanban.tsx +1 -0
- package/recipes/screen-kits-habits/apps/native/src/app/screen-kits/productivity/routes.ts +4 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/AddTaskModal.tsx +246 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/DraggableTaskCard.tsx +92 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/KanbanColumn.tsx +238 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/TaskCard.tsx +144 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/add-habit-modal.tsx +271 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/constants.ts +295 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/kanban-utils.ts +62 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/screens/habit-tracker.tsx +1160 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/screens/kanban-board.tsx +432 -0
- package/recipes/screen-kits-habits/recipe.json +52 -0
- package/recipes/screen-kits-habits-native@latest.zip +0 -0
- package/recipes/screen-kits-native@latest.zip +0 -0
- package/recipes/sentry/apps/native/src/providers/sentry-provider.tsx +64 -0
- package/recipes/sentry/recipe.json +39 -0
- package/recipes/sentry-native@latest.zip +0 -0
- package/recipes/swipe-slider/apps/native/src/components/advanced-ui/sliders/swipe-slider-page.tsx +1 -1
- package/recipes/swipe-slider/recipe.json +5 -2
- package/recipes/swipe-slider-native@latest.zip +0 -0
- package/recipes/swipe-slider@latest.zip +0 -0
- package/recipes/timeline/apps/native/src/components/advanced-ui/timeline/demo.tsx +2 -1
- package/recipes/timeline/recipe.json +5 -2
- package/recipes/timeline-native@latest.zip +0 -0
- package/recipes/timeline@latest.zip +0 -0
- package/recipes/tracker-app/apps/native/src/app/tracker-app/index.tsx +1 -0
- package/recipes/tracker-app/recipe.json +10 -7
- package/recipes/tracker-app-native@latest.zip +0 -0
- package/recipes/tracker-app@latest.zip +0 -0
- package/recipes/upload-all.sh +8 -31
- package/recipes/voice-bot/apps/native/src/app/voice-bot/index.tsx +56 -0
- package/recipes/voice-bot/recipe.json +31 -7
- package/recipes/voice-bot-native@latest.zip +0 -0
- package/recipes/voice-bot@latest.zip +0 -0
- package/recipes/wake-word/apps/native/src/app/{(root)/(protected)/test-wake-word.tsx → test-wake-word.tsx} +43 -4
- package/recipes/wake-word/recipe.json +16 -26
- package/recipes/wake-word-native@latest.zip +0 -0
- package/recipes/wake-word@latest.zip +0 -0
- package/scripts/create-advanced-ui-recipes.sh +46 -19
- package/scripts/create-recipes.mjs +471 -117
- package/scripts/package-recipes.mjs +76 -0
- package/scripts/publish-all.sh +6 -2
- package/CHANGELOG.md +0 -198
- package/docs/archive/AUTO-DETECT-DEPS.md +0 -607
- package/docs/archive/FINAL-PACKAGE-STRATEGY.md +0 -583
- package/docs/archive/FINAL-SIMPLE-PLAN.md +0 -487
- package/docs/archive/FINAL-STATUS.md +0 -144
- package/docs/archive/FLOW-DIAGRAM.md +0 -1629
- package/docs/archive/GOTCHAS-AND-RISKS.md +0 -801
- package/docs/archive/IMPLEMENTATION-PLAN.md +0 -1360
- package/docs/archive/PLAN.md +0 -453
- package/docs/archive/PRODUCTION-READINESS.md +0 -684
- package/docs/archive/PRODUCTION-TEST-RESULTS.md +0 -465
- package/docs/archive/SIMPLIFIED-PLAN.md +0 -578
- package/docs/archive/STATUS.md +0 -199
- package/docs/archive/SUCCESS.md +0 -259
- package/docs/archive/TEST-SUMMARY.md +0 -261
- package/docs/archive/TESTING-CHECKLIST.md +0 -450
- package/docs/archive/USER-MODIFICATIONS.md +0 -448
- package/docs/decisions.md +0 -55
- package/docs/manual-testing.md +0 -91
- package/docs/next-steps.md +0 -12
- package/recipes/README.md +0 -156
- package/recipes/audio-recorder-supabase/packages/backend/src/services/recordings.ts +0 -369
- package/recipes/chatbot/apps/native/src/api-client/chatbot.ts +0 -83
- package/recipes/chatbot/packages/backend/convex/agents.ts +0 -115
- package/recipes/chatbot/packages/backend/convex/tools/index.ts +0 -18
- package/recipes/chatbot/packages/backend/convex/tools/knowledgeRetrieval.ts +0 -97
- package/recipes/chatbot/packages/backend/convex/tools/tavilySearch.ts +0 -83
- package/recipes/chatbot/packages/backend/convex/tools/userProfile.ts +0 -72
- package/recipes/chatbot-supabase/apps/native/src/api-client/supabase/chatbot.ts +0 -515
- package/recipes/chatbot-supabase/packages/backend/src/services/conversations.ts +0 -243
- package/recipes/chatbot-supabase/packages/backend/src/services/messages.ts +0 -327
- package/recipes/image-analysis/apps/native/src/api-client/image-analyzer.ts +0 -62
- package/recipes/image-analysis-supabase/packages/backend/src/services/image-analyses.ts +0 -132
- package/recipes/image-generator/apps/native/src/api-client/image-generator.ts +0 -34
- package/recipes/payments/apps/native/src/api-client/payments.ts +0 -44
- package/recipes/payments-supabase/packages/backend/src/services/payments.ts +0 -201
- package/recipes/posthog.json +0 -47
- package/recipes/revenuecat.json +0 -43
- package/recipes/sentry.json +0 -47
- package/recipes/wake-word/apps/native/assets/vosk-model/README.md +0 -103
- package/recipes/wake-word/apps/native/scripts/download-vosk-model.mjs +0 -127
- /package/recipes/{audio-recorder/apps/native/src/app/(root)/(protected) → audio-recorder-supabase/apps/native/src/app}/audio-recorder/index.tsx +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/AppIntent.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-20x20@1x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-20x20@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-20x20@3x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-29x29@1x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-29x29@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-29x29@3x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-40x40@1x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-40x40@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-40x40@3x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-60x60@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-60x60@3x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-76x76@1x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-76x76@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-83.5x83.5@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/CalorieTrackerWidget.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/HabitTrackerWidget.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Info.plist +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/WidgetLiveActivity.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/expo-target.config.js +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/generated.entitlements +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/index.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/widgets.swift +0 -0
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image Analyses Service
|
|
3
|
-
*
|
|
4
|
-
* Handles image analysis history operations including getUserImageAnalyses.
|
|
5
|
-
*
|
|
6
|
-
* Requirements: 7.5
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import type { SupabaseClientType } from '../lib/supabase';
|
|
10
|
-
import type { ImageAnalysis } from '../types';
|
|
11
|
-
|
|
12
|
-
export interface ListImageAnalysesResult {
|
|
13
|
-
success: boolean;
|
|
14
|
-
analyses?: ImageAnalysis[];
|
|
15
|
-
hasMore?: boolean;
|
|
16
|
-
error?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface GetImageAnalysisResult {
|
|
20
|
-
success: boolean;
|
|
21
|
-
analysis?: ImageAnalysis;
|
|
22
|
-
error?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const DEFAULT_PAGE_SIZE = 20;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Get user's image analysis history with pagination
|
|
29
|
-
*
|
|
30
|
-
* Returns analyses ordered by creation time (newest first).
|
|
31
|
-
*
|
|
32
|
-
* @param supabase - Supabase client (authenticated)
|
|
33
|
-
* @param options - Pagination options
|
|
34
|
-
* @returns Paginated list of image analyses
|
|
35
|
-
*
|
|
36
|
-
* Requirements: 7.5
|
|
37
|
-
*/
|
|
38
|
-
export async function getUserImageAnalyses(
|
|
39
|
-
supabase: SupabaseClientType,
|
|
40
|
-
options?: {
|
|
41
|
-
limit?: number;
|
|
42
|
-
cursor?: string; // created_at timestamp for cursor-based pagination
|
|
43
|
-
status?: 'processing' | 'completed' | 'failed';
|
|
44
|
-
}
|
|
45
|
-
): Promise<ListImageAnalysesResult> {
|
|
46
|
-
// Get the current auth user
|
|
47
|
-
const { data: authData, error: authError } = await supabase.auth.getUser();
|
|
48
|
-
|
|
49
|
-
if (authError || !authData.user) {
|
|
50
|
-
return { success: false, error: 'Not authenticated' };
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const limit = options?.limit || DEFAULT_PAGE_SIZE;
|
|
54
|
-
|
|
55
|
-
// Build query
|
|
56
|
-
let query = supabase
|
|
57
|
-
.from('image_analyses')
|
|
58
|
-
.select('*')
|
|
59
|
-
.eq('user_id', authData.user.id)
|
|
60
|
-
.order('created_at', { ascending: false })
|
|
61
|
-
.limit(limit + 1); // Fetch one extra to check if there are more
|
|
62
|
-
|
|
63
|
-
// Filter by status if provided
|
|
64
|
-
if (options?.status) {
|
|
65
|
-
query = query.eq('status', options.status);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Apply cursor if provided
|
|
69
|
-
if (options?.cursor) {
|
|
70
|
-
query = query.lt('created_at', options.cursor);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const { data: analyses, error: listError } = await query;
|
|
74
|
-
|
|
75
|
-
if (listError) {
|
|
76
|
-
return { success: false, error: `Failed to list image analyses: ${listError.message}` };
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// Check if there are more results
|
|
80
|
-
const hasMore = analyses && analyses.length > limit;
|
|
81
|
-
const resultAnalyses = hasMore ? analyses.slice(0, limit) : (analyses || []);
|
|
82
|
-
|
|
83
|
-
return {
|
|
84
|
-
success: true,
|
|
85
|
-
analyses: resultAnalyses,
|
|
86
|
-
hasMore,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Get a single image analysis by ID
|
|
92
|
-
*
|
|
93
|
-
* @param supabase - Supabase client (authenticated)
|
|
94
|
-
* @param analysisId - The ID of the analysis
|
|
95
|
-
* @returns The analysis or error
|
|
96
|
-
*/
|
|
97
|
-
export async function getImageAnalysisById(
|
|
98
|
-
supabase: SupabaseClientType,
|
|
99
|
-
analysisId: string
|
|
100
|
-
): Promise<GetImageAnalysisResult> {
|
|
101
|
-
// Get the current auth user
|
|
102
|
-
const { data: authData, error: authError } = await supabase.auth.getUser();
|
|
103
|
-
|
|
104
|
-
if (authError || !authData.user) {
|
|
105
|
-
return { success: false, error: 'Not authenticated' };
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
if (!analysisId) {
|
|
109
|
-
return { success: false, error: 'Analysis ID is required' };
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const { data: analysis, error: getError } = await supabase
|
|
113
|
-
.from('image_analyses')
|
|
114
|
-
.select('*')
|
|
115
|
-
.eq('id', analysisId)
|
|
116
|
-
.eq('user_id', authData.user.id)
|
|
117
|
-
.single();
|
|
118
|
-
|
|
119
|
-
if (getError) {
|
|
120
|
-
if (getError.code === 'PGRST116') {
|
|
121
|
-
return { success: false, error: 'Analysis not found' };
|
|
122
|
-
}
|
|
123
|
-
return { success: false, error: `Failed to get analysis: ${getError.message}` };
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
return { success: true, analysis };
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export const imageAnalysesService = {
|
|
130
|
-
getUserImageAnalyses,
|
|
131
|
-
getImageAnalysisById,
|
|
132
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { api } from '@vibefast/backend/_generated/api';
|
|
2
|
-
import { useAction } from 'convex/react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Image Generator API Gateway
|
|
6
|
-
*
|
|
7
|
-
* This gateway provides typed wrappers around Convex image generation functions.
|
|
8
|
-
* It handles AI-powered image generation backed by the AI SDK providers.
|
|
9
|
-
*
|
|
10
|
-
* Usage:
|
|
11
|
-
* - Import this gateway in feature code: `import { imageGeneratorApi } from '@/platform/api/image-generator'`
|
|
12
|
-
* - Never import from `@vibefast/backend/_generated/api` directly in feature code
|
|
13
|
-
*/
|
|
14
|
-
export const imageGeneratorApi = {
|
|
15
|
-
/**
|
|
16
|
-
* Generate an image based on user prompt and provider selection
|
|
17
|
-
*
|
|
18
|
-
* @returns Promise with image data URI, mime type, and metadata
|
|
19
|
-
*/
|
|
20
|
-
useGenerateImage() {
|
|
21
|
-
const action = useAction(api['imageGeneration/index'].generateImageAction);
|
|
22
|
-
|
|
23
|
-
return (args: GenerateImageArgs) =>
|
|
24
|
-
action(args as Parameters<typeof action>[0]);
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export type ImageGeneratorApi = typeof imageGeneratorApi;
|
|
29
|
-
|
|
30
|
-
export type GenerateImageArgs = {
|
|
31
|
-
prompt: string;
|
|
32
|
-
provider: string;
|
|
33
|
-
model: string;
|
|
34
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { api } from '@vibefast/backend/_generated/api';
|
|
2
|
-
import { useMutation, useQuery } from 'convex/react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Payments API Gateway
|
|
6
|
-
*
|
|
7
|
-
* This gateway provides typed wrappers around Convex payment functions.
|
|
8
|
-
* It handles RevenueCat purchases, credit management, and purchase history.
|
|
9
|
-
*
|
|
10
|
-
* Usage:
|
|
11
|
-
* - Import this gateway in feature code: `import { paymentsApi } from '@/platform/api/payments'`
|
|
12
|
-
* - Never import from `@vibefast/backend/_generated/api` directly in feature code
|
|
13
|
-
*/
|
|
14
|
-
export const paymentsApi = {
|
|
15
|
-
/**
|
|
16
|
-
* Record a consumable purchase (like credits) in the database
|
|
17
|
-
*/
|
|
18
|
-
useRecordConsumablePurchase() {
|
|
19
|
-
return useMutation(api['payments/index'].recordConsumablePurchase);
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Get user's current credit balance
|
|
24
|
-
*/
|
|
25
|
-
useGetUserCredits() {
|
|
26
|
-
return useQuery(api['payments/index'].getUserCredits);
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Get user's purchase history with pagination
|
|
31
|
-
*/
|
|
32
|
-
useGetPurchaseHistory(
|
|
33
|
-
paginationOpts: { numItems: number; cursor: string | null } = {
|
|
34
|
-
numItems: 50,
|
|
35
|
-
cursor: null,
|
|
36
|
-
},
|
|
37
|
-
) {
|
|
38
|
-
return useQuery(api['payments/index'].getPurchaseHistory, {
|
|
39
|
-
paginationOpts,
|
|
40
|
-
});
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export type PaymentsApi = typeof paymentsApi;
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Payments Service
|
|
3
|
-
*
|
|
4
|
-
* Handles credit purchases and purchase history operations.
|
|
5
|
-
* Uses the record_purchase database function for atomic credit updates.
|
|
6
|
-
*
|
|
7
|
-
* Requirements: 9.1, 9.2
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import type { SupabaseClientType } from '../lib/supabase';
|
|
11
|
-
import type { Purchase } from '../types';
|
|
12
|
-
|
|
13
|
-
export interface RecordPurchaseInput {
|
|
14
|
-
productId: string;
|
|
15
|
-
quantity: number;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface RecordPurchaseResult {
|
|
19
|
-
success: boolean;
|
|
20
|
-
purchase?: Purchase;
|
|
21
|
-
creditsAdded?: number;
|
|
22
|
-
newBalance?: number;
|
|
23
|
-
error?: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface GetPurchaseHistoryResult {
|
|
27
|
-
success: boolean;
|
|
28
|
-
purchases?: Purchase[];
|
|
29
|
-
hasMore?: boolean;
|
|
30
|
-
error?: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Record a consumable purchase and add credits to the user
|
|
35
|
-
*
|
|
36
|
-
* Premium products (containing 'premium' in product_id) receive 2x credits.
|
|
37
|
-
* Uses the record_purchase database function for atomic operations.
|
|
38
|
-
*
|
|
39
|
-
* @param supabase - Supabase client (authenticated)
|
|
40
|
-
* @param input - Purchase details (productId, quantity)
|
|
41
|
-
* @returns The purchase record and updated credit balance
|
|
42
|
-
*
|
|
43
|
-
* Requirements: 9.1
|
|
44
|
-
*/
|
|
45
|
-
export async function recordConsumablePurchase(
|
|
46
|
-
supabase: SupabaseClientType,
|
|
47
|
-
input: RecordPurchaseInput
|
|
48
|
-
): Promise<RecordPurchaseResult> {
|
|
49
|
-
// Get the current auth user
|
|
50
|
-
const { data: authData, error: authError } = await supabase.auth.getUser();
|
|
51
|
-
|
|
52
|
-
if (authError || !authData.user) {
|
|
53
|
-
return { success: false, error: 'Not authenticated' };
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const { productId, quantity } = input;
|
|
57
|
-
|
|
58
|
-
// Validate input
|
|
59
|
-
if (!productId || productId.trim() === '') {
|
|
60
|
-
return { success: false, error: 'Product ID is required' };
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (!quantity || quantity < 1) {
|
|
64
|
-
return { success: false, error: 'Quantity must be at least 1' };
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Call the record_purchase database function for atomic operation
|
|
68
|
-
const { data, error } = await supabase.rpc('record_purchase', {
|
|
69
|
-
p_user_id: authData.user.id,
|
|
70
|
-
p_product_id: productId,
|
|
71
|
-
p_quantity: quantity,
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
if (error) {
|
|
75
|
-
return { success: false, error: `Failed to record purchase: ${error.message}` };
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// The function returns an array with one row
|
|
79
|
-
const result = Array.isArray(data) ? data[0] : data;
|
|
80
|
-
|
|
81
|
-
if (!result) {
|
|
82
|
-
return { success: false, error: 'Failed to record purchase: no result returned' };
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Fetch the created purchase record
|
|
86
|
-
const { data: purchase, error: fetchError } = await supabase
|
|
87
|
-
.from('purchases')
|
|
88
|
-
.select('*')
|
|
89
|
-
.eq('id', result.purchase_id)
|
|
90
|
-
.single();
|
|
91
|
-
|
|
92
|
-
if (fetchError || !purchase) {
|
|
93
|
-
// Purchase was recorded but we couldn't fetch it - still return success
|
|
94
|
-
return {
|
|
95
|
-
success: true,
|
|
96
|
-
creditsAdded: result.credits_added,
|
|
97
|
-
newBalance: result.new_balance,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return {
|
|
102
|
-
success: true,
|
|
103
|
-
purchase,
|
|
104
|
-
creditsAdded: result.credits_added,
|
|
105
|
-
newBalance: result.new_balance,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Get purchase history for the current user
|
|
112
|
-
*
|
|
113
|
-
* Returns purchases ordered by date descending (newest first) with pagination.
|
|
114
|
-
*
|
|
115
|
-
* @param supabase - Supabase client (authenticated)
|
|
116
|
-
* @param options - Pagination options
|
|
117
|
-
* @returns List of purchases with pagination info
|
|
118
|
-
*
|
|
119
|
-
* Requirements: 9.2
|
|
120
|
-
*/
|
|
121
|
-
export async function getPurchaseHistory(
|
|
122
|
-
supabase: SupabaseClientType,
|
|
123
|
-
options: {
|
|
124
|
-
limit?: number;
|
|
125
|
-
offset?: number;
|
|
126
|
-
} = {}
|
|
127
|
-
): Promise<GetPurchaseHistoryResult> {
|
|
128
|
-
// Get the current auth user
|
|
129
|
-
const { data: authData, error: authError } = await supabase.auth.getUser();
|
|
130
|
-
|
|
131
|
-
if (authError || !authData.user) {
|
|
132
|
-
return { success: false, error: 'Not authenticated' };
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
const { limit = 20, offset = 0 } = options;
|
|
136
|
-
|
|
137
|
-
// Fetch purchases with pagination
|
|
138
|
-
const { data: purchases, error: listError, count } = await supabase
|
|
139
|
-
.from('purchases')
|
|
140
|
-
.select('*', { count: 'exact' })
|
|
141
|
-
.eq('user_id', authData.user.id)
|
|
142
|
-
.order('purchase_date', { ascending: false })
|
|
143
|
-
.range(offset, offset + limit - 1);
|
|
144
|
-
|
|
145
|
-
if (listError) {
|
|
146
|
-
return { success: false, error: `Failed to get purchase history: ${listError.message}` };
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
const hasMore = count !== null && offset + (purchases?.length || 0) < count;
|
|
150
|
-
|
|
151
|
-
return {
|
|
152
|
-
success: true,
|
|
153
|
-
purchases: purchases || [],
|
|
154
|
-
hasMore,
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Get a single purchase by ID
|
|
160
|
-
*
|
|
161
|
-
* @param supabase - Supabase client (authenticated)
|
|
162
|
-
* @param purchaseId - The ID of the purchase
|
|
163
|
-
* @returns The purchase record or error
|
|
164
|
-
*/
|
|
165
|
-
export async function getPurchaseById(
|
|
166
|
-
supabase: SupabaseClientType,
|
|
167
|
-
purchaseId: string
|
|
168
|
-
): Promise<{ success: boolean; purchase?: Purchase; error?: string }> {
|
|
169
|
-
// Get the current auth user
|
|
170
|
-
const { data: authData, error: authError } = await supabase.auth.getUser();
|
|
171
|
-
|
|
172
|
-
if (authError || !authData.user) {
|
|
173
|
-
return { success: false, error: 'Not authenticated' };
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
if (!purchaseId) {
|
|
177
|
-
return { success: false, error: 'Purchase ID is required' };
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
const { data: purchase, error: getError } = await supabase
|
|
181
|
-
.from('purchases')
|
|
182
|
-
.select('*')
|
|
183
|
-
.eq('id', purchaseId)
|
|
184
|
-
.eq('user_id', authData.user.id)
|
|
185
|
-
.single();
|
|
186
|
-
|
|
187
|
-
if (getError) {
|
|
188
|
-
if (getError.code === 'PGRST116') {
|
|
189
|
-
return { success: false, error: 'Purchase not found' };
|
|
190
|
-
}
|
|
191
|
-
return { success: false, error: `Failed to get purchase: ${getError.message}` };
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
return { success: true, purchase };
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export const paymentsService = {
|
|
198
|
-
recordConsumablePurchase,
|
|
199
|
-
getPurchaseHistory,
|
|
200
|
-
getPurchaseById,
|
|
201
|
-
};
|
package/recipes/posthog.json
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "posthog",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Product analytics and feature flags (already integrated in VibeFast)",
|
|
5
|
-
"target": "service",
|
|
6
|
-
"manualSteps": [
|
|
7
|
-
{
|
|
8
|
-
"title": "Create PostHog Project",
|
|
9
|
-
"description": "Sign up at posthog.com and create a new project",
|
|
10
|
-
"link": "https://posthog.com/signup"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"title": "Get Your API Key",
|
|
14
|
-
"description": "Copy your project API key from PostHog settings",
|
|
15
|
-
"link": "https://app.posthog.com/project/settings"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"title": "Add API Key to Environment Files",
|
|
19
|
-
"description": "Add POSTHOG_API_KEY to all your .env files",
|
|
20
|
-
"file": "apps/native/.env.local",
|
|
21
|
-
"content": "POSTHOG_API_KEY=phc_your_api_key_here"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"title": "Restart Development Server",
|
|
25
|
-
"description": "Restart your Expo dev server to load the new environment variable",
|
|
26
|
-
"content": "pnpm dev:native"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"title": "Verify Analytics",
|
|
30
|
-
"description": "PostHog is already integrated via core/analytics. Check your PostHog dashboard for events",
|
|
31
|
-
"link": "https://app.posthog.com/events"
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"env": [
|
|
35
|
-
{
|
|
36
|
-
"key": "POSTHOG_API_KEY",
|
|
37
|
-
"description": "PostHog project API key - get from your PostHog project settings",
|
|
38
|
-
"example": "phc_abc123def456ghi789",
|
|
39
|
-
"required": true,
|
|
40
|
-
"link": "https://app.posthog.com/project/settings",
|
|
41
|
-
"file": "apps/native/.env.local"
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
"postInstall": {
|
|
45
|
-
"message": "✅ PostHog is already integrated! Just add your API key to .env files"
|
|
46
|
-
}
|
|
47
|
-
}
|
package/recipes/revenuecat.json
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "revenuecat",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "In-app purchases and subscriptions (already integrated in VibeFast)",
|
|
5
|
-
"target": "service",
|
|
6
|
-
"manualSteps": [
|
|
7
|
-
{
|
|
8
|
-
"title": "Create RevenueCat Project",
|
|
9
|
-
"description": "Sign up at revenuecat.com and create a new project",
|
|
10
|
-
"link": "https://app.revenuecat.com/signup"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"title": "Configure App Stores",
|
|
14
|
-
"description": "Link your iOS (App Store Connect) and Android (Google Play) apps to RevenueCat",
|
|
15
|
-
"link": "https://www.revenuecat.com/docs/getting-started"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"title": "Get API Keys",
|
|
19
|
-
"description": "Copy your public API keys (iOS and Android) from RevenueCat settings",
|
|
20
|
-
"link": "https://app.revenuecat.com/settings/api-keys"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"title": "Update Payment Service",
|
|
24
|
-
"description": "Replace mock API keys in payment-service.ts with your real keys",
|
|
25
|
-
"file": "apps/native/src/features/payments/services/payment-service.ts",
|
|
26
|
-
"content": "// Find and replace:\nconst REVENUECAT_API_KEY_IOS = 'your_actual_ios_key';\nconst REVENUECAT_API_KEY_ANDROID = 'your_actual_android_key';"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"title": "Create Products & Entitlements",
|
|
30
|
-
"description": "Set up your subscription products and entitlements in RevenueCat dashboard",
|
|
31
|
-
"link": "https://www.revenuecat.com/docs/entitlements"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"title": "Test Purchases",
|
|
35
|
-
"description": "Use sandbox accounts to test purchases. RevenueCat integration is already complete in VibeFast",
|
|
36
|
-
"link": "https://www.revenuecat.com/docs/test-and-launch"
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
"env": [],
|
|
40
|
-
"postInstall": {
|
|
41
|
-
"message": "✅ RevenueCat is already integrated! Just update API keys in payment-service.ts"
|
|
42
|
-
}
|
|
43
|
-
}
|
package/recipes/sentry.json
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "sentry",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Error tracking and performance monitoring (already integrated in VibeFast)",
|
|
5
|
-
"target": "service",
|
|
6
|
-
"manualSteps": [
|
|
7
|
-
{
|
|
8
|
-
"title": "Create Sentry Project",
|
|
9
|
-
"description": "Sign up at sentry.io and create a React Native project",
|
|
10
|
-
"link": "https://sentry.io/signup/"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"title": "Get Your DSN",
|
|
14
|
-
"description": "Copy your project's DSN from Sentry dashboard",
|
|
15
|
-
"link": "https://sentry.io/settings/projects/"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"title": "Add DSN to Environment Files",
|
|
19
|
-
"description": "Add SENTRY_DSN to all your .env files",
|
|
20
|
-
"file": "apps/native/.env.local",
|
|
21
|
-
"content": "SENTRY_DSN=https://your-key@o0.ingest.sentry.io/your-project-id"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"title": "Restart Development Server",
|
|
25
|
-
"description": "Restart your Expo dev server to load the new environment variable",
|
|
26
|
-
"content": "pnpm dev:native"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"title": "Test Error Tracking",
|
|
30
|
-
"description": "Sentry is already initialized in your app. Trigger a test error to verify it's working",
|
|
31
|
-
"link": "https://docs.sentry.io/platforms/react-native/usage/"
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"env": [
|
|
35
|
-
{
|
|
36
|
-
"key": "SENTRY_DSN",
|
|
37
|
-
"description": "Sentry Data Source Name - get from your Sentry project settings",
|
|
38
|
-
"example": "https://abc123@o0.ingest.sentry.io/123456",
|
|
39
|
-
"required": true,
|
|
40
|
-
"link": "https://sentry.io/settings/projects/",
|
|
41
|
-
"file": "apps/native/.env.local"
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
"postInstall": {
|
|
45
|
-
"message": "✅ Sentry is already integrated! Just add your DSN to .env files"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
# Vosk Model for Wake Word Detection
|
|
2
|
-
|
|
3
|
-
This directory contains the Vosk speech recognition model for on-device wake word detection.
|
|
4
|
-
|
|
5
|
-
## Required Model
|
|
6
|
-
|
|
7
|
-
You need to download and place a Vosk model here.
|
|
8
|
-
|
|
9
|
-
### Recommended Model
|
|
10
|
-
|
|
11
|
-
**vosk-model-small-en-us-0.15** (~40 MB)
|
|
12
|
-
|
|
13
|
-
- Optimized for mobile devices
|
|
14
|
-
- Good accuracy for wake word detection
|
|
15
|
-
- Low memory footprint
|
|
16
|
-
|
|
17
|
-
## How to Download
|
|
18
|
-
|
|
19
|
-
### Automated (Recommended)
|
|
20
|
-
|
|
21
|
-
Run this command from the project root:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
pnpm setup:vosk
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
This will automatically download, extract, and configure the model.
|
|
28
|
-
|
|
29
|
-
### Manual Setup
|
|
30
|
-
|
|
31
|
-
1. Go to [Vosk Models Page](https://alphacephei.com/vosk/models)
|
|
32
|
-
2. Download `vosk-model-small-en-us-0.15.zip`
|
|
33
|
-
3. Extract the ZIP file
|
|
34
|
-
4. Rename the extracted folder to `model-en-us`
|
|
35
|
-
5. Place the entire folder in this directory
|
|
36
|
-
|
|
37
|
-
## Directory Structure
|
|
38
|
-
|
|
39
|
-
After setup, you should have:
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
assets/vosk-model/
|
|
43
|
-
└── vosk-model-small-en-us-0.15/
|
|
44
|
-
├── am/
|
|
45
|
-
├── conf/
|
|
46
|
-
├── graph/
|
|
47
|
-
├── ivector/
|
|
48
|
-
└── README
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Important Notes
|
|
52
|
-
|
|
53
|
-
- **Do NOT commit the model** to git (it's in .gitignore)
|
|
54
|
-
- Each developer needs to download their own model
|
|
55
|
-
- The model is ~40 MB uncompressed
|
|
56
|
-
- Model works offline (no internet required)
|
|
57
|
-
- Model is free and open source
|
|
58
|
-
|
|
59
|
-
## Alternative Models
|
|
60
|
-
|
|
61
|
-
If you need a different language or size:
|
|
62
|
-
|
|
63
|
-
- **Smaller** (~10 MB): `vosk-model-small-en-us-0.15` (less accurate)
|
|
64
|
-
- **Larger** (~1.8 GB): `vosk-model-en-us-0.22` (more accurate, not recommended for mobile)
|
|
65
|
-
- **Other languages**: See [Vosk Models](https://alphacephei.com/vosk/models)
|
|
66
|
-
|
|
67
|
-
## Configuration
|
|
68
|
-
|
|
69
|
-
The model path is configured in `app.config.ts`:
|
|
70
|
-
|
|
71
|
-
```typescript
|
|
72
|
-
[
|
|
73
|
-
'react-native-vosk',
|
|
74
|
-
{
|
|
75
|
-
models: ['assets/vosk-model'],
|
|
76
|
-
iOSMicrophonePermission:
|
|
77
|
-
'We use the mic for on-device wake-phrase detection.',
|
|
78
|
-
},
|
|
79
|
-
];
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## No API Key Required
|
|
83
|
-
|
|
84
|
-
Unlike Picovoice, Vosk is completely free and open source. No API key or account needed!
|
|
85
|
-
|
|
86
|
-
## Troubleshooting
|
|
87
|
-
|
|
88
|
-
### Model not found error
|
|
89
|
-
|
|
90
|
-
- Verify the model folder exists in `assets/vosk-model/`
|
|
91
|
-
- Check the folder name matches what's in `app.config.ts`
|
|
92
|
-
- Run `pnpm prebuild` after adding the model
|
|
93
|
-
|
|
94
|
-
### Build size too large
|
|
95
|
-
|
|
96
|
-
- Use the "small" model variant
|
|
97
|
-
- Ensure you're not including multiple models
|
|
98
|
-
|
|
99
|
-
### Recognition not working
|
|
100
|
-
|
|
101
|
-
- Verify model is for English (if using English wake words)
|
|
102
|
-
- Check microphone permissions are granted
|
|
103
|
-
- Test with clear speech at normal volume
|