vibefast-cli 0.7.0 → 0.7.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/dist/__tests__/recipes.test.js +5 -5
- package/dist/__tests__/recipes.test.js.map +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +136 -48
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +106 -89
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/remove.js +1 -1
- package/dist/commands/remove.js.map +1 -1
- package/dist/core/__tests__/fsx.test.js +3 -1
- package/dist/core/__tests__/fsx.test.js.map +1 -1
- package/dist/core/__tests__/prompt.test.js +12 -12
- package/dist/core/__tests__/prompt.test.js.map +1 -1
- package/dist/core/__tests__/validate.test.js +4 -3
- package/dist/core/__tests__/validate.test.js.map +1 -1
- package/dist/core/auth.d.ts.map +1 -1
- package/dist/core/auth.js +8 -0
- package/dist/core/auth.js.map +1 -1
- package/dist/core/codemod.d.ts +13 -0
- package/dist/core/codemod.d.ts.map +1 -1
- package/dist/core/codemod.js +50 -0
- package/dist/core/codemod.js.map +1 -1
- package/dist/core/errors.js +1 -1
- package/dist/core/fsx.js +1 -1
- package/dist/core/fsx.js.map +1 -1
- package/dist/core/recipes.d.ts.map +1 -1
- package/dist/core/recipes.js +65 -10
- package/dist/core/recipes.js.map +1 -1
- package/package.json +1 -1
- package/recipes/animated-chip/recipe.json +15 -0
- package/recipes/animated-chip@latest.zip +0 -0
- package/recipes/animated-switch/recipe.json +15 -0
- package/recipes/animated-switch@latest.zip +0 -0
- package/recipes/audio-recorder@latest.zip +0 -0
- package/recipes/charts/apps/native/src/features/charts/components/doughnut-chart.tsx +29 -18
- package/recipes/charts@latest.zip +0 -0
- package/recipes/chatbot/apps/native/src/features/chatbot/components/message-list.tsx +1 -1
- package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-smart-scroll-manager.ts +6 -0
- package/recipes/chatbot/recipe.json +21 -5
- package/recipes/chatbot@latest.zip +0 -0
- package/recipes/glowing-button@latest.zip +0 -0
- package/recipes/image-analysis/recipe.json +36 -19
- package/recipes/image-analysis@latest.zip +0 -0
- package/recipes/image-generator/apps/native/src/features/image-generator/app/_layout.tsx +1 -0
- package/recipes/image-generator/apps/native/src/features/image-generator/app/gallery.tsx +1 -1
- package/recipes/image-generator/apps/native/src/features/image-generator/components/gallery-image.tsx +2 -3
- package/recipes/image-generator/recipe.json +5 -3
- package/recipes/image-generator@latest.zip +0 -0
- package/recipes/ios-widget/recipe.json +24 -0
- package/recipes/ios-widget@latest.zip +0 -0
- package/recipes/number-stepper/recipe.json +15 -0
- package/recipes/number-stepper@latest.zip +0 -0
- package/recipes/payments/recipe.json +30 -0
- package/recipes/payments@latest.zip +0 -0
- package/recipes/posthog.json +2 -1
- package/recipes/progress-circle/recipe.json +15 -0
- package/recipes/progress-circle@latest.zip +0 -0
- package/recipes/quiz@latest.zip +0 -0
- package/recipes/sentry.json +2 -1
- package/recipes/swipe-slider/recipe.json +15 -0
- package/recipes/swipe-slider@latest.zip +0 -0
- package/recipes/{0 → timeline}/recipe.json +3 -6
- package/recipes/timeline@latest.zip +0 -0
- package/recipes/tracker-app@latest.zip +0 -0
- package/recipes/upload-all.sh +13 -2
- package/recipes/voice-bot/recipe.json +15 -2
- package/recipes/voice-bot@latest.zip +0 -0
- package/recipes/wake-word/apps/native/src/app/(root)/(protected)/test-wake-word.tsx +0 -2
- package/recipes/wake-word/recipe.json +2 -2
- package/recipes/wake-word@latest.zip +0 -0
- package/src/__tests__/recipes.test.ts +5 -5
- package/src/commands/add.ts +230 -54
- package/src/commands/init.ts +118 -102
- package/src/commands/remove.ts +1 -1
- package/src/core/__tests__/fsx.test.ts +3 -1
- package/src/core/__tests__/prompt.test.ts +12 -12
- package/src/core/__tests__/validate.test.ts +4 -3
- package/src/core/auth.ts +8 -0
- package/src/core/codemod.ts +66 -0
- package/src/core/errors.ts +1 -1
- package/src/core/fsx.ts +1 -1
- package/src/core/recipes.ts +67 -11
- package/2/.claude/agents/architect.md +0 -74
- package/2/.claude/agents/convex-reviewer.md +0 -267
- package/2/.claude/agents/debug-detective.md +0 -62
- package/2/.claude/agents/learner.md +0 -64
- package/2/.claude/agents/perf-optimizer.md +0 -71
- package/2/.claude/agents/security-researcher.md +0 -42
- package/2/.claude/agents/tech-researcher.md +0 -46
- package/2/.claude/agents/ux-designer.md +0 -45
- package/2/.claude/commands/create-app-design.md +0 -279
- package/2/.claude/commands/create-prd-interactive.md +0 -113
- package/2/.claude/commands/create-prd.md +0 -111
- package/2/.claude/commands/create-tech-stack.md +0 -345
- package/2/.claude/commands/update-app-design.md +0 -298
- package/2/.claude/commands/update-project-structure.md +0 -14
- package/2/.claude/commands/update-tech-stack.md +0 -325
- package/2/.claude/docs/CONVEX_FEATURES_PLAN.md +0 -249
- package/2/.claude/docs/app-design-document.md +0 -0
- package/2/.claude/docs/project-status.md +0 -25
- package/2/.claude/docs/project-structure.md +0 -7
- package/2/.claude/docs/tech-stack.md +0 -157
- package/2/.claude/scripts/tree.sh +0 -70
- package/2/.claude/settings.json +0 -30
- package/2/.cursor/commands/code-review-high.md +0 -190
- package/2/.cursorignore +0 -3
- package/2/.github/ISSUE_TEMPLATE.md +0 -13
- package/2/.github/PULL_REQUEST_TEMPLATE.md +0 -23
- package/2/.github/actions/eas-build/action.yml +0 -85
- package/2/.github/actions/setup-jdk-generate-apk/action.yml +0 -48
- package/2/.github/actions/setup-node-pnpm-install/action.yml +0 -29
- package/2/.github/scripts/expo-doctor.sh +0 -26
- package/2/.github/workflows/compress-images.yml +0 -48
- package/2/.github/workflows/e2e-android-eas-build.yml +0 -111
- package/2/.github/workflows/e2e-android-maestro.yml +0 -52
- package/2/.github/workflows/e2e-android.yml +0 -119
- package/2/.github/workflows/eas-build-prod.yml +0 -43
- package/2/.github/workflows/eas-build-qa.yml +0 -47
- package/2/.github/workflows/expo-doctor.yml +0 -61
- package/2/.github/workflows/lint-ts.yml +0 -49
- package/2/.github/workflows/new-app-version.yml +0 -65
- package/2/.github/workflows/new-github-release.yml +0 -34
- package/2/.github/workflows/stale.yml +0 -24
- package/2/.github/workflows/test.yml +0 -50
- package/2/.github/workflows/type-check.yml +0 -54
- package/2/.husky/commit-msg +0 -1
- package/2/.husky/common.sh +0 -8
- package/2/.husky/post-merge +0 -18
- package/2/.husky/pre-commit +0 -24
- package/2/.prettierignore +0 -14
- package/2/.prettierrc.json +0 -10
- package/2/.vibefast/README.md +0 -59
- package/2/.vibefast/config.json +0 -4
- package/2/.vibefast/journal.json +0 -234
- package/2/.vibefast/starter.json +0 -5
- package/2/AGENTS.md +0 -48
- package/2/LICENSE +0 -21
- package/2/README.md +0 -127
- package/2/apps/native/__mocks__/bottom-sheet.js +0 -6
- package/2/apps/native/__mocks__/expo-router.js +0 -16
- package/2/apps/native/__mocks__/react-native-gesture-handler.ts +0 -17
- package/2/apps/native/app-env.d.ts +0 -2
- package/2/apps/native/app.config.ts +0 -167
- package/2/apps/native/assets/adaptive-icon.png +0 -0
- package/2/apps/native/assets/favicon.png +0 -0
- package/2/apps/native/assets/fonts/Inter.ttf +0 -0
- package/2/apps/native/assets/fonts/SF-Pro-Display-Bold.otf +0 -0
- package/2/apps/native/assets/fonts/SF-Pro-Display-Medium.otf +0 -0
- package/2/apps/native/assets/fonts/SF-Pro-Display-Regular.otf +0 -0
- package/2/apps/native/assets/fonts/SF-Pro-Display-Semibold.otf +0 -0
- package/2/apps/native/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/2/apps/native/assets/icon.png +0 -0
- package/2/apps/native/assets/images/cover-image.png +0 -0
- package/2/apps/native/assets/lottie-animations/onboarding-1.json +0 -6504
- package/2/apps/native/assets/lottie-animations/onboarding-2.json +0 -1993
- package/2/apps/native/assets/lottie-animations/onboarding-3.json +0 -50159
- package/2/apps/native/assets/lottie-animations/onboarding-4.json +0 -735
- package/2/apps/native/assets/lottie-animations/onboarding-6.json +0 -2167
- package/2/apps/native/assets/splash-icon.png +0 -0
- package/2/apps/native/babel.config.js +0 -39
- package/2/apps/native/eas.json +0 -75
- package/2/apps/native/env.js +0 -196
- package/2/apps/native/global.css +0 -51
- package/2/apps/native/index.ts +0 -5
- package/2/apps/native/jest-setup.ts +0 -7
- package/2/apps/native/jest.config.js +0 -72
- package/2/apps/native/metro.config.js +0 -85
- package/2/apps/native/nativewind-env.d.ts +0 -1
- package/2/apps/native/package.json +0 -232
- package/2/apps/native/scripts/DRY_RUN_REPORT.md +0 -0
- package/2/apps/native/scripts/QUICK_START.md +0 -76
- package/2/apps/native/scripts/README.md +0 -187
- package/2/apps/native/scripts/convex-setup.js +0 -48
- package/2/apps/native/scripts/genrate-apk-and-install +0 -39
- package/2/apps/native/scripts/i18next-syntax-validation.js +0 -23
- package/2/apps/native/scripts/starter-setup.mjs +0 -246
- package/2/apps/native/src/api-client/auth.ts +0 -68
- package/2/apps/native/src/api-client/chatbot.ts +0 -83
- package/2/apps/native/src/api-client/client.ts +0 -4
- package/2/apps/native/src/api-client/image-generator.ts +0 -34
- package/2/apps/native/src/api-client/index.ts +0 -27
- package/2/apps/native/src/api-client/payments.ts +0 -44
- package/2/apps/native/src/api-client/reporting.ts +0 -29
- package/2/apps/native/src/api-client/shared.ts +0 -43
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/_layout.tsx +0 -166
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/index.tsx +0 -174
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/profile.tsx +0 -320
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/settings.tsx +0 -344
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/_layout.tsx +0 -198
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/accordion.tsx +0 -60
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/advanced.tsx +0 -24
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/avatar.tsx +0 -154
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/badge-chips-toggle.tsx +0 -81
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/buttons.tsx +0 -24
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/charts.tsx +0 -3
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/date-picker.tsx +0 -120
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/file-picker.tsx +0 -133
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/gallery-video.tsx +0 -119
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/index.tsx +0 -69
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/inputs-stepper.tsx +0 -78
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/picker-dropdown.tsx +0 -56
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/popover-bottomsheet.tsx +0 -229
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/progress.tsx +0 -38
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/searchbar.tsx +0 -70
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/sliders.tsx +0 -93
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/spinner.tsx +0 -80
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/switch.tsx +0 -47
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/table.tsx +0 -352
- package/2/apps/native/src/app/(root)/(protected)/(tabs)/style/tabs-timeline.tsx +0 -122
- package/2/apps/native/src/app/(root)/(protected)/_layout.tsx +0 -143
- package/2/apps/native/src/app/(root)/(protected)/audio-recorder/index.tsx +0 -5
- package/2/apps/native/src/app/(root)/(protected)/charts/index.tsx +0 -6
- package/2/apps/native/src/app/(root)/(protected)/chatbot/index.tsx +0 -2
- package/2/apps/native/src/app/(root)/(protected)/image-generator/gallery.tsx +0 -3
- package/2/apps/native/src/app/(root)/(protected)/image-generator/index.tsx +0 -3
- package/2/apps/native/src/app/(root)/(protected)/paywall/index.tsx +0 -74
- package/2/apps/native/src/app/(root)/(protected)/paywall/local.tsx +0 -25
- package/2/apps/native/src/app/(root)/(protected)/paywall/remote.tsx +0 -23
- package/2/apps/native/src/app/(root)/(protected)/quick-actions-demo/index.tsx +0 -32
- package/2/apps/native/src/app/(root)/(protected)/quiz/index.tsx +0 -47
- package/2/apps/native/src/app/(root)/(protected)/test-wake-word.tsx +0 -214
- package/2/apps/native/src/app/(root)/(protected)/tracker-app/index.tsx +0 -1
- package/2/apps/native/src/app/(root)/(protected)/voice-bot/index.tsx +0 -27
- package/2/apps/native/src/app/(root)/(public)/(auth)/_layout.tsx +0 -44
- package/2/apps/native/src/app/(root)/(public)/(auth)/forgot-password.tsx +0 -185
- package/2/apps/native/src/app/(root)/(public)/(auth)/login.tsx +0 -219
- package/2/apps/native/src/app/(root)/(public)/(auth)/otp-verification.tsx +0 -369
- package/2/apps/native/src/app/(root)/(public)/(auth)/reset-password.tsx +0 -247
- package/2/apps/native/src/app/(root)/(public)/(auth)/signup.tsx +0 -207
- package/2/apps/native/src/app/(root)/(public)/_layout.tsx +0 -60
- package/2/apps/native/src/app/(root)/(public)/onboarding/demo-one.tsx +0 -5
- package/2/apps/native/src/app/(root)/(public)/onboarding/demo-two.tsx +0 -52
- package/2/apps/native/src/app/(root)/(public)/onboarding/index.tsx +0 -82
- package/2/apps/native/src/app/(root)/_layout.tsx +0 -30
- package/2/apps/native/src/app/+html.tsx +0 -46
- package/2/apps/native/src/app/[...messing].tsx +0 -24
- package/2/apps/native/src/app/_layout.tsx +0 -56
- package/2/apps/native/src/app/tsconfig.json +0 -3
- package/2/apps/native/src/components/advanced-ui/buttons/glowing-button.tsx +0 -366
- package/2/apps/native/src/components/analytics/navigation-tracker.tsx +0 -10
- package/2/apps/native/src/components/demo/advanced-ui-components.tsx +0 -46
- package/2/apps/native/src/components/demo/buttons-demo.tsx +0 -56
- package/2/apps/native/src/components/demo/colors-demo.tsx +0 -52
- package/2/apps/native/src/components/demo/dropdown-picker-demo.tsx +0 -274
- package/2/apps/native/src/components/demo/inputs-demo.tsx +0 -99
- package/2/apps/native/src/components/demo/notification-demo.tsx +0 -434
- package/2/apps/native/src/components/demo/title-demo.tsx +0 -16
- package/2/apps/native/src/components/demo/toast-demo.tsx +0 -81
- package/2/apps/native/src/components/demo/typography-demo.tsx +0 -28
- package/2/apps/native/src/components/performance/render-performance-monitor.tsx +0 -36
- package/2/apps/native/src/components/ui/accordion.tsx +0 -138
- package/2/apps/native/src/components/ui/avatar.tsx +0 -66
- package/2/apps/native/src/components/ui/badge.tsx +0 -68
- package/2/apps/native/src/components/ui/bottom-sheet.tsx +0 -61
- package/2/apps/native/src/components/ui/colors.js +0 -290
- package/2/apps/native/src/components/ui/core/button.tsx +0 -317
- package/2/apps/native/src/components/ui/core/card.tsx +0 -40
- package/2/apps/native/src/components/ui/core/checkbox.tsx +0 -264
- package/2/apps/native/src/components/ui/core/feature-button.tsx +0 -162
- package/2/apps/native/src/components/ui/core/focus-aware-status-bar.tsx +0 -21
- package/2/apps/native/src/components/ui/core/image.tsx +0 -30
- package/2/apps/native/src/components/ui/core/inputs/floating-text-input.tsx +0 -369
- package/2/apps/native/src/components/ui/core/inputs/input-otp.tsx +0 -304
- package/2/apps/native/src/components/ui/core/inputs/input.tsx +0 -373
- package/2/apps/native/src/components/ui/core/list.tsx +0 -60
- package/2/apps/native/src/components/ui/core/navigation/animated-header.tsx +0 -87
- package/2/apps/native/src/components/ui/core/navigation/screen-footer.tsx +0 -67
- package/2/apps/native/src/components/ui/core/overlays/dropdown.tsx +0 -290
- package/2/apps/native/src/components/ui/core/overlays/full-screen-loading.tsx +0 -15
- package/2/apps/native/src/components/ui/core/overlays/modal-keyboard-aware-scroll-view.tsx +0 -46
- package/2/apps/native/src/components/ui/core/overlays/modal.tsx +0 -247
- package/2/apps/native/src/components/ui/core/pagination-dots.tsx +0 -231
- package/2/apps/native/src/components/ui/core/pressable.tsx +0 -48
- package/2/apps/native/src/components/ui/core/progress-bar.tsx +0 -47
- package/2/apps/native/src/components/ui/core/progress.tsx +0 -149
- package/2/apps/native/src/components/ui/core/select.tsx +0 -261
- package/2/apps/native/src/components/ui/core/spinner.tsx +0 -387
- package/2/apps/native/src/components/ui/core/text.tsx +0 -45
- package/2/apps/native/src/components/ui/core/toast.tsx +0 -190
- package/2/apps/native/src/components/ui/custom-switch.tsx +0 -90
- package/2/apps/native/src/components/ui/date-time-picker.tsx +0 -268
- package/2/apps/native/src/components/ui/debug.ts +0 -2
- package/2/apps/native/src/components/ui/extras/debug-credit-tester.tsx +0 -107
- package/2/apps/native/src/components/ui/extras/debug-mmkv-state.tsx +0 -53
- package/2/apps/native/src/components/ui/extras/handle-error.ts +0 -191
- package/2/apps/native/src/components/ui/extras/hello-wave.tsx +0 -70
- package/2/apps/native/src/components/ui/extras/icon.tsx +0 -36
- package/2/apps/native/src/components/ui/extras/network-connectivity-wrapper.tsx +0 -36
- package/2/apps/native/src/components/ui/extras/offline-indicator.tsx +0 -55
- package/2/apps/native/src/components/ui/extras/social-login-buttons.tsx +0 -296
- package/2/apps/native/src/components/ui/file-picker.tsx +0 -177
- package/2/apps/native/src/components/ui/gallery.tsx +0 -79
- package/2/apps/native/src/components/ui/icons/apple.tsx +0 -19
- package/2/apps/native/src/components/ui/icons/arrow-right.tsx +0 -26
- package/2/apps/native/src/components/ui/icons/camera.tsx +0 -26
- package/2/apps/native/src/components/ui/icons/caret-down.tsx +0 -20
- package/2/apps/native/src/components/ui/icons/chevron-up.tsx +0 -21
- package/2/apps/native/src/components/ui/icons/claude.tsx +0 -15
- package/2/apps/native/src/components/ui/icons/copy.tsx +0 -27
- package/2/apps/native/src/components/ui/icons/deepseek.tsx +0 -15
- package/2/apps/native/src/components/ui/icons/download.tsx +0 -32
- package/2/apps/native/src/components/ui/icons/feed.tsx +0 -12
- package/2/apps/native/src/components/ui/icons/gemini.tsx +0 -15
- package/2/apps/native/src/components/ui/icons/github.tsx +0 -30
- package/2/apps/native/src/components/ui/icons/google.tsx +0 -24
- package/2/apps/native/src/components/ui/icons/groq.tsx +0 -15
- package/2/apps/native/src/components/ui/icons/home.tsx +0 -19
- package/2/apps/native/src/components/ui/icons/index.tsx +0 -26
- package/2/apps/native/src/components/ui/icons/language.tsx +0 -33
- package/2/apps/native/src/components/ui/icons/llama.tsx +0 -15
- package/2/apps/native/src/components/ui/icons/microphone.tsx +0 -20
- package/2/apps/native/src/components/ui/icons/mistral.tsx +0 -22
- package/2/apps/native/src/components/ui/icons/nutrition.tsx +0 -15
- package/2/apps/native/src/components/ui/icons/openai.tsx +0 -15
- package/2/apps/native/src/components/ui/icons/perplexity.tsx +0 -22
- package/2/apps/native/src/components/ui/icons/qwen.tsx +0 -15
- package/2/apps/native/src/components/ui/icons/rate.tsx +0 -24
- package/2/apps/native/src/components/ui/icons/report.tsx +0 -20
- package/2/apps/native/src/components/ui/icons/send-horizontal.tsx +0 -26
- package/2/apps/native/src/components/ui/icons/settings.tsx +0 -12
- package/2/apps/native/src/components/ui/icons/share.tsx +0 -16
- package/2/apps/native/src/components/ui/icons/square.tsx +0 -9
- package/2/apps/native/src/components/ui/icons/style.tsx +0 -22
- package/2/apps/native/src/components/ui/icons/support.tsx +0 -27
- package/2/apps/native/src/components/ui/icons/trash2.tsx +0 -42
- package/2/apps/native/src/components/ui/icons/user.tsx +0 -12
- package/2/apps/native/src/components/ui/icons/website.tsx +0 -28
- package/2/apps/native/src/components/ui/icons/wifi-off.tsx +0 -17
- package/2/apps/native/src/components/ui/index.tsx +0 -14
- package/2/apps/native/src/components/ui/nav-item.tsx +0 -42
- package/2/apps/native/src/components/ui/patterns/index.ts +0 -16
- package/2/apps/native/src/components/ui/picker.tsx +0 -244
- package/2/apps/native/src/components/ui/popover.tsx +0 -313
- package/2/apps/native/src/components/ui/primitives/index.ts +0 -38
- package/2/apps/native/src/components/ui/radio-group.tsx +0 -47
- package/2/apps/native/src/components/ui/searchbar.tsx +0 -118
- package/2/apps/native/src/components/ui/sheet.tsx +0 -93
- package/2/apps/native/src/components/ui/switch.tsx +0 -37
- package/2/apps/native/src/components/ui/table.tsx +0 -296
- package/2/apps/native/src/components/ui/tabs.tsx +0 -115
- package/2/apps/native/src/components/ui/toggle.tsx +0 -50
- package/2/apps/native/src/components/ui/utils.tsx +0 -34
- package/2/apps/native/src/components/ui/video.tsx +0 -39
- package/2/apps/native/src/core/analytics/analytics-service.ts +0 -94
- package/2/apps/native/src/core/analytics/index.ts +0 -2
- package/2/apps/native/src/core/analytics/posthog-analytics-adapter.ts +0 -192
- package/2/apps/native/src/core/auth/auth-service.ts +0 -33
- package/2/apps/native/src/core/auth/index.ts +0 -1
- package/2/apps/native/src/core/cache/__tests__/cache-service.test.ts +0 -599
- package/2/apps/native/src/core/cache/cache-service.ts +0 -89
- package/2/apps/native/src/core/cache/index.ts +0 -45
- package/2/apps/native/src/core/config/config.service.ts +0 -153
- package/2/apps/native/src/core/config/index.ts +0 -2
- package/2/apps/native/src/core/config/telemetry.ts +0 -38
- package/2/apps/native/src/core/local-notifications/local-notification-manager.ts +0 -409
- package/2/apps/native/src/core/logging/custom-transports.ts +0 -126
- package/2/apps/native/src/core/logging/index.ts +0 -1
- package/2/apps/native/src/core/logging/logger.ts +0 -182
- package/2/apps/native/src/core/navigation/deep-link-handler.ts +0 -295
- package/2/apps/native/src/core/navigation/navigation-types.ts +0 -53
- package/2/apps/native/src/core/payments/index.ts +0 -1
- package/2/apps/native/src/core/payments/payment-service.ts +0 -32
- package/2/apps/native/src/core/quick-actions/index.ts +0 -2
- package/2/apps/native/src/core/quick-actions/quick-actions-adapter.ts +0 -54
- package/2/apps/native/src/core/quick-actions/types.ts +0 -29
- package/2/apps/native/src/core/storage/index.ts +0 -1
- package/2/apps/native/src/core/storage/mmkv.ts +0 -62
- package/2/apps/native/src/core/storage/notification-storage.ts +0 -312
- package/2/apps/native/src/core/types/common.ts +0 -0
- package/2/apps/native/src/core/utils/convex-http-api.ts +0 -30
- package/2/apps/native/src/features/audio-recorder/components/audio-player.tsx +0 -301
- package/2/apps/native/src/features/audio-recorder/components/audio-recorder.tsx +0 -373
- package/2/apps/native/src/features/audio-recorder/components/audio-waveform.tsx +0 -270
- package/2/apps/native/src/features/audio-recorder/components/index.ts +0 -4
- package/2/apps/native/src/features/audio-recorder/components/recording-list.tsx +0 -89
- package/2/apps/native/src/features/audio-recorder/demo/audio-player-demo.tsx +0 -66
- package/2/apps/native/src/features/audio-recorder/demo/audio-recorder-cloud.tsx +0 -68
- package/2/apps/native/src/features/audio-recorder/demo/audio-recorder-interview.tsx +0 -102
- package/2/apps/native/src/features/audio-recorder/demo/basic.tsx +0 -27
- package/2/apps/native/src/features/audio-recorder/demo/index.ts +0 -5
- package/2/apps/native/src/features/audio-recorder/demo/with-recording-list-demo.tsx +0 -82
- package/2/apps/native/src/features/authentication/components/auth-watcher.tsx +0 -115
- package/2/apps/native/src/features/authentication/components/login-form.tsx +0 -85
- package/2/apps/native/src/features/authentication/services/__tests__/convex-auth.adapter.test.ts +0 -399
- package/2/apps/native/src/features/authentication/services/convex-auth.adapter.ts +0 -497
- package/2/apps/native/src/features/authentication/services/index.ts +0 -2
- package/2/apps/native/src/features/charts/README.md +0 -185
- package/2/apps/native/src/features/charts/app/preview.tsx +0 -226
- package/2/apps/native/src/features/charts/components/area-chart.tsx +0 -43
- package/2/apps/native/src/features/charts/components/bar-chart.tsx +0 -146
- package/2/apps/native/src/features/charts/components/candlestick-chart.tsx +0 -199
- package/2/apps/native/src/features/charts/components/chart-card.tsx +0 -68
- package/2/apps/native/src/features/charts/components/column-chart.tsx +0 -146
- package/2/apps/native/src/features/charts/components/doughnut-chart.tsx +0 -260
- package/2/apps/native/src/features/charts/components/index.ts +0 -13
- package/2/apps/native/src/features/charts/components/line-chart.tsx +0 -311
- package/2/apps/native/src/features/charts/components/radar-chart.tsx +0 -183
- package/2/apps/native/src/features/charts/components/radial-bar-chart.tsx +0 -191
- package/2/apps/native/src/features/charts/components/stacked-area-chart.tsx +0 -268
- package/2/apps/native/src/features/charts/components/stacked-bar-chart.tsx +0 -325
- package/2/apps/native/src/features/charts/data/mock-data.ts +0 -186
- package/2/apps/native/src/features/charts/types/index.ts +0 -69
- package/2/apps/native/src/features/chatbot/app/index.tsx +0 -303
- package/2/apps/native/src/features/chatbot/components/chat-header-buttons.tsx +0 -60
- package/2/apps/native/src/features/chatbot/components/chat-input-bar.tsx +0 -470
- package/2/apps/native/src/features/chatbot/components/chat-markdown.tsx +0 -576
- package/2/apps/native/src/features/chatbot/components/chat-message-bubble.tsx +0 -247
- package/2/apps/native/src/features/chatbot/components/chat-settings-modal.tsx +0 -162
- package/2/apps/native/src/features/chatbot/components/image-preview-list.tsx +0 -116
- package/2/apps/native/src/features/chatbot/components/markdown/code-block.tsx +0 -166
- package/2/apps/native/src/features/chatbot/components/markdown/index.ts +0 -11
- package/2/apps/native/src/features/chatbot/components/markdown/table-renderer.tsx +0 -130
- package/2/apps/native/src/features/chatbot/components/message-error-boundary.tsx +0 -79
- package/2/apps/native/src/features/chatbot/components/message-list.tsx +0 -174
- package/2/apps/native/src/features/chatbot/components/model-selector.tsx +0 -284
- package/2/apps/native/src/features/chatbot/components/report-content-modal.tsx +0 -189
- package/2/apps/native/src/features/chatbot/components/suggested-messages.tsx +0 -68
- package/2/apps/native/src/features/chatbot/constants/models.ts +0 -21
- package/2/apps/native/src/features/chatbot/constants/report-reasons.ts +0 -10
- package/2/apps/native/src/features/chatbot/hooks/use-attachment-cache.ts +0 -144
- package/2/apps/native/src/features/chatbot/hooks/use-chat-config.ts +0 -665
- package/2/apps/native/src/features/chatbot/hooks/use-chat-handlers.ts +0 -360
- package/2/apps/native/src/features/chatbot/hooks/use-chatbot-settings.ts +0 -90
- package/2/apps/native/src/features/chatbot/hooks/use-conversation.ts +0 -80
- package/2/apps/native/src/features/chatbot/hooks/use-image-picker.ts +0 -123
- package/2/apps/native/src/features/chatbot/hooks/use-keyboard-coordinator.ts +0 -162
- package/2/apps/native/src/features/chatbot/hooks/use-smart-scroll-manager.ts +0 -214
- package/2/apps/native/src/features/chatbot/models/index.ts +0 -87
- package/2/apps/native/src/features/chatbot/models/models.ts +0 -163
- package/2/apps/native/src/features/chatbot/models/providers.ts +0 -63
- package/2/apps/native/src/features/chatbot/models/types.ts +0 -41
- package/2/apps/native/src/features/chatbot/services/file-uploader.ts +0 -239
- package/2/apps/native/src/features/chatbot/services/message-handler-service.ts +0 -181
- package/2/apps/native/src/features/chatbot/types/index.ts +0 -61
- package/2/apps/native/src/features/chatbot/utils/chat-telemetry.ts +0 -92
- package/2/apps/native/src/features/image-generator/app/_layout.tsx +0 -26
- package/2/apps/native/src/features/image-generator/app/gallery.tsx +0 -217
- package/2/apps/native/src/features/image-generator/app/index.tsx +0 -237
- package/2/apps/native/src/features/image-generator/components/gallery-image.tsx +0 -25
- package/2/apps/native/src/features/image-generator/components/image-detail-modal.tsx +0 -215
- package/2/apps/native/src/features/image-generator/components/image-model-selector.tsx +0 -210
- package/2/apps/native/src/features/image-generator/components/image-placeholder.tsx +0 -26
- package/2/apps/native/src/features/image-generator/hooks/use-image-gallery.ts +0 -71
- package/2/apps/native/src/features/image-generator/hooks/use-image-generator-settings.ts +0 -152
- package/2/apps/native/src/features/image-generator/hooks/use-image-generator.ts +0 -93
- package/2/apps/native/src/features/image-generator/models/models.ts +0 -66
- package/2/apps/native/src/features/image-generator/services/image-gallery-service.ts +0 -98
- package/2/apps/native/src/features/image-generator/services/image-save-service.ts +0 -121
- package/2/apps/native/src/features/onboarding/analytics/index.ts +0 -9
- package/2/apps/native/src/features/onboarding/components/onboarding-with-analytics.tsx +0 -141
- package/2/apps/native/src/features/onboarding/components/onboarding.tsx +0 -173
- package/2/apps/native/src/features/onboarding/config/onboarding-flow-config.ts +0 -189
- package/2/apps/native/src/features/onboarding/demo-one/app/index.tsx +0 -43
- package/2/apps/native/src/features/onboarding/demo-one/data.ts +0 -32
- package/2/apps/native/src/features/onboarding/hooks/use-onboarding-analytics.ts +0 -323
- package/2/apps/native/src/features/onboarding/services/onboarding-analytics.ts +0 -432
- package/2/apps/native/src/features/payments/README.md +0 -200
- package/2/apps/native/src/features/payments/app/local-paywall.tsx +0 -194
- package/2/apps/native/src/features/payments/app/remote-paywall.tsx +0 -79
- package/2/apps/native/src/features/payments/components/payment-initializer.tsx +0 -95
- package/2/apps/native/src/features/payments/components/paywall-error-state.tsx +0 -60
- package/2/apps/native/src/features/payments/components/paywall-local-mode.tsx +0 -116
- package/2/apps/native/src/features/payments/components/paywall-product-card.tsx +0 -133
- package/2/apps/native/src/features/payments/components/paywall-remote-mode.tsx +0 -146
- package/2/apps/native/src/features/payments/hooks/use-entitlement.ts +0 -63
- package/2/apps/native/src/features/payments/index.ts +0 -8
- package/2/apps/native/src/features/payments/services/revenuecat-adapter.ts +0 -407
- package/2/apps/native/src/features/quick-actions/components/quick-actions-demo.tsx +0 -139
- package/2/apps/native/src/features/quick-actions/config/default-actions.ts +0 -83
- package/2/apps/native/src/features/quick-actions/hooks/use-quick-actions.ts +0 -45
- package/2/apps/native/src/features/quick-actions/index.ts +0 -4
- package/2/apps/native/src/features/quick-actions/utils/quick-actions-manager.ts +0 -105
- package/2/apps/native/src/features/quiz/components/question.tsx +0 -67
- package/2/apps/native/src/features/quiz/config.ts +0 -11
- package/2/apps/native/src/features/quiz/index.tsx +0 -133
- package/2/apps/native/src/features/settings/ui/debug-info.tsx +0 -75
- package/2/apps/native/src/features/settings/ui/dev-tools.tsx +0 -1
- package/2/apps/native/src/features/settings/ui/item.tsx +0 -45
- package/2/apps/native/src/features/settings/ui/items-container.tsx +0 -23
- package/2/apps/native/src/features/settings/ui/language-item.tsx +0 -52
- package/2/apps/native/src/features/settings/ui/notification-item.tsx +0 -59
- package/2/apps/native/src/features/settings/ui/theme-item.tsx +0 -45
- package/2/apps/native/src/features/tracker-app/app/index.tsx +0 -108
- package/2/apps/native/src/features/tracker-app/components/animated-number.tsx +0 -102
- package/2/apps/native/src/features/tracker-app/components/calorie-card.tsx +0 -66
- package/2/apps/native/src/features/tracker-app/components/circular-progress.tsx +0 -97
- package/2/apps/native/src/features/tracker-app/components/floating-add-button.tsx +0 -27
- package/2/apps/native/src/features/tracker-app/components/macro-card.tsx +0 -80
- package/2/apps/native/src/features/tracker-app/components/promo-banner.tsx +0 -98
- package/2/apps/native/src/features/tracker-app/components/recently-logged.tsx +0 -64
- package/2/apps/native/src/features/tracker-app/components/week-calendar.tsx +0 -68
- package/2/apps/native/src/features/vibefast-features.ts +0 -42
- package/2/apps/native/src/features/voice-bot/README.md +0 -185
- package/2/apps/native/src/features/voice-bot/components/conversation-status.tsx +0 -76
- package/2/apps/native/src/features/voice-bot/components/index.ts +0 -4
- package/2/apps/native/src/features/voice-bot/components/message-input.tsx +0 -98
- package/2/apps/native/src/features/voice-bot/components/voice-bot-screen.tsx +0 -173
- package/2/apps/native/src/features/voice-bot/components/voice-controls.tsx +0 -73
- package/2/apps/native/src/features/voice-bot/index.ts +0 -3
- package/2/apps/native/src/features/voice-bot/services/index.ts +0 -1
- package/2/apps/native/src/features/voice-bot/services/use-voice-bot.ts +0 -161
- package/2/apps/native/src/features/voice-bot/types.ts +0 -29
- package/2/apps/native/src/features/wake-word/components/index.ts +0 -1
- package/2/apps/native/src/features/wake-word/components/wake-word-indicator.tsx +0 -61
- package/2/apps/native/src/features/wake-word/constants.ts +0 -10
- package/2/apps/native/src/features/wake-word/hooks/use-wake-word.ts +0 -181
- package/2/apps/native/src/features/wake-word/index.ts +0 -22
- package/2/apps/native/src/features/wake-word/services/audio-session.ts +0 -40
- package/2/apps/native/src/features/wake-word/services/event-bus.ts +0 -31
- package/2/apps/native/src/features/wake-word/services/keywords.ts +0 -88
- package/2/apps/native/src/features/wake-word/services/wake-word-manager.ts +0 -249
- package/2/apps/native/src/features/wake-word/types.ts +0 -22
- package/2/apps/native/src/lib/env.js +0 -13
- package/2/apps/native/src/lib/hooks/index.tsx +0 -6
- package/2/apps/native/src/lib/hooks/use-device-identifier.tsx +0 -80
- package/2/apps/native/src/lib/hooks/use-gradual-animation.ts +0 -28
- package/2/apps/native/src/lib/hooks/use-is-first-time.tsx +0 -25
- package/2/apps/native/src/lib/hooks/use-navigation-analytics.ts +0 -44
- package/2/apps/native/src/lib/hooks/use-navigation-options.tsx +0 -87
- package/2/apps/native/src/lib/hooks/use-push-notifications.ts +0 -250
- package/2/apps/native/src/lib/hooks/use-responsive-size.tsx +0 -37
- package/2/apps/native/src/lib/hooks/use-selected-theme.tsx +0 -38
- package/2/apps/native/src/lib/hooks/use-viewport-lazy-loading.tsx +0 -124
- package/2/apps/native/src/lib/i18n/index.tsx +0 -30
- package/2/apps/native/src/lib/i18n/react-i18next.d.ts +0 -9
- package/2/apps/native/src/lib/i18n/resources.ts +0 -25
- package/2/apps/native/src/lib/i18n/types.ts +0 -23
- package/2/apps/native/src/lib/i18n/utils.tsx +0 -112
- package/2/apps/native/src/lib/index.tsx +0 -3
- package/2/apps/native/src/lib/state/auth-client-slice.ts +0 -34
- package/2/apps/native/src/lib/state/index.ts +0 -1
- package/2/apps/native/src/lib/storage.tsx +0 -7
- package/2/apps/native/src/lib/test-utils.tsx +0 -43
- package/2/apps/native/src/lib/use-theme-config.tsx +0 -108
- package/2/apps/native/src/lib/utils.ts +0 -29
- package/2/apps/native/src/polyfills.ts +0 -61
- package/2/apps/native/src/providers/convex-provider.tsx +0 -31
- package/2/apps/native/src/providers/index.tsx +0 -6
- package/2/apps/native/src/providers/notification-provider.tsx +0 -168
- package/2/apps/native/src/providers/posthog-provider.tsx +0 -47
- package/2/apps/native/src/providers/root-providers.tsx +0 -46
- package/2/apps/native/src/providers/sentry-provider.tsx +0 -62
- package/2/apps/native/src/providers/splash-screen-provider.tsx +0 -122
- package/2/apps/native/src/providers/theme-provider.tsx +0 -67
- package/2/apps/native/src/translations/ar.json +0 -394
- package/2/apps/native/src/translations/de.json +0 -394
- package/2/apps/native/src/translations/en.json +0 -394
- package/2/apps/native/src/translations/es.json +0 -394
- package/2/apps/native/src/translations/fr.json +0 -394
- package/2/apps/native/src/types/flash-list.d.ts +0 -3
- package/2/apps/native/src/types/index.ts +0 -3
- package/2/apps/native/src/types/react-native-reanimated.d.ts +0 -5
- package/2/apps/native/tailwind.config.js +0 -57
- package/2/apps/native/targets/widget/AppIntent.swift +0 -46
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-20x20@1x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-20x20@2x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-20x20@3x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-29x29@1x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-29x29@2x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-29x29@3x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-40x40@1x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-40x40@2x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-40x40@3x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-60x60@2x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-60x60@3x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-76x76@1x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-76x76@2x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-83.5x83.5@2x.png +0 -0
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -122
- package/2/apps/native/targets/widget/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png +0 -0
- package/2/apps/native/targets/widget/CalorieTrackerWidget.swift +0 -424
- package/2/apps/native/targets/widget/HabitTrackerWidget.swift +0 -305
- package/2/apps/native/targets/widget/Info.plist +0 -11
- package/2/apps/native/targets/widget/WidgetLiveActivity.swift +0 -75
- package/2/apps/native/targets/widget/expo-target.config.js +0 -10
- package/2/apps/native/targets/widget/generated.entitlements +0 -5
- package/2/apps/native/targets/widget/index.swift +0 -18
- package/2/apps/native/targets/widget/widgets.swift +0 -96
- package/2/apps/native/tsconfig.json +0 -88
- package/2/apps/native/vitest.config.mts +0 -14
- package/2/apps/web/README.md +0 -36
- package/2/apps/web/app/favicon.ico +0 -0
- package/2/apps/web/app/globals.css +0 -122
- package/2/apps/web/app/layout.tsx +0 -38
- package/2/apps/web/app/page.tsx +0 -35
- package/2/apps/web/app/users/page.tsx +0 -301
- package/2/apps/web/components/AdminDashboard.tsx +0 -336
- package/2/apps/web/components/AppleLogo.tsx +0 -15
- package/2/apps/web/components/GitHubLogo.tsx +0 -11
- package/2/apps/web/components/GoogleLogo.tsx +0 -23
- package/2/apps/web/components/Layout.tsx +0 -77
- package/2/apps/web/components/ThemeToggle.tsx +0 -23
- package/2/apps/web/components/UserMenu.tsx +0 -66
- package/2/apps/web/components/auth/CodeInput.tsx +0 -24
- package/2/apps/web/components/auth/ResetPasswordWithEmailCode.tsx +0 -85
- package/2/apps/web/components/auth/SignInFormEmailCode.tsx +0 -72
- package/2/apps/web/components/auth/SignInFormEmailLink.tsx +0 -81
- package/2/apps/web/components/auth/SignInFormPassword.tsx +0 -17
- package/2/apps/web/components/auth/SignInFormPasswordAndCustomField.tsx +0 -42
- package/2/apps/web/components/auth/SignInFormPasswordAndResetViaCode.tsx +0 -32
- package/2/apps/web/components/auth/SignInFormPasswordAndVerifyViaCode.tsx +0 -86
- package/2/apps/web/components/auth/SignInFormPhoneCode.tsx +0 -89
- package/2/apps/web/components/auth/SignInFormsShowcase.tsx +0 -64
- package/2/apps/web/components/auth/SignInMethodDivider.tsx +0 -17
- package/2/apps/web/components/auth/SignInWithEmailCode.tsx +0 -49
- package/2/apps/web/components/auth/SignInWithOAuth.tsx +0 -16
- package/2/apps/web/components/auth/SignInWithPassword.tsx +0 -100
- package/2/apps/web/components/auth/oauth/SignInWithApple.tsx +0 -27
- package/2/apps/web/components/auth/oauth/SignInWithGitHub.tsx +0 -27
- package/2/apps/web/components/auth/oauth/SignInWithGoogle.tsx +0 -27
- package/2/apps/web/components/ui/button.tsx +0 -60
- package/2/apps/web/components/ui/card.tsx +0 -92
- package/2/apps/web/components/ui/dialog.tsx +0 -143
- package/2/apps/web/components/ui/dropdown-menu.tsx +0 -257
- package/2/apps/web/components/ui/input-otp.tsx +0 -77
- package/2/apps/web/components/ui/input.tsx +0 -21
- package/2/apps/web/components/ui/skeleton.tsx +0 -13
- package/2/apps/web/components/ui/tabs.tsx +0 -66
- package/2/apps/web/components/ui/toast.tsx +0 -130
- package/2/apps/web/components/ui/toaster.tsx +0 -36
- package/2/apps/web/components/ui/toggle-group.tsx +0 -83
- package/2/apps/web/components/ui/toggle.tsx +0 -47
- package/2/apps/web/components/ui/use-toast.ts +0 -192
- package/2/apps/web/components.json +0 -22
- package/2/apps/web/eslint.config.mjs +0 -18
- package/2/apps/web/lib/convex-provider.tsx +0 -18
- package/2/apps/web/lib/utils.ts +0 -6
- package/2/apps/web/next.config.ts +0 -7
- package/2/apps/web/package.json +0 -46
- package/2/apps/web/postcss.config.mjs +0 -7
- package/2/apps/web/public/file.svg +0 -1
- package/2/apps/web/public/globe.svg +0 -1
- package/2/apps/web/public/next.svg +0 -1
- package/2/apps/web/public/vercel.svg +0 -1
- package/2/apps/web/public/window.svg +0 -1
- package/2/apps/web/tsconfig.json +0 -34
- package/2/bts.jsonc +0 -21
- package/2/commitlint.config.js +0 -1
- package/2/eslint.config.mjs +0 -182
- package/2/lint-staged.config.js +0 -16
- package/2/package.json +0 -64
- package/2/packages/backend/.env.example +0 -20
- package/2/packages/backend/convex/README.md +0 -90
- package/2/packages/backend/convex/_generated/api.d.ts +0 -2599
- package/2/packages/backend/convex/_generated/api.js +0 -23
- package/2/packages/backend/convex/_generated/dataModel.d.ts +0 -60
- package/2/packages/backend/convex/_generated/server.d.ts +0 -149
- package/2/packages/backend/convex/_generated/server.js +0 -90
- package/2/packages/backend/convex/agents.ts +0 -116
- package/2/packages/backend/convex/auth.config.ts +0 -8
- package/2/packages/backend/convex/auth.ts +0 -103
- package/2/packages/backend/convex/authCustomEmailOtpProvider.ts +0 -175
- package/2/packages/backend/convex/authOtp.ts +0 -144
- package/2/packages/backend/convex/authPasswordReset.ts +0 -367
- package/2/packages/backend/convex/authPasswordResetActions.ts +0 -150
- package/2/packages/backend/convex/chatbot/index.ts +0 -30
- package/2/packages/backend/convex/chatbotAgent.ts +0 -1085
- package/2/packages/backend/convex/chatbotHistory.ts +0 -307
- package/2/packages/backend/convex/convex.config.ts +0 -13
- package/2/packages/backend/convex/deviceGrants.ts +0 -58
- package/2/packages/backend/convex/grantFunctions.ts +0 -444
- package/2/packages/backend/convex/http.ts +0 -8
- package/2/packages/backend/convex/imageGeneration/index.ts +0 -12
- package/2/packages/backend/convex/imageGeneratorFunctions.ts +0 -290
- package/2/packages/backend/convex/lib/ai/analysisConfigs.ts +0 -257
- package/2/packages/backend/convex/lib/ai/config.ts +0 -71
- package/2/packages/backend/convex/lib/ai/geminiAdapter.ts +0 -43
- package/2/packages/backend/convex/lib/ai/openaiAdapter.ts +0 -43
- package/2/packages/backend/convex/lib/ai/schemas.ts +0 -79
- package/2/packages/backend/convex/lib/config.ts +0 -111
- package/2/packages/backend/convex/lib/rateLimit.ts +0 -100
- package/2/packages/backend/convex/lib/telemetry.ts +0 -29
- package/2/packages/backend/convex/paymentFunctions.ts +0 -119
- package/2/packages/backend/convex/payments/index.ts +0 -13
- package/2/packages/backend/convex/pushNotificationFunctions.ts +0 -342
- package/2/packages/backend/convex/ragKnowledge.ts +0 -714
- package/2/packages/backend/convex/rateLimit.ts +0 -13
- package/2/packages/backend/convex/recordingFunctions.ts +0 -98
- package/2/packages/backend/convex/reportFunctions.ts +0 -344
- package/2/packages/backend/convex/reporting/index.ts +0 -9
- package/2/packages/backend/convex/router.ts +0 -81
- package/2/packages/backend/convex/schema.ts +0 -237
- package/2/packages/backend/convex/shared/email.ts +0 -172
- package/2/packages/backend/convex/shared/files.ts +0 -96
- package/2/packages/backend/convex/shared/index.ts +0 -17
- package/2/packages/backend/convex/shared/templates/PasswordResetEmail.tsx +0 -72
- package/2/packages/backend/convex/shared/templates/VerificationCodeEmail.tsx +0 -65
- package/2/packages/backend/convex/sharedUsers.ts +0 -48
- package/2/packages/backend/convex/tools/index.ts +0 -18
- package/2/packages/backend/convex/tools/knowledgeRetrieval.ts +0 -92
- package/2/packages/backend/convex/tools/tavilySearch.ts +0 -83
- package/2/packages/backend/convex/tools/userProfile.ts +0 -72
- package/2/packages/backend/convex/tsconfig.json +0 -25
- package/2/packages/backend/convex/users.ts +0 -54
- package/2/packages/backend/index.ts +0 -20
- package/2/packages/backend/package.json +0 -32
- package/2/packages/ui/README.md +0 -63
- package/2/packages/ui/index.ts +0 -1
- package/2/packages/ui/package.json +0 -21
- package/2/packages/ui/src/components/SharedButton.tsx +0 -31
- package/2/packages/ui/src/components/SharedCard.tsx +0 -48
- package/2/packages/ui/src/components/index.ts +0 -2
- package/2/packages/ui/tsconfig.json +0 -10
- package/2/pnpm-lock.yaml +0 -23292
- package/2/pnpm-workspace.yaml +0 -3
- package/2/scripts/i18next-syntax-validation.js +0 -1
- package/2/tsconfig.json +0 -43
- package/2/turbo.json +0 -33
- package/2/vercel.json +0 -6
- package/2/vf-agent/agent-teams/team-vibefast.yaml +0 -14
- package/2/vf-agent/agents/analyst.md +0 -53
- package/2/vf-agent/agents/architect.md +0 -105
- package/2/vf-agent/agents/dev.md +0 -40
- package/2/vf-agent/agents/orchestrator.md +0 -181
- package/2/vf-agent/agents/pm.md +0 -48
- package/2/vf-agent/agents/po.md +0 -38
- package/2/vf-agent/agents/qa.md +0 -30
- package/2/vf-agent/agents/sm.md +0 -38
- package/2/vf-agent/agents/ux-expert.md +0 -33
- package/2/vf-agent/checklists/po-master-checklist.md +0 -73
- package/2/vf-agent/checklists/story-dod-checklist.md +0 -37
- package/2/vf-agent/core-config.yaml +0 -43
- package/2/vf-agent/data/knowledge_base/backend/convex-advanced.md +0 -43
- package/2/vf-agent/data/knowledge_base/backend/convex-database.md +0 -53
- package/2/vf-agent/data/knowledge_base/backend/convex-main.md +0 -65
- package/2/vf-agent/data/knowledge_base/backend/full-guidelines.md +0 -795
- package/2/vf-agent/data/knowledge_base/coding-standards.md +0 -253
- package/2/vf-agent/data/knowledge_base/frontend/full-guidelines.md +0 -254
- package/2/vf-agent/data/knowledge_base/frontend/image-handling.md +0 -48
- package/2/vf-agent/data/knowledge_base/frontend/react-native-main.md +0 -24
- package/2/vf-agent/data/knowledge_base/frontend/ui-and-styling.md +0 -169
- package/2/vf-agent/data/knowledge_base/general-principles.md +0 -26
- package/2/vf-agent/data/knowledge_base/master-rulebook.md +0 -42
- package/2/vf-agent/data/knowledge_base/starter-docs/audio-recorder-reference.md +0 -98
- package/2/vf-agent/data/knowledge_base/starter-docs/authentication-reference.md +0 -155
- package/2/vf-agent/data/knowledge_base/starter-docs/charts-reference.md +0 -149
- package/2/vf-agent/data/knowledge_base/starter-docs/chatbot-reference.md +0 -123
- package/2/vf-agent/data/knowledge_base/starter-docs/feature-reference-index.md +0 -211
- package/2/vf-agent/data/knowledge_base/starter-docs/features-overview.md +0 -221
- package/2/vf-agent/data/knowledge_base/starter-docs/image-analyzer-reference.md +0 -118
- package/2/vf-agent/data/knowledge_base/starter-docs/image-generator-reference.md +0 -110
- package/2/vf-agent/data/knowledge_base/starter-docs/index.md +0 -28
- package/2/vf-agent/data/knowledge_base/starter-docs/onboarding-reference.md +0 -96
- package/2/vf-agent/data/knowledge_base/starter-docs/payments-reference.md +0 -148
- package/2/vf-agent/data/knowledge_base/starter-docs/prd.md +0 -82
- package/2/vf-agent/data/knowledge_base/starter-docs/push-notifications-reference.md +0 -453
- package/2/vf-agent/data/knowledge_base/starter-docs/quick-actions-reference.md +0 -253
- package/2/vf-agent/data/knowledge_base/starter-docs/quiz-reference.md +0 -169
- package/2/vf-agent/data/knowledge_base/starter-docs/settings-reference.md +0 -146
- package/2/vf-agent/data/knowledge_base/starter-docs/tech-stack.md +0 -159
- package/2/vf-agent/data/knowledge_base/starter-docs/tracker-app-reference.md +0 -150
- package/2/vf-agent/data/knowledge_base/starter-docs/unified-project-structure.md +0 -98
- package/2/vf-agent/data/knowledge_base/testing/backend-testing.md +0 -54
- package/2/vf-agent/data/knowledge_base/testing/frontend-testing.md +0 -71
- package/2/vf-agent/data/knowledge_base/testing/testing-strategy.md +0 -31
- package/2/vf-agent/tasks/advanced-elicitation.md +0 -117
- package/2/vf-agent/tasks/brownfield-create-epic.md +0 -160
- package/2/vf-agent/tasks/create-deep-research-prompt.md +0 -278
- package/2/vf-agent/tasks/create-doc.md +0 -42
- package/2/vf-agent/tasks/create-story.md +0 -43
- package/2/vf-agent/tasks/document-project.md +0 -343
- package/2/vf-agent/tasks/facilitate-brainstorming-session.md +0 -136
- package/2/vf-agent/tasks/index-docs.md +0 -173
- package/2/vf-agent/tasks/kb-mode-interaction.md +0 -75
- package/2/vf-agent/tasks/review-story.md +0 -154
- package/2/vf-agent/tasks/shard-doc.md +0 -185
- package/2/vf-agent/tasks/troubleshoot-issue.md +0 -65
- package/2/vf-agent/tasks/validate-next-story.md +0 -47
- package/2/vf-agent/templates/brainstorming-output-tmpl.yaml +0 -156
- package/2/vf-agent/templates/brownfield-architecture-tmpl.yaml +0 -111
- package/2/vf-agent/templates/brownfield-prd-tmpl.yaml +0 -247
- package/2/vf-agent/templates/competitor-analysis-tmpl.yaml +0 -293
- package/2/vf-agent/templates/market-research-tmpl.yaml +0 -252
- package/2/vf-agent/templates/project-brief-tmpl.yaml +0 -221
- package/2/vf-agent/templates/story-tmpl.yaml +0 -143
- package/recipes/0/apps/native/src/components/advanced-ui/timeline/demo.tsx +0 -444
- package/recipes/0/apps/native/src/components/advanced-ui/timeline/timeline-view.tsx +0 -355
- package/recipes/0/apps/native/src/components/advanced-ui/timeline/types.ts +0 -31
- package/recipes/wake-word/scripts/download-vosk-model.mjs +0 -121
- /package/{2 → recipes/animated-chip}/apps/native/src/components/advanced-ui/chip/animated-chip.tsx +0 -0
- /package/{2 → recipes/animated-chip}/apps/native/src/components/advanced-ui/chip/chip.tsx +0 -0
- /package/{2 → recipes/animated-chip}/apps/native/src/components/advanced-ui/chip/demo.tsx +0 -0
- /package/{2 → recipes/animated-chip}/apps/native/src/components/advanced-ui/chip/types.ts +0 -0
- /package/{2 → recipes/animated-switch}/apps/native/src/components/advanced-ui/switch/animated-switch.tsx +0 -0
- /package/{2 → recipes/animated-switch}/apps/native/src/components/advanced-ui/switch/demo.tsx +0 -0
- /package/{2 → recipes/animated-switch}/apps/native/src/components/advanced-ui/switch/types.ts +0 -0
- /package/{2 → recipes/glowing-button}/apps/native/src/components/advanced-ui/buttons/demo.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/assets/features/image-analyzer/front.jpg +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/assets/features/image-analyzer/side.jpg +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/assets/features/image-analyzer/threeQuarter.jpg +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/api-client/image-analyzer.ts +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/app/(root)/(protected)/analysis/[type]/_layout.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/app/(root)/(protected)/analysis/[type]/analysis-options.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/app/(root)/(protected)/analysis/[type]/camera.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/app/(root)/(protected)/analysis/[type]/index.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/app/(root)/(protected)/analysis/[type]/loading.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/app/(root)/(protected)/analysis/[type]/results.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/app/(root)/(protected)/analysis/[type]/trait-details.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/app/analysis-options-screen.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/app/camera.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/app/image-capture-screen.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/app/loading-screen.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/app/loading.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/app/results.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/app/trait-details.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/app/use-analysis-data.ts +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/app/use-results-screen.ts +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/achievement-badge.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/achievement-card.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/achievement-unlocked-modal.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/achievements-section.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/advice-list.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/circular-progress.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/content-card.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/error-state.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/index.ts +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/loading-state.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/profile-image.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/results-header.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/score-display.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/share-options-modal.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/components/results/traits-grid.tsx +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/config/analysis-config.ts +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/config/master-analysis-config.ts +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/hooks/index.ts +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/hooks/use-analysis.ts +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/hooks/use-image-analysis.ts +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/services/analysis-service.ts +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/services/share-service.ts +0 -0
- /package/{2 → recipes/image-analysis}/apps/native/src/features/image-analyzer/services/trait-details-service.ts +0 -0
- /package/{2 → recipes/image-analysis}/packages/backend/convex/imageAnalysis/index.ts +0 -0
- /package/{2 → recipes/image-analysis}/packages/backend/convex/imageAnalysisFunctions.ts +0 -0
- /package/{2 → recipes/image-analysis}/packages/backend/convex/lib/ai/imageAnalysisAdapter.ts +0 -0
- /package/{2 → recipes/number-stepper}/apps/native/src/components/advanced-ui/stepper/children/button/stepper-button.tsx +0 -0
- /package/{2 → recipes/number-stepper}/apps/native/src/components/advanced-ui/stepper/children/button/types.ts +0 -0
- /package/{2 → recipes/number-stepper}/apps/native/src/components/advanced-ui/stepper/children/content/stepper-content.tsx +0 -0
- /package/{2 → recipes/number-stepper}/apps/native/src/components/advanced-ui/stepper/children/content/types.ts +0 -0
- /package/{2 → recipes/number-stepper}/apps/native/src/components/advanced-ui/stepper/children/value/stepper-value.tsx +0 -0
- /package/{2 → recipes/number-stepper}/apps/native/src/components/advanced-ui/stepper/children/value/types.ts +0 -0
- /package/{2 → recipes/number-stepper}/apps/native/src/components/advanced-ui/stepper/context/stepper-context.ts +0 -0
- /package/{2 → recipes/number-stepper}/apps/native/src/components/advanced-ui/stepper/context/types.ts +0 -0
- /package/{2 → recipes/number-stepper}/apps/native/src/components/advanced-ui/stepper/demo.tsx +0 -0
- /package/{2 → recipes/number-stepper}/apps/native/src/components/advanced-ui/stepper/index.ts +0 -0
- /package/{2 → recipes/number-stepper}/apps/native/src/components/advanced-ui/stepper/stepper.tsx +0 -0
- /package/{2 → recipes/number-stepper}/apps/native/src/components/advanced-ui/stepper/types.ts +0 -0
- /package/{2 → recipes/progress-circle}/apps/native/src/components/advanced-ui/progress-bars/animated-progress-bar.tsx +0 -0
- /package/{2 → recipes/progress-circle}/apps/native/src/components/advanced-ui/progress-bars/dropdown-picker-page.tsx +0 -0
- /package/{2 → recipes/progress-circle}/apps/native/src/components/advanced-ui/progress-bars/progress-circle-page.tsx +0 -0
- /package/{2 → recipes/progress-circle}/apps/native/src/components/advanced-ui/progress-bars/progress-circle.tsx +0 -0
- /package/{2 → recipes/swipe-slider}/apps/native/src/components/advanced-ui/sliders/swipe-slider-page.tsx +0 -0
- /package/{2 → recipes/swipe-slider}/apps/native/src/components/advanced-ui/sliders/swipe-slider.tsx +0 -0
- /package/{2 → recipes/timeline}/apps/native/src/components/advanced-ui/timeline/demo.tsx +0 -0
- /package/{2 → recipes/timeline}/apps/native/src/components/advanced-ui/timeline/timeline-view.tsx +0 -0
- /package/{2 → recipes/timeline}/apps/native/src/components/advanced-ui/timeline/types.ts +0 -0
- /package/{2 → recipes/wake-word}/apps/native/scripts/download-vosk-model.mjs +0 -0
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
# Coding Standards and Conventions
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
This document specifies the coding standards, formatting guidelines, and best practices that all developers (human and AI) MUST follow when contributing to the VibeFast project. Adherence to these standards is enforced through linting, pre-commit hooks, and CI workflows. Unless noted otherwise, frontend paths are relative to `apps/native/src/` and backend paths are relative to `packages/backend/convex/`.
|
|
6
|
-
|
|
7
|
-
## 1. General Principles & Philosophy
|
|
8
|
-
|
|
9
|
-
- **Modularity & DRY:** Prioritize iteration and modularization over code duplication. Components and services should be reusable and maintainable.
|
|
10
|
-
- **Clarity over Cleverness:** Write concise, readable, and technically sound TypeScript code.
|
|
11
|
-
- **Functional & Declarative:** Strongly prefer functional components (React) and declarative programming patterns. Avoid classes.
|
|
12
|
-
- **Abstraction:** External SDKs or vendor-specific logic (e.g., RevenueCat, AI providers) **MUST** be accessed only through adapter layers or dedicated service implementations. Core application logic should interact with our defined interfaces, not directly with vendor SDKs.
|
|
13
|
-
- **Absolute Imports:** **MUST use absolute imports** for all files within `apps/native/src/` (e.g., `import { Button } from '@/components/ui';`). This is configured in the root `tsconfig.json` and Expo/Babel config. Frontend code imports Convex generated helpers via `@vibefast/backend/_generated/...` instead of deep relative paths.
|
|
14
|
-
|
|
15
|
-
## 2. File & Naming Conventions
|
|
16
|
-
|
|
17
|
-
This project uses two different filename casing conventions depending on the location. This is strictly enforced by ESLint.
|
|
18
|
-
|
|
19
|
-
- **Frontend (`apps/native/src/`):** All files and directories MUST use **`kebab-case`**.
|
|
20
|
-
- _Example:_ `apps/native/src/features/image-analyzer/components/results-header.tsx`
|
|
21
|
-
|
|
22
|
-
- **Backend (`packages/backend/convex/`):** All files and directories MUST use **`camelCase`**.
|
|
23
|
-
- _Example:_ `packages/backend/convex/imageAnalysisFunctions.ts`
|
|
24
|
-
|
|
25
|
-
- **Components (React):** Component functions and filenames MUST use **`PascalCase`**.
|
|
26
|
-
- _Example:_ `const MyComponent = () => ...;` in `MyComponent.tsx`
|
|
27
|
-
|
|
28
|
-
- **Variables & Functions:** Use **`camelCase`**.
|
|
29
|
-
- **Types & Interfaces:** Use **`PascalCase`**.
|
|
30
|
-
- **Constants:** Use **`UPPER_SNAKE_CASE`** for constant values.
|
|
31
|
-
|
|
32
|
-
## 3. Frontend Development Standards (React Native)
|
|
33
|
-
|
|
34
|
-
### 3.1. UI & Styling (NativeWind)
|
|
35
|
-
|
|
36
|
-
- **NativeWind:** This is the primary styling solution. Use semantic utility classes (e.g., `bg-primary`, `text-base`). Avoid inline styles unless absolutely necessary for dynamic properties.
|
|
37
|
-
- **Core UI Components:** You **MUST** use the built-in UI components from `apps/native/src/components/ui/` (accessible via `@/components/ui`) as the base for all UIs to ensure consistency.
|
|
38
|
-
|
|
39
|
-
#### 3.1.1. Button Component Usage (CRITICAL)
|
|
40
|
-
|
|
41
|
-
- **Button Text:** The `Button` component from `@/components/ui` has a `label` prop for button text. **NEVER** put `<Text>` elements as children of `Button`.
|
|
42
|
-
|
|
43
|
-
```tsx
|
|
44
|
-
// ✅ CORRECT
|
|
45
|
-
<Button label="Click Me" onPress={handlePress} />
|
|
46
|
-
|
|
47
|
-
// ❌ WRONG - Never do this
|
|
48
|
-
<Button onPress={handlePress}>
|
|
49
|
-
<Text>Click Me</Text>
|
|
50
|
-
</Button>
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
- **Complex Button Content:** If you need more than simple text (icons, multiple text elements, complex layouts), use `Pressable` from `@/components/ui` instead of `Button`.
|
|
54
|
-
|
|
55
|
-
```tsx
|
|
56
|
-
// ✅ CORRECT for complex content
|
|
57
|
-
<Pressable onPress={handlePress} className="flex-row items-center p-4">
|
|
58
|
-
<Icon name="star" />
|
|
59
|
-
<Text>Complex Button</Text>
|
|
60
|
-
<Text className="text-sm text-neutral-500">Subtitle</Text>
|
|
61
|
-
</Pressable>
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
- **Button vs Pressable Decision:**
|
|
65
|
-
- Use `Button` for simple, single-label actions
|
|
66
|
-
- Use `Pressable` for complex layouts, multiple text elements, or custom designs
|
|
67
|
-
|
|
68
|
-
- **Accessibility (A11y):** All interactive components MUST have appropriate `accessibilityRole`, `accessibilityLabel`, and `accessibilityState` props.
|
|
69
|
-
- **Spacing:** Use `gap-x` and `gap-y` for spacing between elements instead of `space-x` and `space-y`. The latter may not always work as expected.
|
|
70
|
-
- **Grid Layouts:** If `grid` does not work in NativeWind, use other layout techniques like flexbox to achieve the desired design.
|
|
71
|
-
|
|
72
|
-
#### 3.1.2. Theme Color Usage (CRITICAL)
|
|
73
|
-
|
|
74
|
-
- **NEVER** use hardcoded color names like `emerald`, `blue`, `red`, `green`, etc. for primary theme colors, use them only when appropriate and aren't being used as theme colors.
|
|
75
|
-
- **ALWAYS** use semantic theme color classes that reference the app's design system
|
|
76
|
-
- **Primary Theme Colors:** Use `text-primary`, `bg-primary`, `border-primary` for main brand colors
|
|
77
|
-
- **Semantic Colors:** Use intensity-based classes like `text-primary-500`, `bg-primary-400`, `border-primary-600`
|
|
78
|
-
|
|
79
|
-
```tsx
|
|
80
|
-
// ✅ CORRECT - Using theme colors
|
|
81
|
-
<Text className="text-primary">Primary text</Text>
|
|
82
|
-
<View className="bg-primary-500">Primary background</View>
|
|
83
|
-
<Button className="bg-primary text-primary-foreground">Primary button</Button>
|
|
84
|
-
|
|
85
|
-
// ❌ WRONG - Hardcoded colors
|
|
86
|
-
<Text className="text-emerald-600">Primary text</Text>
|
|
87
|
-
<View className="bg-emerald-500">Primary background</View>
|
|
88
|
-
<Button className="bg-emerald-600 text-white">Primary button</Button>
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### 3.2. State Management
|
|
92
|
-
|
|
93
|
-
- **Convex React Hooks (`useQuery`, `useMutation`):** The primary tool for server state and backend interactions.
|
|
94
|
-
- **Zustand:** Used for global, client-side UI state only (e.g., theme, global notifications).
|
|
95
|
-
- **Local Component State (`useState`):** The default for UI state that is confined to a single component.
|
|
96
|
-
|
|
97
|
-
## 4. Backend Development Standards (Convex)
|
|
98
|
-
|
|
99
|
-
### 4.1. Function Definitions
|
|
100
|
-
|
|
101
|
-
- **Syntax:** ALWAYS use the new function syntax (e.g., `export const f = query({...});`).
|
|
102
|
-
|
|
103
|
-
- **Visibility:** Use `query`, `mutation`, `action` for public API functions. Use `internalQuery`, `internalMutation`, `internalAction` for private functions that should not be callable from the client.
|
|
104
|
-
|
|
105
|
-
- **Validators:** **ALWAYS** include argument (`args`) and return type (`returns`) validators for **ALL** Convex functions. For functions with no explicit return, use `returns: v.null()`.
|
|
106
|
-
|
|
107
|
-
- **Node.js Actions:** For actions requiring Node.js-specific modules (e.g., `crypto`), add `"use node";` as the absolute first line of the file.
|
|
108
|
-
|
|
109
|
-
- Use `getAuthUserId` for getting user ID, not `identity.subject`:
|
|
110
|
-
|
|
111
|
-
```ts
|
|
112
|
-
import { getAuthUserId } from '@convex-dev/auth/server';
|
|
113
|
-
const userId = await getAuthUserId(ctx);
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### 4.2. Schema & Database
|
|
117
|
-
|
|
118
|
-
- **Schema Definition:** The single source of truth for the database schema is `packages/backend/convex/schema.ts`.
|
|
119
|
-
- **Querying:**
|
|
120
|
-
- Do **NOT** use `.filter()` in queries. Define an index in `schema.ts` and use `.withIndex()` for efficient data retrieval.
|
|
121
|
-
- Use `.unique()` to get a single document. It will throw an error if multiple documents match.
|
|
122
|
-
|
|
123
|
-
- **Mutations:**
|
|
124
|
-
- Use `ctx.db.patch` for shallow-merging updates into a document.
|
|
125
|
-
- Use `ctx.db.replace` to completely replace a document.
|
|
126
|
-
|
|
127
|
-
### 4.3. HTTP Endpoints
|
|
128
|
-
|
|
129
|
-
- **Definition:** HTTP endpoints are defined in `packages/backend/convex/http.ts` and exposed via `packages/backend/convex/router.ts`.
|
|
130
|
-
- **Authentication:** All `httpAction`s that require user authentication MUST validate the session using `await ctx.auth.getUserIdentity();`. If the identity is `null`, the action must return a `401 Unauthorized` response.
|
|
131
|
-
|
|
132
|
-
## 5. Testing Standards
|
|
133
|
-
|
|
134
|
-
- **Frontend (Jest + RNTL):** Write unit tests for utilities, complex components, and core services. Test files must be co-located with the source and named `*.test.ts(x)`.
|
|
135
|
-
- **Backend (Vitest):** Write unit tests for all Convex functions containing business logic. Tests are run via the `pnpm test:backend` script.
|
|
136
|
-
- **E2E (Maestro):** Add `testID` props to key elements to support end-to-end testing flows.
|
|
137
|
-
|
|
138
|
-
## 6. Git & Commit Standards
|
|
139
|
-
|
|
140
|
-
- **Commit Messages:** Follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification (e.g., `feat:`, `fix:`, `chore:`). This is enforced by `commitlint`.
|
|
141
|
-
- **Branching:** Direct commits to `main` or `master` are disallowed by pre-commit hooks. All work should be done on feature branches.
|
|
142
|
-
|
|
143
|
-
## 7. Code Quality Rules
|
|
144
|
-
|
|
145
|
-
### 7.1 React Patterns
|
|
146
|
-
|
|
147
|
-
- Always place React hooks (`useState`, `useEffect`, etc.) at the top of components, before any conditional returns.
|
|
148
|
-
- For JSX text content containing special characters (like >, <, ', "), always use template literals with backticks: {``} to include the string directly, rather than using HTML entities (e.g., ", >). Example: {`This string has special characters and doesn't give errors like ' > <`}
|
|
149
|
-
|
|
150
|
-
- Never call hooks conditionally or after early returns.
|
|
151
|
-
|
|
152
|
-
### 7.2 Import Patterns
|
|
153
|
-
|
|
154
|
-
- Check for duplicate imports in the same import statement.
|
|
155
|
-
- Consolidate multiple imports from the same module into a single import statement.
|
|
156
|
-
|
|
157
|
-
### 7.3 TypeScript Patterns
|
|
158
|
-
|
|
159
|
-
- Run TypeScript compilation check before considering implementation complete.
|
|
160
|
-
- Address all TypeScript errors before proceeding to the next task.
|
|
161
|
-
|
|
162
|
-
### 7.4 Linting Patterns
|
|
163
|
-
|
|
164
|
-
- Use template literals with backticks (`{``}`) for special characters in JSX text content.
|
|
165
|
-
- Follow React hooks rules strictly — hooks must be called in the same order every render.
|
|
166
|
-
|
|
167
|
-
### 7.5 Critical UI Component Patterns (MUST READ BEFORE CODING)
|
|
168
|
-
|
|
169
|
-
#### Button Component Usage
|
|
170
|
-
|
|
171
|
-
- **NEVER** use `<Text>` as children of `<Button>` component
|
|
172
|
-
- **ALWAYS** use the `label` prop for button text
|
|
173
|
-
- **Example:**
|
|
174
|
-
|
|
175
|
-
```tsx
|
|
176
|
-
// ✅ CORRECT
|
|
177
|
-
<Button label="Save Changes" onPress={handleSave} />
|
|
178
|
-
|
|
179
|
-
// ❌ WRONG - This violates our standards
|
|
180
|
-
<Button onPress={handleSave}>
|
|
181
|
-
<Text>Save Changes</Text>
|
|
182
|
-
</Button>
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
#### When to Use Button vs Pressable
|
|
186
|
-
|
|
187
|
-
- **Use Button:** For simple, single-text actions with our design system styling
|
|
188
|
-
- **Use Pressable:** For complex layouts, multiple text elements, icons with text, or custom designs
|
|
189
|
-
- **Example of Pressable usage:**
|
|
190
|
-
```tsx
|
|
191
|
-
<Pressable onPress={handlePress} className="flex-row items-center gap-2 p-4">
|
|
192
|
-
<Icon name="star" />
|
|
193
|
-
<View>
|
|
194
|
-
<Text className="font-semibold">Primary Text</Text>
|
|
195
|
-
<Text className="text-sm text-neutral-500">Secondary text</Text>
|
|
196
|
-
</View>
|
|
197
|
-
</Pressable>
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
#### Button Layout Rules (CRITICAL)
|
|
201
|
-
|
|
202
|
-
- **Single Row Layout:** ONLY use `flex-row` for multiple buttons when button text is SHORT (1-2 words max)
|
|
203
|
-
- **Vertical Stack Layout:** ALWAYS use vertical stacking (`gap-4` in parent View) when button text is LONG (3+ words)
|
|
204
|
-
- **Example of CORRECT button layouts:**
|
|
205
|
-
|
|
206
|
-
```tsx
|
|
207
|
-
// ✅ CORRECT - Short text, can use flex-row
|
|
208
|
-
<View className="flex-row gap-4">
|
|
209
|
-
<Button label="Save" onPress={handleSave} className="flex-1" />
|
|
210
|
-
<Button label="Cancel" onPress={handleCancel} className="flex-1" />
|
|
211
|
-
</View>
|
|
212
|
-
|
|
213
|
-
// ✅ CORRECT - Long text, use vertical stack
|
|
214
|
-
<View className="gap-4">
|
|
215
|
-
<Button label="Start Conversation" onPress={handleStart} />
|
|
216
|
-
<Button label="End Conversation" onPress={handleEnd} />
|
|
217
|
-
</View>
|
|
218
|
-
|
|
219
|
-
// ❌ WRONG - Long text in flex-row causes truncation
|
|
220
|
-
<View className="flex-row gap-4">
|
|
221
|
-
<Button label="Start Conversation" onPress={handleStart} className="flex-1" />
|
|
222
|
-
<Button label="End Conversation" onPress={handleEnd} className="flex-1" />
|
|
223
|
-
</View>
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
### 7.6 Logging & Error Reporting (CRITICAL)
|
|
227
|
-
|
|
228
|
-
- Use the core logger API from `@/core/logging` — never use `console.*` in app code under `apps/native/src/**`.
|
|
229
|
-
- Allowed exceptions: test files and explicit debug utilities under `apps/native/src/components/ui/extras/debug-*`.
|
|
230
|
-
- Always include a `feature` tag in the logging context to categorize events (e.g., `auth.login`, `notifications.register`, `chatbot.file_upload`, `convex.http`).
|
|
231
|
-
- Pass an `Error` object to `error()` whenever available to preserve stack traces: `error(err, { feature, ... })`.
|
|
232
|
-
- Prefer `handleError()` from `@/components/ui` for user-visible failures; it logs using the core logger and shows a toast. Avoid duplicating logs when `handleError` is used — only add additional `info` when it adds necessary context.
|
|
233
|
-
- Avoid logging PII. Truncate or hash sensitive values (e.g., use token prefixes), or redact via a custom transport in `apps/native/src/core/logging/custom-transports.ts`.
|
|
234
|
-
|
|
235
|
-
Examples:
|
|
236
|
-
|
|
237
|
-
```ts
|
|
238
|
-
import { info, warn, error, debug } from '@/core/logging';
|
|
239
|
-
import { handleError } from '@/components/ui';
|
|
240
|
-
|
|
241
|
-
info('Push token recorded', { feature: 'notifications.register', tokenPrefix });
|
|
242
|
-
warn('Retrying upload', { feature: 'chatbot.file_upload', attempt });
|
|
243
|
-
error(new Error('Missing config'), { feature: 'convex.http' });
|
|
244
|
-
|
|
245
|
-
try {
|
|
246
|
-
await doThing();
|
|
247
|
-
} catch (err) {
|
|
248
|
-
handleError(err, {
|
|
249
|
-
feature: 'settings.share',
|
|
250
|
-
fallbackMessage: 'Unable to share app',
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
```
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description:
|
|
3
|
-
globs:
|
|
4
|
-
alwaysApply: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# **Developer & AI Agent Coding Guidelines**
|
|
8
|
-
|
|
9
|
-
**You are an expert Full Stack Developer specializing in TypeScript, React Native, Expo, NativeWind, and Convex.** Your primary goal is to write clean, maintainable, modular, and performant code adhering to the architectural decisions and guidelines for the "vibefast" starter kit.
|
|
10
|
-
|
|
11
|
-
**Every time you choose to apply a rule(s) from this document, explicitly state the rule(s) in your output. You can abbreviate the rule description to a single word or phrase.**
|
|
12
|
-
|
|
13
|
-
## Project Context & Philosophy
|
|
14
|
-
|
|
15
|
-
- **Project:** "vibefast" - A modular React Native Expo starter kit for AI-powered mobile applications.
|
|
16
|
-
- **Core Philosophy:** Modularity, AI-IDE friendliness, swappable services, developer efficiency, LLM-friendly codebase.
|
|
17
|
-
- **Backend:** Convex (Auth, DB, Functions, Storage, Cron).
|
|
18
|
-
- **Frontend:** React Native with Expo.
|
|
19
|
-
|
|
20
|
-
## Code Style and Structure (General)
|
|
21
|
-
|
|
22
|
-
- **Conciseness & Clarity:** Write concise, technically sound TypeScript code with accurate examples where applicable.
|
|
23
|
-
- **Functional & Declarative:** Strongly prefer functional components (React) and declarative programming patterns. Avoid classes.
|
|
24
|
-
- **Modularity & DRY:** Prioritize iteration and modularization over code duplication. Ensure components and services are modular, reusable (where appropriate), and maintainable.
|
|
25
|
-
- **Component Granularity:** Break down UI components into smaller, reusable pieces. Keep components focused on a single responsibility. Aim for components **≤ 80 lines of code** (excluding imports/ JSDoc), and services/functions **≤ 250 LOC per file**; extract helpers if longer.
|
|
26
|
-
- **Descriptive Naming:** Use descriptive variable, function, and component names. Use auxiliary verbs for boolean flags (e.g., `isLoading`, `hasError`, `isFeatureEnabled`).
|
|
27
|
-
- **Absolute Imports:** **MUST use absolute imports** for all files within `apps/native/src/` (e.g., `import { Button } from '@/components/ui';` never `../../components/ui/Button`). Frontend code MUST import Convex generated helpers via `@vibefast/backend/_generated/...` rather than relative paths.
|
|
28
|
-
- **No Direct Vendor Calls (Abstraction):** External SDKs or vendor-specific logic (e.g., for RevenueCat, Sentry, PostHog, specific AI providers) **MUST be touched only through adapter layers or dedicated service implementations** within their respective feature modules (e.g., `apps/native/src/features/payments/services/revenuecat-adapter.ts`) or Convex `lib/` adapters (e.g., `packages/backend/convex/lib/ai/openaiAdapter.ts`). The core application logic should interact with our defined service interfaces in `apps/native/src/core/`.
|
|
29
|
-
- **Comments:** **Don't write excessive code comments.** Focus on JSDoc for public APIs/interfaces and comments for _why_ complex or non-obvious logic exists, not _what_ the code is doing.
|
|
30
|
-
- **Atomic Commits/Diffs:** **Keep diffs atomic.** Each commit or PR should represent one logical change.
|
|
31
|
-
- **Review EsLint Rules** and follow these rules.
|
|
32
|
-
|
|
33
|
-
## Naming Conventions
|
|
34
|
-
|
|
35
|
-
- **General Files & Directories (e.g., in `apps/native/src/`):** `kebab-case` (e.g., `user-profile.tsx`, `auth-service.ts`).
|
|
36
|
-
- **Convex Backend Files (`packages/backend/convex/` directory):** **`camelCase`** (e.g., `otpAuth.ts`, `chatbotFunctions.ts`). This is an ESLint override.
|
|
37
|
-
- **React Components (Functions):** `PascalCase` (e.g., `UserProfileCard.tsx`).
|
|
38
|
-
- **Variables & Functions/Methods:** `camelCase`.
|
|
39
|
-
- **Types, Interfaces, Enums (const objects):** `PascalCase`.
|
|
40
|
-
- **Constants:** `UPPER_SNAKE_CASE`.
|
|
41
|
-
- **Exports:** Favor named exports for components, utilities, and services.
|
|
42
|
-
|
|
43
|
-
## TypeScript Usage
|
|
44
|
-
|
|
45
|
-
- **Strict Mode:** **Code MUST compile with `tsc --noEmit` under strict mode.** (as per `tsconfig.json`).
|
|
46
|
-
- **Types over Interfaces:** Prefer `type` for defining object shapes, props, etc., unless interface-specific features like declaration merging are needed.
|
|
47
|
-
- **Avoid Enums:** Use `as const` objects for string/numeric literal unions:
|
|
48
|
-
```typescript
|
|
49
|
-
export const UserRoles = { Admin: 'ADMIN', User: 'USER' } as const;
|
|
50
|
-
export type UserRole = (typeof UserRoles)[keyof typeof UserRoles];
|
|
51
|
-
```
|
|
52
|
-
- **Functional Components:** Use functional components with typed props.
|
|
53
|
-
- **Explicit Return Types:** Use explicit return types for all non-trivial functions and all exported functions.
|
|
54
|
-
- **`@typescript-eslint/consistent-type-imports`:** Adhere to this rule (prefer `import type`).
|
|
55
|
-
- **Avoid `any`:** Use `unknown` or define specific types. Justify any use of `any`.
|
|
56
|
-
- **Discriminated Unions:** Implement proper TypeScript discriminated unions for message types or state variants.
|
|
57
|
-
|
|
58
|
-
## State Management (Frontend)
|
|
59
|
-
|
|
60
|
-
- **Convex React Hooks (`useQuery`, `useMutation`, `useAction`):** Primary for server state and backend interactions.
|
|
61
|
-
- **Zustand:** For global, client-side UI state (e.g., theme, global notifications).
|
|
62
|
-
- **MMKV (via Core Cache Service):** For persistent local storage (guest data, user preferences).
|
|
63
|
-
- **Local Component State (`useState`, `useReducer`):** Default for UI state confined to a component.
|
|
64
|
-
- **`useEffect` Cleanup:** Implement proper cleanup functions in `useEffect` hooks to prevent memory leaks.
|
|
65
|
-
|
|
66
|
-
## UI and Styling (Frontend - NativeWind)
|
|
67
|
-
|
|
68
|
-
- **Things to follow:** Whenever you have to show loading state don't do "Loading..." use an actual loader.
|
|
69
|
-
- **Regarding Themeing:**
|
|
70
|
-
- **NativeWind:** Primary styling solution. Use semantic utility classes (`bg-primary`, `text-base`). **Avoid inline styles** unless absolutely necessary for dynamic properties not easily handled by NativeWind. In Nativewind space-2, space-x-4, gap-y-8 don't work you have to use gap-2, gap-x-2, gap-y-8 (these are example values to explain the rule). Grid also doesn't work don't use grid use someother way when needed.
|
|
71
|
-
- **Core UI Components:** **MUST use built-in UI components** from `apps/native/src/components/ui/` (or via the `@/components/ui` alias) as the base for UIs.
|
|
72
|
-
- **Accessibility (A11y):** Ensure high accessibility standards. All interactive components MUST have appropriate `accessibilityRole`, `accessibilityLabel`, `accessibilityHint`, and `accessibilityState`. Refer to `front-end-architecture.md#AccessibilityAXImplementationDetails`.
|
|
73
|
-
- **Animations & Gestures:** Leverage `react-native-reanimated` and `react-native-gesture-handler` for performant animations and gestures.
|
|
74
|
-
- **Performance:** Avoid unnecessary re-renders (use `React.memo`, `useCallback`, `useMemo` judiciously). Use `@shopify/flash-list` for long lists.
|
|
75
|
-
- **Theme Adherence:** Ensure UI elements use colors and fonts defined in `tailwind.config.js`.
|
|
76
|
-
- **Cross-Platform Consistency:** Test UI on both iOS and Android. Use `Platform.select` for minor stylistic differences if NativeWind utilities don't fully abstract them (e.g., complex shadows).
|
|
77
|
-
|
|
78
|
-
## Convex Backend Development
|
|
79
|
-
|
|
80
|
-
- **Filename Convention:** **`camelCase`** for all `.ts` files in `convex/`.
|
|
81
|
-
- **New Function Syntax:** **ALWAYS use the new function syntax** for queries, mutations, and actions (e.g., `export const myQuery = query({ args: {}, handler: async (ctx, args) => { ... } });`).
|
|
82
|
-
- **Validators:** **ALWAYS include argument and return type validators** (`v` object from `convex/values`) for all Convex functions (public and internal). Use `v.null()` for functions that don't explicitly return a value.
|
|
83
|
-
- **Public vs. Internal:** Use `query`, `mutation`, `action` for public API functions. Use `internalQuery`, `internalMutation`, `internalAction` for functions not meant to be called from the client.
|
|
84
|
-
- **Schema (`convex/schema.ts`):** Define all database tables and indexes here. System fields (`_id`, `_creationTime`) are automatic. Follow index naming conventions (e.g., `by_field1_and_field2`).
|
|
85
|
-
- **API Design:** Organize functions logically in files.
|
|
86
|
-
- **Error Handling:** Catch errors from third-party API calls within Convex actions. Return standardized error objects/messages to the client. Do not leak raw external API errors.
|
|
87
|
-
- **Security:** Validate ALL inputs from the client in Convex functions. Implement authorization logic to protect data access. Store API keys and secrets as Convex environment variables (`npx convex env set KEY VALUE`).
|
|
88
|
-
- **Import Path:** **Frontend MUST consume Convex generated helpers via `@vibefast/backend/_generated/...`** (and internal code within the backend uses relative paths). Never reach into `packages/backend/convex` with lengthy relative imports from the app.
|
|
89
|
-
|
|
90
|
-
## Error Handling (General)
|
|
91
|
-
|
|
92
|
-
- **Core Logging Service:** Use the `Logger` from `apps/native/src/core/logging/` (via `@/core/logging`) for all client-side logging.
|
|
93
|
-
- **User-Friendly Messages:** Provide clear, user-friendly error messages in the UI. Log detailed technical errors for debugging.
|
|
94
|
-
- **`try...catch`:** Avoid excessive `try...catch` blocks for flow control. Use them for genuine exceptional circumstances or around external calls that might fail. Let errors propagate to a higher-level handler where appropriate.
|
|
95
|
-
|
|
96
|
-
## Testing
|
|
97
|
-
|
|
98
|
-
- **Unit Tests (Jest & RNTL for Frontend, Convex Test Framework for Backend):** Write unit tests for utilities, complex components, core services, and all Convex functions with business logic.
|
|
99
|
-
- **Test File Naming:** `component-name.test.tsx` or `functionName.test.ts`, co-located.
|
|
100
|
-
- **No Tests for Simple Presentational Components:** Focus testing effort on logic and interaction.
|
|
101
|
-
- **Coverage:** Aim for high coverage of critical logic.
|
|
102
|
-
- **E2E Tests (Maestro):** Ensure `testID`s are added to key elements to support E2E testing.
|
|
103
|
-
|
|
104
|
-
## Git Usage
|
|
105
|
-
|
|
106
|
-
- **Commit Message Prefixes:** `fix:`, `feat:`, `perf:`, `docs:`, `style:`, `refactor:`, `test:`, `chore:`.
|
|
107
|
-
- **Rules:** Lowercase messages, concise summary line (max 100 chars), reference issue numbers.
|
|
108
|
-
|
|
109
|
-
## Documentation
|
|
110
|
-
|
|
111
|
-
- **JSDoc:** **JSDoc every exported function, type, and prop interface.**
|
|
112
|
-
- **READMEs:** Maintain a clear main `README.md`. Feature modules should have their own brief READMEs.
|
|
113
|
-
- **Architecture Docs:** Refer to `architecture.md`, `front-end-architecture.md`, etc. in `docs/`.
|
|
114
|
-
|
|
115
|
-
## AI Agent Specific Instructions (MUST FOLLOW)
|
|
116
|
-
|
|
117
|
-
1. **Adherence to Guidelines:** You MUST strictly follow all guidelines in this document and other architectural documents referenced in the story.
|
|
118
|
-
2. **Story as Primary Work Order:** The `*.story.md` file is your primary instruction set.
|
|
119
|
-
3. **Consult Reference Docs:** You SHOULD consult `architecture.md`, `front-end-architecture.md`, `prd.md`, and `operational-guidelines.md` (this doc) for context, standards, and patterns. If a story's "Dev Technical Guidance" conflicts with a general guideline, the story's specific guidance takes precedence _for that story_.
|
|
120
|
-
4. **Four Strikes Rule for Blockers:** If you attempt to solve a specific technical blocker (e.g., persistent lint error, failing test, tool command error) four times without success, you MUST stop, clearly document the issue, what you tried, and ask the human user for guidance. Do not loop indefinitely.
|
|
121
|
-
5. **Progress Marking:** Mark progress in `ai/implementation-plan.md` as specified in story ACs.
|
|
122
|
-
6. **Clarity in Communication:** When asking for clarification or reporting issues, be precise about the problem, what you've tried, and what information you need.
|
|
123
|
-
|
|
124
|
-
### **🔍 Category 1: Investigation & Setup Rules**
|
|
125
|
-
|
|
126
|
-
**Rule 1.1: Prioritize Existing Patterns for Consistency**
|
|
127
|
-
|
|
128
|
-
- **When to Use:** _Before writing any new test file or complex test suite._
|
|
129
|
-
- **Guideline:**
|
|
130
|
-
1. Look for similar tests in the codebase (e.g., tests for similar components, hooks, or services).
|
|
131
|
-
2. Observe and adopt established mocking patterns, import structures, and test organization (e.g., `beforeEach` setup, `describe` block structure).
|
|
132
|
-
3. Review `jest.config.js` and `jest-setup.ts` to understand global test configurations and setup.
|
|
133
|
-
4. Check the `apps/native/src/__mocks__/` directory for any pre-defined global mocks for libraries.
|
|
134
|
-
5. **Assumption:** The existing testing setup (`jest-expo` preset) is generally functional. Investigate existing working tests before assuming the setup is broken for new tests.
|
|
135
|
-
|
|
136
|
-
**Rule 1.2: Perform Thorough Dependency Tracing for Mocks**
|
|
137
|
-
|
|
138
|
-
- **When to Use:** _Before attempting to mock any dependency for a component or function under test._
|
|
139
|
-
- **Guideline:**
|
|
140
|
-
1. Open the source file of the component/function being tested. List ALL its direct imports.
|
|
141
|
-
2. For each custom import (e.g., starting with `@/` from within our project), briefly inspect what that imported module itself imports or relies on, if relevant to the test.
|
|
142
|
-
3. Identify ALL external dependencies (libraries, other project modules/services, React Native APIs, Expo APIs, Convex hooks) that the unit under test _directly or indirectly through its immediate custom imports_ uses and whose behavior needs to be controlled for the test.
|
|
143
|
-
4. Mock only the necessary dependencies to isolate the unit under test. Use `jest.mock('path/to/module', () => ({ ...mockedExports... }));` for each module whose functions/components need to be mocked.
|
|
144
|
-
|
|
145
|
-
### **🔧 Category 2: TypeScript & Mocking Precision Rules**
|
|
146
|
-
|
|
147
|
-
**Rule 2.1: Ensure Type-Accurate Data Mocks (Especially for Convex/Database)**
|
|
148
|
-
|
|
149
|
-
- **When to Use:** _When creating mock data for props, hook return values, or function arguments, particularly for data originating from or structured like Convex database documents._
|
|
150
|
-
- **Guideline:**
|
|
151
|
-
1. For Convex data, refer to `convex/schema.ts` for table structures and `convex/_generated/dataModel.d.ts` for exact `Doc<"tableName">` and `Id<"tableName">` types.
|
|
152
|
-
2. Mock objects MUST include ALL required fields as per their TypeScript definition, including system fields for Convex documents (e.g., `_id: "mockId" as Id<"users">`, `_creationTime: Date.now()`).
|
|
153
|
-
3. Use correct types for all fields. For Convex `Id` types in mocks, casting a string (e.g., `"mockId" as Id<"tableName">`) is acceptable.
|
|
154
|
-
4. For mocked hooks or functions, ensure the _entire return object structure_ (including all properties, even if some are just `jest.fn()`) matches what the actual hook/function returns.
|
|
155
|
-
|
|
156
|
-
**Rule 2.2: Implement Complete & Accurate Mocks for Hooks/Services**
|
|
157
|
-
|
|
158
|
-
- **When to Use:** _When mocking custom hooks, services, or complex functions from external libraries (e.g., `@ai-sdk/react`, `@convex-dev/auth/react`)._
|
|
159
|
-
- **Guideline:**
|
|
160
|
-
1. Inspect the actual implementation or type definition of the hook/service to understand its full return signature (all properties, methods, and their types).
|
|
161
|
-
2. The `jest.mock()` factory for the module MUST return a mock that provides ALL properties/methods the component under test will try to access.
|
|
162
|
-
3. For functions within the mocked object, use `jest.fn()`. If these functions are expected to return values, mock their implementation accordingly (e.g., `mockedFunction: jest.fn(() => 'mockReturnValue')`).
|
|
163
|
-
4. Use meaningful mock data that matches expected types for return values.
|
|
164
|
-
|
|
165
|
-
### **⚛️ Category 3: React Native Specific Testing Rules (RNTL)**
|
|
166
|
-
|
|
167
|
-
**Rule 3.1: Correctly Simulate React Native User Events**
|
|
168
|
-
|
|
169
|
-
- **When to Use:** _When testing user interactions like button presses or text input changes using React Native Testing Library._
|
|
170
|
-
- **Guideline:**
|
|
171
|
-
1. For `Pressable` or `Button` `onPress` events, use `fireEvent.press(element)`. If the component's handler expects an event object (e.g., for `event.preventDefault()`), you may need to pass a mock event: `fireEvent.press(element, { nativeEvent: {} /* or more specific if needed */ });`. (The AI's fix of `const mockEvent = { preventDefault: jest.fn() }; fireEvent.press(sendButton, mockEvent);` was good for a case where `preventDefault` was explicitly called).
|
|
172
|
-
2. For `TextInput` `onChangeText` events, use `fireEvent.changeText(inputElement, 'new text')`.
|
|
173
|
-
3. For other events, use the appropriate `fireEvent` method (e.g., `fireEvent.scroll`).
|
|
174
|
-
4. Always check the component's prop signature to understand what event arguments it expects.
|
|
175
|
-
|
|
176
|
-
**Rule 3.2: Verify User-Visible State Changes and Accessibility Props**
|
|
177
|
-
|
|
178
|
-
- **When to Use:** _When testing how a component's internal state or props affect what the user sees or how assistive tech interacts with it._
|
|
179
|
-
- **Guideline:**
|
|
180
|
-
1. Prioritize asserting on what the user would experience:
|
|
181
|
-
- Use `screen.getByText('Visible Text')` or `screen.queryByText('Text Should Not Be Visible')`.
|
|
182
|
-
- Check for changes in `accessibilityState` (e.g., `expect(button).toHaveAccessibilityState({ disabled: true })`).
|
|
183
|
-
- Verify `accessibilityLabel` and `accessibilityRole`.
|
|
184
|
-
2. When checking dynamic states like `disabled` from `accessibilityState`, be mindful of optional chaining if the state might not always be present: `element.props.accessibilityState?.disabled`.
|
|
185
|
-
3. Test the _outcome_ of state changes (e.g., different text displayed, button becomes disabled) rather than directly inspecting internal component state variables.
|
|
186
|
-
|
|
187
|
-
### **🏗️ Category 4: Mock Structure & Strategy Rules**
|
|
188
|
-
|
|
189
|
-
**Rule 4.1: Mock External Library Dependencies Effectively**
|
|
190
|
-
|
|
191
|
-
- **When to Use:** _When dealing with substantial external libraries that have complex internal state or side effects not relevant to the unit under test (e.g., `@ai-sdk/react`, `@shopify/flash-list`, navigation libraries)._
|
|
192
|
-
- **Guideline:**
|
|
193
|
-
1. Mock the entire module at the top of your test file using `jest.mock('module-name', () => ({ ...mockedExports... }));`.
|
|
194
|
-
2. For complex hooks from these libraries (like `useChat`), provide a mock implementation that returns a complete object covering all properties your component will access during the test scenario.
|
|
195
|
-
3. For UI components from these libraries (e.g., `FlashList`), if their internal rendering is complex and irrelevant to your component's logic, provide a simple mock implementation (e.g., a `View` that just renders `data.map(renderItem)`).
|
|
196
|
-
4. If you need to access original parts of a module while mocking others, use `const actualModule = jest.requireActual('module-name');` within your mock factory and spread `...actualModule` before overriding specific exports.
|
|
197
|
-
|
|
198
|
-
**Rule 4.2: Handle Problematic UI Component Mocks**
|
|
199
|
-
|
|
200
|
-
- **When to Use:** _If specific UI components (especially those with native code, animations, or deep context dependencies like `FocusAwareStatusBar`) cause issues in the Jest/RNTL test environment._
|
|
201
|
-
- **Guideline:**
|
|
202
|
-
1. Identify components that are problematic for unit tests (e.g., they throw errors unrelated to your component's logic because their required native environment isn't fully present).
|
|
203
|
-
2. Create a specific mock for that component path in your `jest.mock()` call, returning a simple placeholder (e.g., `jest.mock('@/components/ui/focus-aware-status-bar', () => () => null);` or a simple `<View />`).
|
|
204
|
-
3. This is for _unit/component tests_ of _other_ components that _use_ the problematic one. The problematic component itself should have its own dedicated tests where its specific dependencies are handled or mocked appropriately.
|
|
205
|
-
|
|
206
|
-
### **🐛 Category 5: Debugging Test Failures Rules**
|
|
207
|
-
|
|
208
|
-
**Rule 5.1: Adhere to the Three-Strikes Debugging Protocol**
|
|
209
|
-
|
|
210
|
-
- **When to Use:** _When encountering any persistent test failure or error during test implementation._
|
|
211
|
-
- **Guideline:**
|
|
212
|
-
1. **First Attempt:** Review your test logic, component interaction, and basic mock setup. Check for typos or simple errors.
|
|
213
|
-
2. **Second Attempt:** Verify TypeScript types of mocks against actual component props/hook signatures. Ensure mock objects are complete and accurately represent all accessed properties/methods. Double-check dependency tracing.
|
|
214
|
-
3. **Third Attempt:** Simplify the test case to its absolute minimum to isolate the problematic interaction. Try testing a simpler aspect of the component first.
|
|
215
|
-
4. **After 3 Unsuccessful Attempts:** **STOP.** Clearly document:
|
|
216
|
-
- The specific error message(s).
|
|
217
|
-
- The component/function being tested.
|
|
218
|
-
- What you have tried.
|
|
219
|
-
- Your hypothesis about the root cause.
|
|
220
|
-
- Ask the human user for guidance.
|
|
221
|
-
5. **DO NOT loop indefinitely** trying to fix the same issue without making clear progress or understanding the root cause.
|
|
222
|
-
|
|
223
|
-
**Rule 5.2: Systematically Analyze Test Error Messages**
|
|
224
|
-
|
|
225
|
-
- **When to Use:** _Whenever a test fails._
|
|
226
|
-
- **Guideline:**
|
|
227
|
-
1. **"not a function" (e.g., `TypeError: X is not a function`):** Usually means a property or method you're trying to call on a mocked object/hook return value hasn't been defined in your mock. Check your `jest.mock()` factory for that module/hook.
|
|
228
|
-
2. **"Cannot read properties of undefined (reading 'X')":** A variable or an object is `undefined`, and you're trying to access a property `X` on it. This often points to an incomplete mock (a hook didn't return the expected object structure) or a logic error where a variable isn't initialized before use.
|
|
229
|
-
3. **"Type 'X' is not assignable to type 'Y'":** A TypeScript error indicating your mock data or function signature doesn't match the expected type. Refer to the actual type definitions.
|
|
230
|
-
4. **Component Rendering Errors (e.g., from deep within a library):** Often indicates a missing mock for a crucial provider (like Navigation, Theme, Convex) or a native module that the component relies on. Ensure your test setup (`render` helper from `test-utils.tsx`) includes all necessary global providers.
|
|
231
|
-
5. **Examine Line Numbers:** Pay close attention to the line numbers in the error stack trace, both in your test file and the component's source code, to pinpoint where the error originates.
|
|
232
|
-
|
|
233
|
-
### **📋 Category 6: Test Organization & Focus Rules**
|
|
234
|
-
|
|
235
|
-
**Rule 6.1: Follow Consistent Test File Structure & Hoisting**
|
|
236
|
-
|
|
237
|
-
- **When to Use:** _When creating any new test file._
|
|
238
|
-
- **Guideline:**
|
|
239
|
-
1. **Imports First (Generally):** Standard React, testing-library, and the component under test.
|
|
240
|
-
2. **`jest.mock()` Calls:** All `jest.mock('module-path', ...)` calls MUST appear at the very top of the file, before any `import` statements, to ensure mocks are hoisted and applied correctly by Jest.
|
|
241
|
-
3. **Import Mocked Functions (if needed for spying/resetting):** If you need to reference the mocked functions themselves (e.g., `const { useChat } = require('@ai-sdk/react'); (useChat as jest.Mock).mockReturnValue(...)`), do this _after_ the `jest.mock()` calls.
|
|
242
|
-
4. **`describe`, `beforeEach`, `it/test` Structure:** Use `describe` to group related tests. Use `beforeEach` to reset mocks (`jest.clearAllMocks()`) and set up common mock return values for a suite. Use `it` or `test` for individual test cases.
|
|
243
|
-
5. **Happy Path First:** Test the primary, successful functionality of a component/function first. Then, add tests for alternative paths, edge cases, and error handling.
|
|
244
|
-
|
|
245
|
-
**Rule 6.2: Maintain Focused Test Coverage**
|
|
246
|
-
|
|
247
|
-
- **When to Use:** _When deciding what aspects of a component/function to test._
|
|
248
|
-
- **Guideline:**
|
|
249
|
-
1. **Component Renders Without Crashing:** A basic smoke test.
|
|
250
|
-
2. **User Interactions:** Test key interactions (button clicks, text input, form submissions) and verify they trigger the expected callbacks or state changes _visible to the user_.
|
|
251
|
-
3. **State Changes:** Verify that changes in props or internal state lead to the correct UI updates (different text, elements appearing/disappearing, styles changing if critical to behavior).
|
|
252
|
-
4. **Props & Hook Configuration:** Test how different prop values or different return values from mocked hooks affect the component's rendering and behavior.
|
|
253
|
-
5. **Avoid Over-Testing Implementation Details:** Focus on testing the component's public API (props) and its user-observable behavior, not its internal private functions or state structure directly unless absolutely necessary.
|
|
254
|
-
6. **Accessibility Props:** Verify key accessibility props are set correctly.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Image Handling Rules
|
|
2
|
-
|
|
3
|
-
## 1. Dynamic Local Images
|
|
4
|
-
|
|
5
|
-
- **The Problem:** React Native's bundler cannot handle dynamic paths in `require()`. Code like `require(\`./images/${name}.png\`)` will **CRASH** the app.
|
|
6
|
-
- **The Solution:** You **MUST** use a static map object to pre-load all possible dynamic images. Use a variable as a key to look up the correct pre-required image at runtime.
|
|
7
|
-
|
|
8
|
-
- **Implementation:**
|
|
9
|
-
|
|
10
|
-
```ts
|
|
11
|
-
// 1. Define the static map at the top level of your file.
|
|
12
|
-
const IMAGE_MAP = {
|
|
13
|
-
front: require('@/assets/images/guide-front.png'),
|
|
14
|
-
side: require('@/assets/images/guide-side.png'),
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// 2. Use the map in your component.
|
|
18
|
-
const MyComponent = ({ view }: { view: 'front' | 'side' }) => {
|
|
19
|
-
return <Image source={IMAGE_MAP[view]} />;
|
|
20
|
-
};
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## 2\. General Image Component Usage
|
|
24
|
-
|
|
25
|
-
- You **MUST** use the custom `<Image />` component from `@/components/ui` for all images. Do not use the default `react-native` Image component. Our component is a wrapper around `expo-image` which provides superior performance and caching.
|
|
26
|
-
|
|
27
|
-
## 3\. Image Accessibility
|
|
28
|
-
|
|
29
|
-
- All images that convey information (i.e., are not purely decorative) **MUST** have a descriptive `accessibilityLabel` prop for screen readers.
|
|
30
|
-
|
|
31
|
-
## 4\. Image Optimization Before Upload
|
|
32
|
-
|
|
33
|
-
- Before uploading any user-selected image to Convex, you **MUST** process it with the `expo-image-manipulator` library.
|
|
34
|
-
|
|
35
|
-
- This is critical for resizing and compressing images to reduce upload time, save bandwidth, and lower storage costs.
|
|
36
|
-
|
|
37
|
-
- **Example:**
|
|
38
|
-
|
|
39
|
-
```typescript
|
|
40
|
-
import * as ImageManipulator from 'expo-image-manipulator';
|
|
41
|
-
|
|
42
|
-
const result = await ImageManipulator.manipulateAsync(
|
|
43
|
-
originalImageUri,
|
|
44
|
-
[{ resize: { width: 1024 } }], // Resize to a reasonable width
|
|
45
|
-
{ compress: 0.7, format: ImageManipulator.SaveFormat.JPEG },
|
|
46
|
-
);
|
|
47
|
-
// Upload the file at result.uri to Convex Storage.
|
|
48
|
-
```
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# React Native - Core Concepts
|
|
2
|
-
|
|
3
|
-
## 1. State Management Strategy
|
|
4
|
-
|
|
5
|
-
The project uses a clear, multi-layered approach to state management. Use the right tool for the job.
|
|
6
|
-
|
|
7
|
-
- **Server State:** Use **Convex React Hooks (`useQuery`, `useMutation`, `useAction`)** for all data that lives on the backend. This is the default and should be your first choice. It provides real-time updates, caching, and optimistic updates out of the box.
|
|
8
|
-
- **Global Client State:** Use **Zustand** for global UI state that is _not_ persisted on the server. Examples include: the current theme (dark/light), the state of a global notification toast, or the status of a multi-step modal.
|
|
9
|
-
- **Local Component State:** Use **React Hooks (`useState`, `useReducer`)** for all state that is confined to a single component or its immediate children. This should be your default for managing UI interactions, form inputs, and component-specific loading states.
|
|
10
|
-
- **Persistent Local Storage:** Use the core cache service, which is a wrapper around **MMKV**, for storing simple key-value data that needs to persist across app launches (e.g., user preferences, if they've seen the onboarding flow).
|
|
11
|
-
|
|
12
|
-
## 2. Component Design
|
|
13
|
-
|
|
14
|
-
- **Component Granularity:** Break down UI into small, reusable components with a single responsibility. Aim for components **≤ 80 lines of code** (excluding imports and JSDoc).
|
|
15
|
-
- **`useEffect` Cleanup:** ALWAYS implement a proper cleanup function in `useEffect` hooks to prevent memory leaks, especially when dealing with subscriptions, timers, or event listeners.
|
|
16
|
-
|
|
17
|
-
## 3. Performance
|
|
18
|
-
|
|
19
|
-
- Avoid unnecessary re-renders. Use `React.memo`, `useCallback`, and `useMemo` judiciously where performance bottlenecks are identified.
|
|
20
|
-
- For long lists of data, **MUST** use `@shopify/flash-list` instead of `FlatList` for significantly better performance.
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
```
|