Customizing Features
AI Image Analysis
Add camera-driven analysis flows that stream photos to your backend for AI scoring.
This feature (registered as image-analysis in the CLI) wires a camera-first workflow, backend storage, and configurable scoring traits so you can analyze faces, dashboards, or any visual input you choose.
vf add image-analysisFrontend flow
- Route:
apps/native/src/app/(root)/(protected)/image-analysisrenders the capture and results screens. - Master config:
apps/native/src/features/image-analysis/config/master-analysis-config.tsdefines each flow (face analysis, dashboard warning) with its icon, color, and photo steps. - Screens:
apps/native/src/features/image-analysis/appcontains the capture screen, options screen, results screen, and helpers to load the configs. - Components:
apps/native/src/features/image-analysis/componentshandle achievements, galleries, and results cards that reuse the theme tokens.
Backend flow
packages/backend/convex/imageAnalysis.tsstores uploads, queues AI analysis, and updates theimageAnalysestablegenerateImageAnalysisinpackages/backend/convex/lib/ai/imageAnalysisAdaptercalls your AI provider
packages/backend/supabase/functions/analyze-image/Edge Function calls your AI providerpackages/backend/src/services/image-analyses.tshandles results storage- Database table:
image_analyseswith RLS policies
Configuration
- Update
packages/backend/.env.localwithAI_PROVIDER,AI_MODEL,OPENAI_API_KEY,GEMINI_API_KEY - Your backend must be running (
pnpm dev:server) while you test
Customization
- Add new analysis configs by extending
MASTER_ANALYSIS_CONFIGS - Each backend config defines traits, prompts, and a schema for validation
- The UI automatically binds to photo steps and available goals
Found an issue or bug in the docs?
Help me improve! If you spot any errors, typos, or have suggestions, please let me know.
Reach out on X/Twitter @zafarbuildzz