vibefast-cli 1.1.3 → 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.
- package/CHANGELOG.md +32 -0
- package/README.md +63 -169
- package/dist/__tests__/recipes.test.js +25 -3
- package/dist/__tests__/recipes.test.js.map +1 -1
- package/dist/commands/add.d.ts +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +547 -543
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/checklist.d.ts +1 -1
- package/dist/commands/checklist.d.ts.map +1 -1
- package/dist/commands/checklist.js +40 -39
- package/dist/commands/checklist.js.map +1 -1
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.js +22 -22
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/env.d.ts +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +58 -53
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/health.d.ts +1 -1
- package/dist/commands/health.d.ts.map +1 -1
- package/dist/commands/health.js +101 -93
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +416 -296
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/remove.d.ts +1 -1
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +77 -64
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/status.d.ts +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +15 -14
- package/dist/commands/status.js.map +1 -1
- package/dist/core/__tests__/detect.test.js +68 -34
- package/dist/core/__tests__/detect.test.js.map +1 -1
- package/dist/core/ast.d.ts +14 -0
- package/dist/core/ast.d.ts.map +1 -0
- package/dist/core/ast.js +239 -0
- package/dist/core/ast.js.map +1 -0
- package/dist/core/codemod.d.ts.map +1 -1
- package/dist/core/codemod.js +62 -44
- package/dist/core/codemod.js.map +1 -1
- package/dist/core/config.d.ts +10 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +51 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/detect.d.ts +8 -2
- package/dist/core/detect.d.ts.map +1 -1
- package/dist/core/detect.js +52 -21
- package/dist/core/detect.js.map +1 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +9 -8
- package/dist/core/errors.js.map +1 -1
- package/dist/core/exec.d.ts +16 -0
- package/dist/core/exec.d.ts.map +1 -0
- package/dist/core/exec.js +48 -0
- package/dist/core/exec.js.map +1 -0
- package/dist/core/manualSteps.d.ts +7 -0
- package/dist/core/manualSteps.d.ts.map +1 -0
- package/dist/core/manualSteps.js +59 -0
- package/dist/core/manualSteps.js.map +1 -0
- package/dist/core/paths.d.ts +3 -1
- package/dist/core/paths.d.ts.map +1 -1
- package/dist/core/paths.js +14 -10
- package/dist/core/paths.js.map +1 -1
- package/dist/core/spinner.d.ts +1 -1
- package/dist/core/spinner.d.ts.map +1 -1
- package/dist/core/spinner.js +38 -8
- package/dist/core/spinner.js.map +1 -1
- package/dist/core/vosk.d.ts.map +1 -1
- package/dist/core/vosk.js +50 -39
- package/dist/core/vosk.js.map +1 -1
- package/docs/manual-testing.md +91 -0
- package/package.json +6 -3
- package/recipes/audio-recorder/apps/native/src/app/audio-recorder/index.tsx +5 -0
- package/recipes/audio-recorder/recipe.json +3 -3
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/audio-player.tsx +301 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/audio-recorder.tsx +373 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/audio-waveform.tsx +270 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/index.ts +4 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/recording-list.tsx +89 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/audio-player-demo.tsx +66 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/audio-recorder-cloud.tsx +68 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/audio-recorder-interview.tsx +102 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/basic.tsx +27 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/index.ts +5 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/with-recording-list-demo.tsx +82 -0
- package/recipes/audio-recorder-supabase/packages/backend/src/services/recordings.ts +369 -0
- package/recipes/audio-recorder-supabase/packages/backend/supabase/migrations/recordings.sql +70 -0
- package/recipes/audio-recorder-supabase/recipe.json +35 -0
- package/recipes/audio-recorder-supabase@latest.zip +0 -0
- package/recipes/audio-recorder@latest.zip +0 -0
- package/recipes/charts/apps/native/src/features/charts/components/bar-chart.tsx +3 -3
- package/recipes/charts/apps/native/src/features/charts/components/candlestick-chart.tsx +2 -2
- package/recipes/charts/apps/native/src/features/charts/components/chart-card.tsx +5 -5
- package/recipes/charts/apps/native/src/features/charts/components/column-chart.tsx +3 -3
- package/recipes/charts/apps/native/src/features/charts/components/doughnut-chart.tsx +20 -4
- package/recipes/charts/apps/native/src/features/charts/components/line-chart.tsx +7 -6
- package/recipes/charts/apps/native/src/features/charts/components/radar-chart.tsx +6 -4
- package/recipes/charts/apps/native/src/features/charts/components/radial-bar-chart.tsx +1 -1
- package/recipes/charts/apps/native/src/features/charts/components/stacked-bar-chart.tsx +5 -4
- package/recipes/charts/recipe.json +4 -13
- package/recipes/charts@latest.zip +0 -0
- package/recipes/chatbot/apps/native/src/app/chatbot/index.tsx +1 -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 +86 -53
- package/recipes/chatbot/recipe.json +26 -92
- package/recipes/chatbot-supabase/apps/native/src/api-client/supabase/chatbot.ts +515 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/app/index.tsx +257 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-header-buttons.tsx +59 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-input-bar.tsx +485 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-markdown.tsx +575 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-message-bubble.tsx +223 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-settings-modal.tsx +161 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/image-preview-list.tsx +116 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/markdown/code-block.tsx +165 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/markdown/index.ts +10 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/markdown/table-renderer.tsx +129 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/message-error-boundary.tsx +78 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/message-list.tsx +170 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/model-selector.tsx +283 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/report-content-modal.tsx +188 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/suggested-messages.tsx +67 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/constants/models.ts +20 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/constants/report-reasons.ts +9 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-attachment-cache.ts +142 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-chat-config.ts +458 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-chat-handlers.ts +429 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-chatbot-settings.ts +89 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-conversation.ts +90 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-image-picker.ts +122 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-keyboard-coordinator.ts +161 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-smart-scroll-manager.ts +213 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/models/index.ts +86 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/models/models.ts +162 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/models/providers.ts +62 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/models/types.ts +40 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/services/file-uploader.ts +287 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/services/message-handler-service.ts +189 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/types/index.ts +70 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/utils/chat-telemetry.ts +91 -0
- package/recipes/chatbot-supabase/packages/backend/src/services/conversations.ts +243 -0
- package/recipes/chatbot-supabase/packages/backend/src/services/messages.ts +327 -0
- package/recipes/chatbot-supabase/packages/backend/supabase/functions/chat-stream/index.ts +347 -0
- package/recipes/chatbot-supabase/packages/backend/supabase/migrations/chatbot.sql +104 -0
- package/recipes/chatbot-supabase/recipe.json +79 -0
- package/recipes/chatbot-supabase@latest.zip +0 -0
- package/recipes/chatbot.zip +0 -0
- package/recipes/chatbot@latest.zip +0 -0
- package/recipes/image-analysis/packages/backend/convex/imageAnalysis/index.ts +2 -2
- package/recipes/image-analysis/packages/backend/convex/{imageAnalysisFunctions.ts → imageAnalysis.ts} +5 -5
- package/recipes/image-analysis/recipe.json +15 -55
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/analysis-options-screen.tsx +304 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/camera.tsx +221 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/image-capture-screen.tsx +333 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/loading-screen.tsx +214 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/loading.tsx +191 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/results.tsx +137 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/trait-details.tsx +172 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/use-analysis-data.ts +160 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/use-results-screen.ts +151 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/achievement-badge.tsx +77 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/achievement-card.tsx +75 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/achievement-unlocked-modal.tsx +162 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/achievements-section.tsx +44 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/advice-list.tsx +42 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/circular-progress.tsx +233 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/content-card.tsx +38 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/error-state.tsx +42 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/index.ts +9 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/loading-state.tsx +26 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/profile-image.tsx +60 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/results-header.tsx +62 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/score-display.tsx +54 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/share-options-modal.tsx +110 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/traits-grid.tsx +74 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/config/analysis-config.ts +80 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/config/master-analysis-config.ts +157 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/hooks/index.ts +1 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/hooks/use-analysis.ts +38 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/hooks/use-image-analysis.ts +208 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/services/analysis-service.ts +262 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/services/share-service.ts +176 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/services/trait-details-service.ts +289 -0
- package/recipes/image-analysis-supabase/packages/backend/src/services/image-analyses.ts +132 -0
- package/recipes/image-analysis-supabase/packages/backend/supabase/functions/analyze-image/index.ts +312 -0
- package/recipes/image-analysis-supabase/packages/backend/supabase/migrations/image_analysis.sql +42 -0
- package/recipes/image-analysis-supabase/recipe.json +57 -0
- package/recipes/image-analysis-supabase@latest.zip +0 -0
- package/recipes/image-analysis@latest.zip +0 -0
- package/recipes/image-generator/apps/native/src/features/image-generator/app/index.tsx +16 -2
- package/recipes/image-generator/apps/native/src/features/image-generator/components/image-model-selector.tsx +11 -5
- package/recipes/image-generator/apps/native/src/features/image-generator/hooks/use-image-generator.ts +11 -5
- package/recipes/image-generator/packages/backend/convex/imageGeneration/index.ts +2 -2
- package/recipes/image-generator/recipe.json +16 -39
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/app/_layout.tsx +26 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/app/gallery.tsx +217 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/app/index.tsx +251 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/components/gallery-image.tsx +25 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/components/image-detail-modal.tsx +215 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/components/image-model-selector.tsx +216 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/components/image-placeholder.tsx +26 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/hooks/use-image-gallery.ts +71 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/hooks/use-image-generator-settings.ts +152 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/hooks/use-image-generator.ts +103 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/models/models.ts +66 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/services/image-gallery-service.ts +96 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/services/image-save-service.ts +120 -0
- package/recipes/image-generator-supabase/packages/backend/supabase/functions/generate-image/index.ts +291 -0
- package/recipes/image-generator-supabase/packages/backend/supabase/migrations/image_generator.sql +71 -0
- package/recipes/image-generator-supabase/recipe.json +59 -0
- package/recipes/image-generator-supabase@latest.zip +0 -0
- package/recipes/image-generator@latest.zip +0 -0
- package/recipes/ios-widget/recipe.json +15 -24
- package/recipes/ios-widget@latest.zip +0 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/analytics/index.ts +9 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/components/onboarding-with-analytics.tsx +141 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/components/onboarding.tsx +173 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/config/onboarding-flow-config.ts +189 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/demo-one/app/index.tsx +42 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/demo-one/data.ts +32 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/app/index.tsx +43 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/interactive-onboarding.tsx +222 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/ai-tone-step.tsx +133 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/currency-step.tsx +165 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-ai-step.tsx +199 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-chatbot-step.tsx +154 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-manual-step.tsx +156 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-scan-step.tsx +158 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/main-reason-step.tsx +139 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/notification-step.tsx +129 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/overspend-step.tsx +138 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/personalizing-step.tsx +190 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/rating-step.tsx +98 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/reminder-step.tsx +181 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/safety-step.tsx +110 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/struggle-step.tsx +139 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/welcome-step.tsx +217 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/ui/onboarding-header.tsx +58 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/constants.ts +179 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/hooks/use-onboarding-analytics.ts +323 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/services/onboarding-analytics.ts +432 -0
- package/recipes/onboarding/recipe.json +15 -0
- package/recipes/onboarding@latest.zip +0 -0
- package/recipes/payments/recipe.json +28 -61
- package/recipes/payments-supabase/apps/native/src/features/payments/README.md +200 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/app/local-paywall.tsx +194 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/app/remote-paywall.tsx +79 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/components/payment-initializer.tsx +95 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/components/paywall-error-state.tsx +60 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/components/paywall-local-mode.tsx +116 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/components/paywall-product-card.tsx +133 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/components/paywall-remote-mode.tsx +146 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/hooks/use-entitlement.ts +63 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/index.ts +8 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/services/revenuecat-adapter.ts +407 -0
- package/recipes/payments-supabase/packages/backend/src/services/payments.ts +201 -0
- package/recipes/payments-supabase/packages/backend/supabase/migrations/payments.sql +35 -0
- package/recipes/payments-supabase/recipe.json +51 -0
- package/recipes/payments-supabase@latest.zip +0 -0
- package/recipes/payments@latest.zip +0 -0
- package/recipes/quiz/apps/native/src/features/quiz/index.tsx +1 -2
- package/recipes/quiz/recipe.json +6 -9
- package/recipes/quiz@latest.zip +0 -0
- package/recipes/tracker-app/apps/native/src/features/tracker-app/app/index.tsx +1 -2
- package/recipes/tracker-app/recipe.json +7 -10
- package/recipes/tracker-app@latest.zip +0 -0
- package/recipes/voice-bot/recipe.json +8 -68
- package/recipes/voice-bot.zip +0 -0
- package/recipes/voice-bot@latest.zip +0 -0
- package/recipes/wake-word/recipe.json +10 -9
- package/recipes/wake-word.zip +0 -0
- package/recipes/wake-word@latest.zip +0 -0
- package/recipes/charts/apps/native/src/app/(root)/(protected)/charts/index.tsx +0 -3
- package/recipes/chatbot/packages/backend/convex/lib/rateLimit.ts +0 -100
- package/recipes/chatbot/packages/backend/convex/lib/telemetry.ts +0 -29
- package/recipes/chatbot/packages/backend/convex/ragKnowledge.ts +0 -0
- package/recipes/image-analysis/apps/native/assets/features/image-analyzer/front.jpg +0 -0
- package/recipes/image-analysis/apps/native/assets/features/image-analyzer/side.jpg +0 -0
- package/recipes/image-analysis/apps/native/assets/features/image-analyzer/threeQuarter.jpg +0 -0
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/_layout.tsx +0 -5
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/analysis-options.tsx +0 -50
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/camera.tsx +0 -2
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/index.tsx +0 -50
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/loading.tsx +0 -50
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/results.tsx +0 -2
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/trait-details.tsx +0 -3
- package/recipes/image-analysis/packages/backend/convex/lib/ai/imageAnalysisAdapter.ts +0 -200
- package/recipes/payments/apps/native/src/app/(root)/(protected)/paywall/index.tsx +0 -74
- package/recipes/payments/apps/native/src/app/(root)/(protected)/paywall/local.tsx +0 -25
- package/recipes/payments/apps/native/src/app/(root)/(protected)/paywall/remote.tsx +0 -23
- package/recipes/quiz/apps/native/src/app/(root)/(protected)/quiz/index.tsx +0 -47
- package/recipes/tracker-app/apps/native/src/app/(root)/(protected)/tracker-app/index.tsx +0 -1
- package/recipes/voice-bot/apps/native/src/app/(root)/(protected)/voice-bot/index.tsx +0 -27
- package/recipes/voice-bot/packages/backend/convex/router.ts +0 -81
- /package/recipes/{chatbot/apps/native/src/app/(root)/(protected) → chatbot-supabase/apps/native/src/app}/chatbot/index.tsx +0 -0
- /package/recipes/{image-generator/apps/native/src/app/(root)/(protected) → image-generator-supabase/apps/native/src/app}/image-generator/gallery.tsx +0 -0
- /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,289 @@
|
|
|
1
|
+
export type TraitAdvice = {
|
|
2
|
+
icon: string;
|
|
3
|
+
description: string;
|
|
4
|
+
goodScore: boolean;
|
|
5
|
+
advice: string[];
|
|
6
|
+
tips: string[];
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type ScoreLevel = {
|
|
10
|
+
level: string;
|
|
11
|
+
color: string;
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Get trait-specific advice and tips based on trait key and score
|
|
17
|
+
* Now supports both structured and legacy data formats
|
|
18
|
+
*/
|
|
19
|
+
export function getTraitAdvice(
|
|
20
|
+
traitKey: string,
|
|
21
|
+
traitScore: number,
|
|
22
|
+
structuredData?: {
|
|
23
|
+
feedback?: string;
|
|
24
|
+
strengths?: string[];
|
|
25
|
+
improvements?: string[];
|
|
26
|
+
},
|
|
27
|
+
): TraitAdvice {
|
|
28
|
+
// If we have structured data from AI, use it
|
|
29
|
+
if (structuredData) {
|
|
30
|
+
const goodScore = traitScore >= 70;
|
|
31
|
+
|
|
32
|
+
// Get default icon for the trait
|
|
33
|
+
const defaultIcons: Record<string, string> = {
|
|
34
|
+
jawline: '🦴',
|
|
35
|
+
skinHealth: '✨',
|
|
36
|
+
facialSymmetry: '⚖️',
|
|
37
|
+
eyeArea: '👁️',
|
|
38
|
+
noseStructure: '👃',
|
|
39
|
+
lipFullness: '💋',
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
icon: defaultIcons[traitKey] || '📊',
|
|
44
|
+
goodScore,
|
|
45
|
+
description: structuredData.feedback || `Score: ${traitScore}/100`,
|
|
46
|
+
advice: structuredData.strengths || [],
|
|
47
|
+
tips: structuredData.improvements || [],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Fallback to static advice map for legacy data
|
|
52
|
+
const traitAdviceMap: Record<string, Omit<TraitAdvice, 'goodScore'>> = {
|
|
53
|
+
overall: {
|
|
54
|
+
icon: '🌟',
|
|
55
|
+
description:
|
|
56
|
+
'Your comprehensive analysis score across all evaluated traits',
|
|
57
|
+
advice:
|
|
58
|
+
traitScore >= 80
|
|
59
|
+
? [
|
|
60
|
+
'Excellent overall results across all areas',
|
|
61
|
+
'You have a well-balanced and attractive appearance',
|
|
62
|
+
'Continue maintaining your current health and care routine',
|
|
63
|
+
'Consider sharing your positive results with others',
|
|
64
|
+
]
|
|
65
|
+
: traitScore >= 70
|
|
66
|
+
? [
|
|
67
|
+
'Very good overall results with strong performance',
|
|
68
|
+
'Focus on maintaining your current positive traits',
|
|
69
|
+
'Small improvements in specific areas could enhance results',
|
|
70
|
+
'You have a strong foundation to build upon',
|
|
71
|
+
]
|
|
72
|
+
: traitScore >= 60
|
|
73
|
+
? [
|
|
74
|
+
'Good overall results with solid potential',
|
|
75
|
+
'Identify the highest-scoring traits to emphasize',
|
|
76
|
+
'Work on improving lower-scoring areas gradually',
|
|
77
|
+
'Consider professional guidance for targeted improvements',
|
|
78
|
+
]
|
|
79
|
+
: [
|
|
80
|
+
'Room for improvement across multiple areas',
|
|
81
|
+
'Focus on one trait at a time for gradual enhancement',
|
|
82
|
+
'Develop a comprehensive care routine',
|
|
83
|
+
'Consider consulting professionals for personalized advice',
|
|
84
|
+
],
|
|
85
|
+
tips: [
|
|
86
|
+
'Maintain a healthy lifestyle for overall improvement',
|
|
87
|
+
'Consistent skincare routine benefits all facial areas',
|
|
88
|
+
'Regular exercise improves circulation and appearance',
|
|
89
|
+
'Stay hydrated and get adequate sleep for best results',
|
|
90
|
+
'Consider professional consultations for targeted advice',
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
jawline: {
|
|
94
|
+
icon: '🦴',
|
|
95
|
+
description: 'Jawline definition and facial structure analysis',
|
|
96
|
+
advice:
|
|
97
|
+
traitScore >= 70
|
|
98
|
+
? [
|
|
99
|
+
'Your jawline shows excellent definition and structure',
|
|
100
|
+
'Maintain good posture to enhance your natural jawline',
|
|
101
|
+
'Consider beard styling to complement your strong jaw',
|
|
102
|
+
'Stay hydrated to maintain skin elasticity around the jaw area',
|
|
103
|
+
]
|
|
104
|
+
: [
|
|
105
|
+
'Facial exercises can help strengthen jaw muscles',
|
|
106
|
+
'Proper chewing techniques can improve muscle tone',
|
|
107
|
+
'Consider professional guidance for jaw muscle development',
|
|
108
|
+
'Good posture can enhance jawline appearance',
|
|
109
|
+
],
|
|
110
|
+
tips: [
|
|
111
|
+
'Avoid excessive gum chewing which can overdevelop muscles',
|
|
112
|
+
'Facial massage can improve blood circulation',
|
|
113
|
+
'Maintain a healthy weight for optimal facial definition',
|
|
114
|
+
'Consider professional skincare for the jaw area',
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
skinHealth: {
|
|
118
|
+
icon: '✨',
|
|
119
|
+
description: 'Overall skin condition and health assessment',
|
|
120
|
+
advice:
|
|
121
|
+
traitScore >= 70
|
|
122
|
+
? [
|
|
123
|
+
'Your skin shows excellent health and vitality',
|
|
124
|
+
'Continue your current skincare routine',
|
|
125
|
+
'Use sunscreen daily to maintain skin quality',
|
|
126
|
+
'Stay hydrated for optimal skin health',
|
|
127
|
+
]
|
|
128
|
+
: [
|
|
129
|
+
'Establish a consistent daily skincare routine',
|
|
130
|
+
'Consider consulting a dermatologist for personalized advice',
|
|
131
|
+
'Increase water intake and improve diet',
|
|
132
|
+
'Get adequate sleep for skin recovery',
|
|
133
|
+
],
|
|
134
|
+
tips: [
|
|
135
|
+
'Use gentle, pH-balanced cleansers',
|
|
136
|
+
'Apply moisturizer suitable for your skin type',
|
|
137
|
+
'Never skip sunscreen, even indoors',
|
|
138
|
+
'Include antioxidant-rich foods in your diet',
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
facialSymmetry: {
|
|
142
|
+
icon: '⚖️',
|
|
143
|
+
description: 'Balance and proportion of facial features',
|
|
144
|
+
advice:
|
|
145
|
+
traitScore >= 70
|
|
146
|
+
? [
|
|
147
|
+
'Your facial features show excellent symmetry',
|
|
148
|
+
'This natural balance enhances overall attractiveness',
|
|
149
|
+
'Consider hairstyles that complement your balanced features',
|
|
150
|
+
'Makeup techniques can further enhance symmetry if desired',
|
|
151
|
+
]
|
|
152
|
+
: [
|
|
153
|
+
'Small asymmetries are completely normal and natural',
|
|
154
|
+
'Strategic makeup techniques can enhance symmetry',
|
|
155
|
+
'Consider hairstyles that create visual balance',
|
|
156
|
+
'Good posture can improve overall facial appearance',
|
|
157
|
+
],
|
|
158
|
+
tips: [
|
|
159
|
+
'Practice facial exercises for muscle balance',
|
|
160
|
+
'Use contouring techniques to enhance symmetry',
|
|
161
|
+
'Choose eyewear that complements your face shape',
|
|
162
|
+
'Remember that perfect symmetry is rare and not necessary',
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
eyeArea: {
|
|
166
|
+
icon: '👁️',
|
|
167
|
+
description: 'Eye shape, clarity, and surrounding area health',
|
|
168
|
+
advice:
|
|
169
|
+
traitScore >= 70
|
|
170
|
+
? [
|
|
171
|
+
'Your eyes show excellent shape and clarity',
|
|
172
|
+
'The eye area appears healthy and well-maintained',
|
|
173
|
+
'Continue protecting this delicate area from sun damage',
|
|
174
|
+
'Consider eye-specific skincare products',
|
|
175
|
+
]
|
|
176
|
+
: [
|
|
177
|
+
'Use a dedicated eye cream for this delicate area',
|
|
178
|
+
'Get adequate sleep to reduce dark circles',
|
|
179
|
+
'Consider professional eye treatments',
|
|
180
|
+
'Practice good eye hygiene and care',
|
|
181
|
+
],
|
|
182
|
+
tips: [
|
|
183
|
+
'Use gentle, fragrance-free eye products',
|
|
184
|
+
'Apply sunglasses to protect from UV damage',
|
|
185
|
+
'Practice the 20-20-20 rule for screen time',
|
|
186
|
+
'Use cooling treatments to reduce puffiness',
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
noseStructure: {
|
|
190
|
+
icon: '👃',
|
|
191
|
+
description: 'Nose shape, proportion, and facial harmony',
|
|
192
|
+
advice:
|
|
193
|
+
traitScore >= 70
|
|
194
|
+
? [
|
|
195
|
+
'Your nose structure shows excellent proportion',
|
|
196
|
+
'The shape complements your overall facial features',
|
|
197
|
+
'Consider highlighting techniques to enhance your nose',
|
|
198
|
+
'Maintain good nasal health and hygiene',
|
|
199
|
+
]
|
|
200
|
+
: [
|
|
201
|
+
'Contouring can enhance nose appearance',
|
|
202
|
+
'Consider professional makeup techniques',
|
|
203
|
+
'Focus on overall facial balance',
|
|
204
|
+
'Embrace your unique features',
|
|
205
|
+
],
|
|
206
|
+
tips: [
|
|
207
|
+
'Use highlighting on the bridge for definition',
|
|
208
|
+
'Maintain good nasal hygiene',
|
|
209
|
+
'Consider your nose in context of overall facial harmony',
|
|
210
|
+
'Professional contouring can create desired effects',
|
|
211
|
+
],
|
|
212
|
+
},
|
|
213
|
+
lipFullness: {
|
|
214
|
+
icon: '💋',
|
|
215
|
+
description: 'Lip shape, fullness, and overall appearance',
|
|
216
|
+
advice:
|
|
217
|
+
traitScore >= 70
|
|
218
|
+
? [
|
|
219
|
+
'Your lips show excellent natural fullness',
|
|
220
|
+
'The shape and proportion are very attractive',
|
|
221
|
+
'Use lip care products to maintain health',
|
|
222
|
+
'Consider lip colors that enhance your natural tone',
|
|
223
|
+
]
|
|
224
|
+
: [
|
|
225
|
+
'Lip care routine can improve appearance',
|
|
226
|
+
'Exfoliation can enhance lip texture',
|
|
227
|
+
'Consider lip-enhancing makeup techniques',
|
|
228
|
+
'Stay hydrated for naturally fuller lips',
|
|
229
|
+
],
|
|
230
|
+
tips: [
|
|
231
|
+
'Use a good lip balm with SPF protection',
|
|
232
|
+
'Regular exfoliation removes dead skin',
|
|
233
|
+
'Lip liner can enhance shape and fullness',
|
|
234
|
+
'Choose colors that complement your skin tone',
|
|
235
|
+
],
|
|
236
|
+
},
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
const traitData = traitAdviceMap[traitKey] || {
|
|
240
|
+
icon: '📊',
|
|
241
|
+
description: 'Detailed analysis of this facial feature',
|
|
242
|
+
advice: ['Continue maintaining good overall health and skincare'],
|
|
243
|
+
tips: ['Consult with professionals for personalized advice'],
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
return {
|
|
247
|
+
...traitData,
|
|
248
|
+
goodScore: traitScore >= 70,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Get score level information based on numeric score
|
|
254
|
+
*/
|
|
255
|
+
export function getScoreLevel(score: number): ScoreLevel {
|
|
256
|
+
if (score >= 85) {
|
|
257
|
+
return {
|
|
258
|
+
level: 'Excellent',
|
|
259
|
+
color: '#22C55E',
|
|
260
|
+
description: 'Outstanding results in this area',
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
if (score >= 70) {
|
|
264
|
+
return {
|
|
265
|
+
level: 'Very Good',
|
|
266
|
+
color: '#4ADE80',
|
|
267
|
+
description: 'Strong performance with great potential',
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
if (score >= 55) {
|
|
271
|
+
return {
|
|
272
|
+
level: 'Good',
|
|
273
|
+
color: '#FBBF24',
|
|
274
|
+
description: 'Solid foundation with room for improvement',
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
if (score >= 40) {
|
|
278
|
+
return {
|
|
279
|
+
level: 'Fair',
|
|
280
|
+
color: '#FB7185',
|
|
281
|
+
description: 'Some areas to focus on for enhancement',
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
return {
|
|
285
|
+
level: 'Needs Attention',
|
|
286
|
+
color: '#E11D48',
|
|
287
|
+
description: 'Significant opportunity for improvement',
|
|
288
|
+
};
|
|
289
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
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
|
+
};
|